-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Fow is a command line tool for an image file processing workflow. It gives support for image loading from camera card, renaming image files, location tagging from track files, organizing images in projects up to export the final images to defined destinations. Fow offers single commands to replace stupid drag'n drop steps, but fow doesn't offer commands for workflow steps you can better do with existing tools (for instance developing images with darktable).
Fow is written in Python 3.5 for Linux based systems. There is a deb file you can direct install on your Ubuntu bases system or you can compile the source for any other Linux derivate. Fow mandatory needs following installed components on your computer:
- Python
- exiv2
- exiftool
- rsync
Fow is structured in a single folder system, placed every where you want. There can be multiple fows on your system. Fow supports a workflow based processing by having a command for those workflow steps, no better tools exists ;-) Fow is stateless, and doesn't store any step status. There is no undo mechanism, but every modifying command has a 'test' option. A blank new fow directory structure will look like this:
- myFowDir
- .fow
- 00_Inbox
- jpg
- raw
- video
- 01_Import
- jpg
- raw
- video
- 02_Progress
The directory 02_Progress holds your projects, images will be sorted in. As an example, the directory could look like this:
- 02_Progress
- family
- summerHoliday2017
- calendar
- forGrandma
- forMe
- weekly
- week01
- week02
- family
A project directory has a fixed structure and constists of five sub directories:
- week01
- final
- jpg
- raw
- video
- work
A good way to understand fow is to understand the workflow process. Look at this overview:
There is a deep dive into the workflow on my Blog (German).
All commands at a glance: fow commands:
- backup - save the fow to an external directory
- config - show and change settings of the fow. A setting is a key value pair.
- exif - Set or show EXIF values for final images of the actual task
- export - Copy final images to external destinations for the actual task
- gps - add gps locations from gpx files
- help - This help. Use "help " for a specific command help
- init - Creates new fow in the actual directory
- load - Loads images from external destinations into 00_Inbox.
- rename - Move and rename files from 00_Inbox to 01_Import.
- show - reporting for processing steps
- task - manage a fow's task
Now, let's take a look at the help pages of every single commands.
NAME
init - Creates new fow in the actual directory
SYNOPSIS
init [<options>] creates fow, if it doesn't exists.
OPTIONS
-f, --force
Delete existing fow directories before creating new one
NAME
config - show and change settings of the fow. A setting is a key value pair.
SYNOPSIS
config [<options>] [<key> [<value>]] config: List all items. Same as 'config --list' config <key> None: Set value to 'None'
DESCRIPTION
The command shows or changes settings of the fow. A setting is a key value pair.
OPTIONS
-l [<key>], --list [<key>]
lists all settings or setting for a specific key
-s <key>=<value>, --set <key>=<value>
Set or create this item.
-d <key>, --delete <key>
Delete this item.
NAME
load - Loads images from external destinations into 00_Inbox.
SYNOPSIS
load [<options>] <destination|path>
load destination
Copy all images from the logical destination 'load.<destination>'. The destination must exists. It can be set with the config command. Existing files
in 00_Inbox will not be overwritten, but can be forced with option -f. The destination must be set with the config command and must be prefixed with
'load.'. But the destination key may not have leading 'load.' when using this with load. For instance:
fow config --set load.f=/media/f
fow load f
OPTIONS
Options:
--force, -f
Overwrite existing files in the destination.
--test, -t
Dry run. Just test the load and report the result. In column one, list for image, if it will be overwritten (o), or (+) for a new image in the destina‐
tion. Nothing will be changed.
--path <path>, -p <path>
Load to the give path instead of using a logical destination
--move -m
Moves the images instead of copy them.
--verbose, -v
Prints more information.
NAME
rename - Move and rename files from 00_Inbox to 01_Import.
SYNOPSIS
rename [options] Moves an renames every file.
DESCRIPTION
Images (JPGs, RAWs and videos) will be renamed by their exif information to %Y%m%d-%H%M%S-:basename: where basename is the old name. If there are no
exif timestamp available, the file will just moved and not renamed. The files may not exists in the destination dirs. To overwrite existing files use
the --force option.
OPTIONS
--force, -f Overwrite existing files without warning.
--test, -t Dry-run. Does nothin, just print output.
--verbose,-v Print out more information.
NAME
show - reporting for processing steps
DESCRIPTION
Processing steps are stored in the subfolder 00_INBOX, 01_IMPORT and 02_PROCESS.With show, a summary or report can be printed.
SYNOPSIS
show [in|inbox|import] [options]
Report images in corresponding directory for inbox (00_INBOX), import (01_IMPORT) or both together ('in'). Without an option, every image will be
listed with it's name in the second column. The fist columns shows character based information for the image: j: File in jpg-folder r: File in raw-
folder v: File in video-folder t: Image a Text g: Image has geo locations If there is a text, it will be shown after the image name (third column). For
the --short, just a single line summary will be show.
show tasks [options]
Reports of all existing tasks in 02_PROCESS. Without an option, every image will be listed with it's name in the second column. The fist columns shows
character based information for the image: f: File in final-folder j: File in jpg-folder r: File in raw-folder v: File in video-folder t: Image a Text
g: Image has geo locations If there is a text, it will be shown after the image name (third column). For the --short, just a single line summary will
be show.
OPTIONS
--short, -s
Just a summary instead of reporting every image.
NAME
task - manage a fow's task
SYNAPSIS
task --activate|-a name
task --create|-c name
task --fill-final|-f [--test|-t]
task -- next|-n
task --previous|-p
task --raw-import|-r [--test|-t]
task [--short|-s|--long|-l]
DESCRIPTON
Reporting and editing a task and their objects.
A task is the working unit, saved in a subdirectory of 02_PROCESS. A task can be set active, so all task manipulating commands are done on this task. The com‐
plete task name has always the structure <folder>/<name>. A task has a defined subfolder structure, that should not be changed, but additional subfolders can
be added. Subfolders for a photo task: /jpg - original jpg files /raw - original raw files /final - task output, jpg files, that can be exported /work - work‐
ing directory, for instance for gimp files The name of the taskroot can be changed without side effect.
SYNOPSIS
Usage reporting: task [--short|-s|--long|-l]
task: Reports a list with all final images of the actual task.
task --long, task -l: Reports a list with all images of the actual task.
Columns:
task --short, task -s: Reports a brief status summary of the actual task.
j (or -) - Image in jpg folder
r (or -) - Image in raw folder
f (or -) - Image in final folder
t (or -) - Final image has title. If no final image exists, title of jpg.
g (or -) - Final image has geo location. If no final image exists, geo location of jpg.
space
Image name without suffix
space
Title, if exists
OPTIONS
--create <name>, -c <name>
Creates a new task in the same folder of the actual task in 02_PROCESS/<folder_actual_task>. The task name may not exists.
--create <folder/task>, -c <folder/task>
Creates a new task in the particular subfolder of 02_PROCESS. A task has to be structured in a one-level folder path. For instance "weeklyPic‐
ture/<task>".
-a <task>, --activate <task>
Set this task as the active one.
-n, --next
Set the next task to the active one (All tasks can be listed with 'show tasks').
-p, --previous
Set the previous task to the active one (all tasks can be listed with 'show tasks').
-r, --raw-import
Move corresponding raw files for all images in jpg of the actual task, taken from 01_Import. Source and destination subfolder is /raw. Existing raws in
the destination folder are untouched. Action is independent of the final folder.
-f, -fill-final
Copy all images from jpg to final, if the image is not already there. This can be used to complete the image set in final, for not touched images. The
comparison for the image name is case sensitive, but not for the suffix. For instance final/IMG1.jpg and jpg/img1.jpg are different images, but
final/IMG1.jpg and jpg/IMG1.JPG are handled as one image.
--test, -t
Dry run, just print what would happens. Can be used for --raw-import and -fill-final.
NAME
gps - add gps locations from gpx files
SYNOPSIS
gps [<options>]
Add gps information to all images in the final directory of the actual task.
gps <destination> [<options>]
Add gps information to all images in the directory of specified destination. The destination must exists and points to an fow internal sub directory.
The destination must be set with the config command and must be prefixed with 'gps.'. But the destination key may not have leading 'gps.' when using
this with export (for instance: 'gps import_jpg'):
fow config --set gps.import_jpg=02_IMPORT/jpg
gps --path|-p <sub directory> [<options>]
Add gps information to all images in the directory within the fow. For instance 'gps 01_INBOX/jpg'.
DESCRIPTION
The gps information will be searched in gpx files of an particular folder, defined as config value with key 'gps.source'. Example: 'config -s
gps.source=/home/chris/gpsTracks'. To support a big gpx folder, the track files will be filtered by the date information in its file name. For instance, if
there is an image with create date December, 31th, 2017 (taken from exif), all gpx files with string 2017-12-31 in its file name will be filtered.
OPTIONS
--test, -t
Dry run, simulates but does not update any image files.
--force, -f
Overwrite existing gps information. If not set, images with existing gps data will be ignored.
--verbose, -v
Prints information for every image. Otherwise just a summary is printed.
NAME
backup - save the fow to an external directory
SYNOPSIS
backup [<options>] [<path>]
backup Saves fow to the external path. The past variable must be defined once with 'config -s backup.path=<ABSOLUTE_PATH>'.
OPTIONS
--path <path>, -p <path>
determines the destination path, deviating from the default path
--test, -t
test run, simulates but does not transfer any files
NAME
export - Copy final images to external destinations for the actual task
SYNOPSIS
export [<options>] <destination|path>
export destination
Copy all images in final of the actual task to the logical destination 'export.destination'. The destination must exists. It can be set with the config
command. Existing files will be overwritten. The destination must be set with the config command and must be prefixed with 'export.'. But the destina‐
tion key may not have leading 'export.' when using this with export. For instance:
fow config --set export.local=/home/chris/exported_images
fow export local
OPTIONS
Options:
--force, -f
Overwrite existing files in the destination.
--test, -t
Dry run. Just test the export and report the result. In column one, list for image, if it will be overwritten (o), or (+) for a new image in the desti‐
nation. Nothing will be changed.
--path <path>, -p <path>
Export to the give path instead of using a logical destination
NAME
exif - Set or show EXIF values for final images of the actual task
SYNOPSIS
exif [--title <value>] [--description <value>] [--author] [--force] [--verbose] [<image>|<image nr>|all]
exif [--verbose] [<image>|<image nr>|all]
With the first command, EXIF values will be set. It must set at least on tag (title, description or author). With the second command, the EXIF tags can be shown.
The command just handles image files (jpg) in the final directory of the actual task. By the last parameter, the files will be selected: A particular file name with <image>, the number of
the file, ordered like 'fow task' with <image nr> or 'all' to select all images. Without this parameter, theq first image is choosen (same as '1').
For '--author', the config value 'exif.author' must exists. It can be set with the config command. The placeholder '{YYYY}' can be used to set the actual year, e. g. for a copyright.
Only empty exif values will be set. To overwrite values, [--force] must be used.
OPTIONS
Options:
--title, -t <value>
Set the title with the given text (use ' ' to enclose more-word texts).
--description, -d <value>
Set the description with the given text (use ' ' to enclose more-word texts)..TP
--author, -a
Set the author with the text from the given config value 'exif.author'.
--check, -c <value>
Dry run; just output what would be done.
--force, -f
Overwrite existing exif values.
--verbose, -v
Print also an info for untouched/unset tags.