AnotherScrapBook-A.04.01.06 |
AnotherScrapBook - index images and films (and more) and create a static site
asb [--[no]options...] dir1 [dir2 dir3 ... dirN]
The following options can be used preceded by two dashes (e.g. --help), 0/1 options can be used with --no (e.g. --nobig), the default values are given here.
'author' => 'Firsty Second' # Your Name 'autorotate' => 0 # try to rotate correctly images (EXIF based) 'backup' => 1 # should the original of a file be saved or not 'big' => 1 # copy full-sized picture (1/0) 'comment' => 1 # don't force existence of comment with --nocomment 'config' => 'default' # different configs are possible 'debug' => 0 # debug ON or OFF (1/0) 'delorig' => 0 # when deleting a file, should we delete the original 'display' => 1 # display or not image while modifying it 'email' => 'example@example.net' # Your Email 'extra' => 1 # output extra information (e.g. EXIF) or not. 'force-change' => 0 # force change (per default limit changes). 'fps' => '24' # wished frames per seconds of film 'help' => 0 # get help 'medium-cutoff' => '200' # max. size in KB to create medium image 'medium-geometry' => '800x800' # geometry of medium size image 'modify' => 1 # make modification of original picture possible (1/0) 'newdirproc' => 1 # do we proceed new directories (or not)? 'oldmm' => 0 # use old version of MPlayer and MjpegTools 'output' => 'ASB::Out' # Output format to be used. 'out-template' => 'default' # template set to use 'out-template-dir' => './template' # template directory 'overwrite-index' => 0 # overwrite existing index.htm(l) _not_ from ASB. 'parent' => 1 # should top index.html reference to parent directory? 'quick-ident' => 1 # quick and a bit dirty detection of file types 'save-always' => 1 # save after each item modif or only at the end 'skip' => 1 # if unset (--noskip), ignore the skip flag. 'target' => '' # if images and webpages should be copied elsewhere 'thumb-geometry' => '100x100' # geometry of thumbnails 'tvnorm' => '+p' # TV Norm to use (+p for PAL, +n for NTSC)
AnotherScrapBook (short asb) scans directories, looking for images (mostly JPEG but also other types) and films (in MJPEG format). The user can then comment, modify, skip or delete these files. Out of the information gathered, plus extra information if available, asb then creates static web pages, with thumbnail overviews, and sub-directories.
Basically, each directory given on the command line is scanned, the user is asked for a name and a description. Then for each file found, the user can give a comment as well, modify the file (depending on the type of the file, things like rotate, edit), delete it or skip it (the file is then ignored). Afterwards, asb creates a thumbnail image for each file and, if the original file is ``too big'', a medium sized file:
just a smaller image.
a film with the same resolution but with video in MPEG1 format and sound in MP2 format. The framerate is also adapted to something standard for MPEG1 (24, 25 or 30 are recommended).
Out of all this information, one webpage index.html
is created in each
sub-directory, and, per default, linked together.
STRING
name of the author
Just give your name, like --author='First Last'
. This information will
be used for the creation of the webpages. See also the email option.
Based on EXIF information, it is possible to place images (and films) in the correct direction. This options allows you to do it automatically.
Main aim of the program for me was to process photos and films created with
my digital camera, without risking to loose the original. Therefore the program
saves per default the unmodified version of each file (this does not mean that
each version is backuped, but only the first one). Each modified file is saved
once in the hidden directory .orig
in each sub-directory.
Using --nobackup
, the original version is not saved.
Per default the original file, which might be very big is linked into the
webpage, respectively copied when using the target option. By using
--nobig
, the original file is neither copied nor linked, as long as a
medium sized file exists; this is very handy for websites.
Per default, every file must have a comment, using --nocomment
you remove
this obligation (see examples in combination with --nomodify
).
STRING
configuration name
It is possible to save different configuration (i.e. which files are skipped, order, comments...). The configuration name can only contain small caps letters, the default is... 'default'.
Yep, with this one, you can have a lot of debug messages.
As described for the backup option, per default, the original file is saved
before any modification. Per default as well, a backup is made or kept if the
file is deleted. Using --delorig
, you can completely wipe out files, without
any remaining backup. Your choice.
Per default, each file is displayed, so that you can see what you are doing.
With --nodisplay
, nothing is shown, which can spare time (especially if
you use a file browser in parallel).
STRING
email of the author
Just give your email address, like --email='first@last.org'
.
This information will
be used for the creation of the webpages. See also the author option.
Per default, asb will output all extra information it can automatically
gather from certain items (especially EXIF information from JPEG files).
With --noextra
, this extra information is not given.
Per default, unmodified files are not re-processed; you can force re-processing of all files with this option. A similar effect is obtained when the script asb is modified. This means that output files are recreated.
INTEGER
frames per second
The films of my Canon Ixus v3 have 15fps, which is not an accepted standard for MPEG1 or 2 films, therefore I re-sample them to 24 fps. But if you prefer another rate, you can use this option.
Some short reminders...
INTEGER
minimum size for medium file creation
Medium sized files are only created if the original file is bigger than this size in KB. The default is 200KB.
INTEGERxINTEGER
geometry of medium sized image
If a medium image needs to be created, it will have maximum this size. The default is 800x800, which means that no dimension will be bigger than 800 (e.g. a file of 1200x1600 will be reduced to 600x800).
Per default, you can modify files (edit, rotate, delete, skip, etc...). With --nomodify, you can do this only for images that have not yet been commented.
If the option is set (the default), new directories are processed, if unset, they are just ignored.
mm stands for MultiMedia, and means MPlayer and MjpegTools. set --oldmm if you have MPlayer 0.9.2 and mjpegtools 1.6.0 and --nooldmm (the default) if you have MPlayer 1.0pre3 and mjpegtools 1.6.2. For other versions, you'll need to try, but obviously mixing is not possible.
CLASS_NAME
output class to be used
Give here the output class which should be used, generally ASB::Out or a children of it (e.g. ASB::Out::Template for the Template::Toolkit based output).
TEMPLATE_SET
set of templates to be used
if you have chosen the output class ASB::Out::Template (with the option --output), you can use this option to select which set of templates should be used.
DIRECTORY
where to find the templates
if you have chosen the output class ASB::Out::Template (with the option --output), you can use this option to select where ASB should search for the template set and other related files.
Per default, ASB ignores directories which contain an index.html
or
index.htm
which is not from itself (i.e. doesn't contain a meta generator
specific to ASB). Using --overwrite-index, you make ASB also proceed
directories with such files (with the risk to overwrite index.html
).
Top-directory webpages have per default a reference to their parent directory
if it contains an index.html
file.
Using --noparent
this reference is in all cases not generated.
Quick ident uses mostly file extensions to detect the file type, it's not
fully error prone but quite OK in most cases, and a lot faster than proper
detection (hence it's the default).
Use --noquick-ident
to be really sure, and really slow.
You can decide to save changes to the files after each file modification, or only at the end of the modification phase. The default is to save after each item.
During processing of the files, you can decide to skip a certain file, and
this decision is normally respected: you won't be asked anymore about this
file (as long as you work under the same configuration name, see option
config). Using --noskip
, you'll see again all the files and can change
your decision.
DIRECTORY
target directory
By using this option, you can create webpages, medium and thumbnail files in
another directory than the original one; without the --nobig
option, the
original files are also copied to the new directory. Take care that the
end-directory is relative; if you call:
asb --target=/home/user/public_html Images
the end directory will be /home/user/public_html/Images
.
INTEGERxINTEGER
geometry of thumbfiles
Thumbnail images that are not created out of the EXIF information will have this size. The default is 100x100, which means that no dimension will be bigger than 100 (e.g. a file of 1200x1600 will be reduced to 75x100).
+p|+n
TV Norm
This is the TV Norm your films are. For non-standard films, as created by my
Canon Camera, the mjpegtools are not able to guess the standard used.
Possible values are +p
for PAL (default) and +n
for NTSC.
The simplest command, in order to process the sub-directory pics
in the
current directory:
asb
Process the directory Image
without extra information:
asb --noextra Image
A good one to create a Website (the original pictures are not copied, you can put specific comments and skip private pictures you don't want to publish) is:
asb --config=web --nobig --target=/home/user/public_html Pictures
With the following command, you get a new chance to process formerly skipped files, all index.html files will be recreated, but you will get only the files to modify that do not have yet a comment, everything for the current directory:
asb --noskip --force-change --nomodify .
And using the --nocomment
switch, you can recreate the webpages without
being bothered by any question (even if certain files or directories don't
have a comment):
asb --force-change --nomodify --nocomment .
During the modification phase, you can enter the shortest possible combination for the command to be unique (in small and big caps): e.g. 'c', 're', 'ro' (and everything in between) for COMMENT, RENAME and ROTATE.
Put HTML code in your comments and they will be represented in the index.html.
I would recommend to have most of the following commands (together with the variables you might want to modify if your utilities are placed otherwise):
jpeg
, or libjpeg
or libjpeg-progs
$JPEGTRAN = '/usr/bin/jpegtran';
$JHEAD = '/usr/bin/jhead';
Those commands are slightly less critical than all the other ones. I would still
recommend to have jhead
and either exif
or exiftags
.
ImageMagick
package$MOGRIFY = '/usr/bin/mogrify'; $IDENTIFY = '/usr/bin/identify'; $DISPLAY = '/usr/bin/display'; $CONVERT = '/usr/bin/convert';
$IMAGEEDITOR='/usr/bin/gimp';
But it can be as well any of your favorite image editor.
MPlayer
package$MPLAYER = '/usr/bin/mplayer'; $MENCODER = '/usr/bin/mencoder';
For the SuSE distribution (and perhaps others), the standard package doesn't
fit as it doesn't contain mencoder
. Therefore compile yourself your package
or use the package from http://packman.links2linux.de
transcode
package (ffmpeg
is required as plugin)$TRANSCODE = '/usr/bin/transcode';
mjpegtools
package$MPLEX = '/usr/bin/mplex'; $LAVADDWAV = '/usr/bin/lavaddwav';
This is AnotherScrapBook A.04.01.06 (2006-04-09)
Eric Lavarde <asb@zorglub.s.bawue.de>
Based on AutoScrapbook 3.7 (Jan 23, 2003), program written by Kirk Bauer <kirk@kaybee.org>
Thanks a lot as well to Ben Edgington for his introduction to ``film-making'' under http://www.edginet.org/techie/linux/canon_movies.html.
It is distributed under the MIT license, which basically says that you can do anything you want with this problem (even commercial activities) for free, as long as you give the authors credit for the program.
This is free software. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#####################################################################
Copyright (c) 2003 Kirk Bauer, 2005 Eric Lavarde
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ``Software''), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#####################################################################
For more information, please visit http://asb.sf.net/.
It is the first file for which ASB is looking when starting. In this file
all the options described above can be defined (in the form option = value
,
use 0 and 1 as possible values for boolean options), as well as basedir
,
libdir
and confdir
(which can also be predefined using the environment
variables ASBBASEDIR
, ASBLIBDIR
and ASBCONFDIR
; in this last case,
the file will be searched under ASBCONFDIR/asbrc
).
In each processed directory, the following directory and files are created:
One directory per configuration, each containing the following files:
A text file containing all the information concerning the file named <FILE>.
A text file containing all the information concerning the current directory.
A text file containing a list of the items (sub-directories and files) contained in the current directory, and the order in which they should be processed. This file must be edited manually to change this order. New items are added at the end of the list.
This is the directory where all the original files are backuped.
This is the directory where thunbnail and medium files are created.
The webpage created by asb.
All the commands in the DEPENDENCIES section, the ASB::Out::Template(1) manpage.
See BUGS file.
AnotherScrapBook- |