ENMU ENMU Dept of Anthropology and Applied Archaeology

rocks_lithicsort.txt modification

The rocks_lithicsort.txt file is the data collection used by the lithic_response.pl script to select pictures and data to display. It was originally built from an Excel 2000 file containing information about the lithic pictures. The Excel file has not been maintained; errors and updates found during the process of building the online lithic collection have not been incorporated into the Excel file so it should be considered out of date. Similarly, the rocks_lithicsort.txt file itself should not be directly modified. Instead follow the procedure below when updating the online lithic collection. This will ensure that the data is formatted properly for the lithic_response.pl script.

The following procedure is assumed to be run on either the ac01.enmu.edu or dev.enmu.edu linux systems. I expect it can be easily adapted to any system with a sort utility and a Perl interpreter. The steps required to update rocks_lithicsort.txt are:

  1. The maintained index file is rocks_lithicsort.edited. This is a text file containing semicolon-delimited fields. Make any necessary index changes to this file. The data will be sorted, so new entries may be added at the end of the file or anywhere else. There are seven fields in each line within rocks_lithicsort.edited. They are:
    1. Catalog Number: a 4-digit number identifying the lithic. The file name of the corresponding image must start with the same four digits. This field is required.
    2. Lithology: the lithology name of the lithic. This field must be enclosed within quotation marks, and is required.
    3. Common Name: The name of the lithology in layman's terminology. This field is optional and if present must be enclosed within quotation marks.
    4. Locality: A description of the collection location. This is not the collection location used for searching, but just a general description. This field is optional and if present must be enclosed within quotation marks.
    5. Location: The specific collection location. This field must be enclosed within quotation marks, and is required.
    6. Characteristics: Some description of the characteristics of the lithics. This field is optional and if present must be enclosed within quotation marks.
    7. Comment: Any additional information. This field is optional and if present must be enclosed within quotation marks.


  2. Sort the data and output it to a temporary file:


  3. Add any new images to the lithics/full directory, and delete any unused ones. The images should be in JPEG format so all browsers will be able to display them.


  4. Create a new rocks_lithicsort.txt file by adding file names to the temporary file just created:
    1. cd lithics/full
    2. ../add_filename.pl ../rocks_lithicsort.tmp > ../rocks_lithicsort.txt


  5. If any images were deleted from lithics/full, delete the corresponding thumbnail image from lithics_thumb. If any images were added to lithics/full, perform the following procedure to create new thumbnail images.
    1. Find the genethumb.sh program. It should be in either the $WEB directory (on ac01) or the lithics directory (on dev). This is a slightly modified version of the original genethumb.sh (so that it handles filenames containing blank spaces correctly).
    2. cd lithics/full
    3. $WEB/genethumb.sh
    4. rm thumb/*.info
    5. mv thumb/* ../thumb
    6. rm index.html
    7. rmdir thumb


  6. That should do it. Test your changes!

ENMU Home Department Home Contacts