man scansort (Commandes) - Image Sorting and Verification Utility

NAME

scansort - Image Sorting and Verification Utility

SYNOPSIS

scansort [options] configfile directory

Options:

[-_aBbKlMmRrTtuvw] -L[e] -r[AbcDdEfHIMnRoSTXx] -H[bx] -t[AaMmOhAo] -tg [-eextension] [-scollection] [-dbdirectory] [-dcdirectory] [-dbdirectory] [-dpdirectory] [-drdirectory] [-dsdirectory] [-dtdirectory] [-dwdirectory] [-bsize] [-hhavelist] [-Mc] [-MC] [-Mp] [-Mmmodel] [-Mnname] [-tqnumber] [-tznumber] [-xbnumber]

DESCRIPTION

ScanSort is a utility that can be used to identify, verify and sort images based upon information contained in CSV files. It can also generate reports about the status of image collections and create archives of files to trade with others.

Features include:

•
automagically sorting new files and putting them where they belong, even if they have been renamed
•
quickly processing ALL collections in one run
•
searching directory trees for pictures (e.g. complete CDs)
•
CRC-Checking, taking CSVs with or without CRCs
•
generating report files (like MTCM for Windows, or widely configurable)
•
spanning collections over multiple volumes
•
automatically repairing some corrupt files
•
generating descript.ion files
•
support for trading (matching reports against collections, copying files to send into a directory or packing them into zipfiles)
•
creating, updating, verifying, managing CSV files
•
creating model based collections (searching all pictures for a specific model)

OPTIONS

Options may be prefixed by either a dash ("-") or, on non-UNIX systems, a forward slash ("/"). Options cannot be combined (ie you have to do a "-m -v", "-mv" will not work).

GENERAL OPTIONS

-_
Spaces in picture names are converted to '_' by default, as are umlauts and special characters - K<E2>t<E2> becomes Kata. You can turn this feature off with this switch.
-a
Check all files (regardless of extension). If you have pictures named pic.001, pic.002 or something similar. Not needed any more for sorting collections with different file types.
-b
Always delete bad files (see below).
-exyz
Set file extension to xyz (instead of jpg). So you can sort collections of wavelet or fractal compressed pictures in the future ! :)
-K
Kill duplicate CSV-files (see below).
-l
Don't write a logfile. By default, a lot of info is written to "scansort.log" in the current path.
-L
Write lower-case file names (forces all filenames to lowercase).
-Le
Write lower-case file extensions names (forces all file extensions to lowercase).
-M
Give help on model collections.
-m
Move files (erase source files). All files you already have in your collection are deleted from the source path (those you don't have are copied and then deleted - if the copying was succesful).
-R
Do not recurse the given paths (search subdirectories) when searching for pictures (added by request).
-r
Give help on reports.
-sNAME
Process single collection NAME -s* means "all collections". If you use a config file with this option, the collections listed in the config file are ignored and only those on the command line are processed.
-T
Touch pictures (set to current date/time) when moving into collection.
-t
Give help on trading.
-u
No uppercase for DOS-Filenames. By default, filenames with 8 or less characters ("DOS-Names") are converted to uppercase. This switch turns this feature off.
-v
More verbose messages (rather obsolete...).
-xi
Make nested directories for collections, for example Scanmaster_Index is put into the directory "ScanmasterIndex" and "ScanmasterExtras" into "ScanmasterExtras".
-xu
Include the names of unused CSVs in the log file.

DIRECTORY OPTIONS

You can use a ~ to represent your home directory under both UNIX and Win32. Under Win32 you need to set the HOME environment variable manually for this to work.

-dbDIR
Set directory where bad pictures go to (instead of "BadPictures").
-dcDIR
Set directory for CSV-files to DIR.

(default: path of config file)
-dpDIR
Set collection directory to DIR. You can override this by specifying an absolute path for the target in the config file. The pictures are copied to DIR/CollectionName.

(default: current dir)
-drDIR
Set directory for report files to DIR. You can override this by specifying an absolute path for the report in the config file.

(default: current dir)
-dsDIR
Set source directory for files to copied when trading.

(default: collection dir)
-dtDIR
Set trading directory for files generated or copied.

(default: current dir)
-dwDIR
Set directory where files go when they are deleted (the wastebasket). See below for more informaiton on the wastebasket.

REPORT OPTIONS

ScanSort supports both Mastertech-style reports and its own (more flexible) reports. If you use -rM Mastertech-style reports will be produced, but if you use any of -r[hmiesa], ScanSort-style reports will be generated.

-rA
Report all collections in the config file, even the inactive ones (those of which you don't have any pictures).
-rb
Brief (don't include image descriptions).
-rc
CRC-check all files (SSLLOOWW). Use this only if you think your harddisk could be corrupt, or to verify a freshly burnt CD. Remember: ALL pictures were CRC-checked when they were added to the collection!
-rE
No empty reports: best used with -rmies (everything except the files you have). Then there won't be reports for complete collections showing just the summary.
-rf
Freshen: only create a report for a collection for which new pictures were added, or for which the report was missing or older than the CSV. Needed to keep a web page up to date (to see which reports have changed).
-rIsome_comment
Add "some_comment" to every report. This switch can only be used in the config file.
Mastertech-style reports (only have missing, name, length and description).
-rn
Add numbers of have/all to report names (results in CSA_239-240.txt, for example).
-rR
Recurse collection for report generation, like in versions before 1.61. This is not recommended and only needed if pictures were manually moved to subdirectories.
-rr
Don't generate reports. Now, what could this be good for? Well, I'm using -rmiesbofE in my config file, but don't want to generate reports in every run. So I can

a) use -rr in the command line to suppress them for one run.

b) use -rr in the config file to suppress them always and -rr in the command line to turn them back on (-rH and -rT will turn them on as well).

ADDITIONAL REPORT OPTIONS:

-rd
Create "descript.ion" files.
-rD
Create descript.ion as hidden files. descript.ion is only created if there ARE descriptions in the CSV! This is the same as -rd if you're using UNIX as UNIX has no concept of a "hidden" file without a dot as the first character in the name.
-rH
Create "have.txt" for multi-volume-spanning (see below).
-ro
Output the collection summary to the file "summary.txt" in the report path. (complete collections first, then the rest).
-rS
Print summary for every collection in table form on the screen, not only into the logfile.
-rT
Create an HTML table for my homepage. Don't know if anybody else can use this :-) It also creates the CSV zips I supply automatically. -rTv ("vacation") omits the links for the text files to offer only the CSVs. This option searches for a file "trade_tp.html" in the report directory and creates a file "trade.html" out of it. It compares line by line:


CHANGE-DATE - insert current date/time

COMPLETE-TABLE - insert table of complete collections

INCOMPLETE-TABLE - insert table of incomplete collections (you guessed that ;-) )

-rX
Export missing files into CSVs, one per collection.
-rx
Export all missing pictures into "missing.csv" to get a quick overview (only missing pictures from active collections, ie collections from which you have at least one picture).

WASTEBASKET OPTIONS AND HANDLING OF BAD FILES

When duplicate files are found, ScanSort moves them to a wastebasket directory rather than removing them from disk. Files that are damaged are moved to a "BadPictures" directory.

-B
If you use the option -B bad files are left alone completely (but still checked if they could be repaired).
-b
If you use the -b option bad files are never copied and always deleted (but first checked if they can be repaired).
-b40
Only copy bad files if their size is at least 40% of the original size, otherwise delete (with -m). This was the default behaviour until version 1.61, and was changed after someone lost a bunch of files with stupid names (there are lots of collections with pictures named "img0001", "img0002", ...). For example, use -b57 for 57%.
-w
Will turn off the wastebasket feature and have duplicate files really deleted.
-xbnn
Ignore bad files if the length of their name (excluding extension) is less than or equal to nn characters (for example, "-xb10" for 10 characters).

HAVELIST OPTIONS

ScanSort allows you to have collections that span multiple disks so you can, for example, burn part of a collection to CD without having to worry about having duplicate files lying around.

-hhave1.txt
Imports a "havelist" from the file "have1.txt". This list contains size, CRC and name of files you have elsewhere, which are then registered as "already there". If these files come up again, they are NOT copied to the target path and deleted if you use -m.
-Hb
-rHb Will create a binary file have.bin which can be read with -h. Binary havelists are much faster than the text versions.
-hx
Ignore all havelists.

TRADING OPTIONS

ScanSort has a number of features to assist with the trading of images between collectors.

-t
Help for trading.
-dt
Set trading directory for files generated or copied (default: current).
-ds
Set source directory for files to copied (default: collection dir). You can give either the full path including the name of the collection or just the collection base path. The standard collection dir is still searched, so you can keep part of your collection on CD and part on hard disk.

You can specify multiple source directories (each with -ds), but if you have spread your pictures over multiple CDs and you have only one drive, then you're out of luck :-[ (You have to run Scansort once for each CD, which is no problem since the still missing pictures are written to need.txt).

-ta
Make list "ask.txt" of files to 'a'sk the trader for.
-tm
Make list "missing.txt" of files 'm'issing in both collections. Use this to ask a third party for the pictures you both need.
-to
Make list "offer.txt" of files you can 'o'ffer to the trader.
-tgNR
Copy NR files you can offer to the trading directory (e.g. -tg20). Pics you have and the other misses are chosen at random and copied so that you can easily move them to a zip-file and 'g'ive them to the trader. If you don't give a number, or if the number is more than you can offer, all files are copied.

If the number is 500 or more it is interpreted as kilobytes, not pictures.

A file "need.txt" is written with all the pictures you have not sent yet so you don't lose track and send pictures twice! Use this file next time instead of the report. If "need.txt" exists already it is saved to "need.bak".

If any pictures were given the original report is DELETED, so you don't get confused later which files were given. (The remaining filenames are written to "need.txt").

-tzNR
Works only together with -tg. The files you give are not copied but stored in Zipfiles using InfoZip ("zip" must be in your PATH!) The number tells how many pictures will go into each zip. If the number is 500 or more it means maximum size in kilobytes per zip.

Files are zipped by alphabet, so the zipfiles may be below the size you specified. A logfile "zip.log" is written with the contents of every zipfile. If you run Scansort several times it always appends to this logfile, so you should delete it before you start.

Compression is turned on by default. To turn it off, type SET ZIPCMD=-0 (you can put this in your shell startup script if you like)

-tA, -tO, -tM, -tG
Same as -ta, -to, -tm, -tg, except that the collection name is appended to the name of the created text file. With -tGz, the zips are named "Collectionxx.zip" instead of "givexx.zip"

ADDITIONAL OPTIONS FOR USE WITH -tg

-tZname
Set the basename of the generated Zips to "name" instead of "give" (this is quite obsolete now; use -tGz instead).
-tF
Same, but don't check if files actually exist (makes a difference when you use multi-volume spanning).
-tf
Fake it (don't copy anything, useful to see how much would be copied).
-tr
Choose pictures at random (instead of from the beginning of the collection).
-tw
Trade 'w'hole collections. You need this if your partner wants a complete collection from you, and so you have no report. Use -tw and the name of the collection (e.g. Scanmaster) instead of the name of the report file.

CSV MAINTENANCE

-K
Delete ("'k'ill") all CSVs but the newest. A quick way to clean out old CSVs from your collection.
-Kr
Delete obsolete CSVs, rename current CSVs to the correct names.

MODEL COLLECTION OPTIONS

ScanSort's model collection options allow you to organise your images by model name rather than by series. ScanSort will search through the descriptions in the CSVs, finding all images that fall within your search threshold.

-M
Give help on model collections.
-Ma
Create a Diashow list (AIS format) for use with ACDSee.
-MC
Create a CSV file with CRCs.
-Mc
Create a CSV file without CRCs (for a quick search through a collection).
-MmModel_Name
Specify the name of the model.

For example, to search your collection for Pam with a threshold of 60%:

scansort all.txt -MmPamela_Anderson
-MnNewName
Rename all pics if you don't like the sometimes strange names.
-Mp
Copy pics that fit. A directory Model_Name (given with the -Mm option) is created in the current dir (or in the directory given with -dt).

CSV MAINTENANCE MODIFIERS

-Ca
Create CSV for all files in the current directory (not just pictures).
-Cc
Recalculate ALL CRCs (not only those of new files).
-CE
Create E-CSVs.
-Ce
Only existing files go to the CSV (by default non-existing entries are kept).
-Cr
Recurse the source directory when creating CSVs.
-Cu
No entries are removed, no new entries added. Entries without CRC are updated if the pic exists.

CONFIGURATION FILE

The configuration file tells ScanSort which of your CSV-files it should use, where it should place verified images, etc. It is a text file with one collection name per line, like this:

# This is a comment

# you can put commandline switches at

# the beginning of the config file.

-ra

# read CSV-files from /home/mj/pictures/csv

-dc/home/mj/pictures/csv

# path for the collection

-dp/home/mj/pictures/sorted



# Collections start here

Eroscan

Skunkmaster

Scanmaster

Weatherby weatherbyscp wbyscp

You can use both relative and absolute paths. You can also put several collections into the same path.

You can also use different report names with -r:

# no reports for this one

Wscan_SWA -r

ZorroScans_SDC -rZorros.txt

How does ScanSort find the CSVs for the collections? It always examines ALL of your CSVs (which have to be all in one directory). It removes the prefixes "MTCM_" and "McBluna_", the suffix "_(FINAL)" and the number at the end. Then it takes what remains, removes all characters except letters and numbers (like -_'") and compares what remains against the collection names. If several CSVs match, the one with the highest count (number at the end) is taken. ScanSort relies on this number to be correct!

If the CSV is still named differently you can add several alternate names (like wbyscp in the example above).

Now - if your collection is named "Light&Magic_HQ", which CSV won't be recognised?

a) MTCM_Light_&_MagicHQ.csv

b) Light_and_Magic_HQ_28.csv

c) McBluna_lightmagichq_28.csv

You got it, b). If you get non matching CSVs regularly you can beat them easily with alternate names:

Light&Magic_HQ light-and-magic-hq

You may use upper-lower-casing, underscores, dashes, whatever for the alternate names - all of these will be ignored.

The config file can have any name and could be placed in the same directory as the CSV-files. Or, you can place it anywhere you like and specify the CSV-directory with -dc (commandline or configfile). You can create multiple config files of course.

You can use wildcards for the collection name:

Harli* # will select all Harli collections.

I do NOT suggest this however. When you use wildcards the actual collection names have to be determined according to the CSV names AGAIN: if Harli_SWA_40 gets replaced by Harli-SWA-42 it will create a new folder like before. So don't use Wildcards.

The wildcard * will select ALL collections that were not selected before. So you can put all other collection scans somewhere using

* -pMiscStuff

You can (and should) put switches at the beginning of your config file, but NOT after the first collection. However you can adjust the collection path and report path (-dp, -dr) between the collection names to spread large collections over several disks.

USAGE EXAMPLES

A typical method of using scansort is to decode all the binaries from a Usenet newsgroup into a directory, for example ~/pictures/new. You can then run scansort as follows from within ~/pictures/new, assuming your configuration file is called ~/.scansortrc:

scansort -m -s* ~/.scansortrc .

This will move all your freshly decoded images to their proper locations, verifying that the images are correct.

More to be added soon!

FILES

configfile
ScanSort configuration file. For more information on the use of a configuration file, see above.
scansort.log
Logfile written to the current directory containing the results of the ScanSort run.

BUGS

There are no known bugs :-)

LICENSE

ScanSort is released under the terms of the GNU General Public License, version 2. For more information, see the file COPYING contained within the archive.

WWW SITE

The latest version of ScanSort can always be found at http://www.geocities.com/SouthBeach/Pier/3193/

AUTHORS

Stuart Redman <sturedman@hotmail.com>
Initial developer of the Win32 version, source maintainer and responsible for the majority of development.
Kees de Bruin <kdb@rtfm.demon.nl>
Responsible for much of the work for the UNIX port.
Michael-John Turner <mj@energetic.uct.ac.za>
Debian GNU/Linux package maintainer and author of some documentation.

SEE ALSO

lynx(1), nn(1), rn(1), slrn(1), tin(1), trn(1), uudecode(1), uudeview(1)

Additional documentation and sample configuration files can be found in /usr/share/doc/scansort/scansort.txt.