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:
-
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:
- 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.
- Lithology: the lithology name of the lithic. This field must be enclosed
within quotation marks, and
is required.
- Common Name: The name of the lithology in layman's terminology. This
field is optional
and if present must be enclosed within quotation marks.
- 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.
- Location: The specific collection location. This field must be
enclosed within quotation marks, and is required.
- Characteristics: Some description of the characteristics of the
lithics. This field is optional and if present must be enclosed
within quotation marks.
- Comment: Any additional information. This field is optional and if
present must be enclosed
within quotation marks.
-
Sort the data and output it to a temporary file:
sort -t\; -k 2,2 -k 5,5 rocks_lithicsort.edited > rocks_lithicsort.tmp
-
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.
-
Create a new rocks_lithicsort.txt file by adding file names to the
temporary file just created:
- cd lithics/full
- ../add_filename.pl ../rocks_lithicsort.tmp > ../rocks_lithicsort.txt
-
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.
- 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).
- cd lithics/full
- $WEB/genethumb.sh
- rm thumb/*.info
- mv thumb/* ../thumb
- rm index.html
- rmdir thumb
- That should do it. Test your changes!
ENMU Home
Department Home
Contacts