diff --git a/README.md b/README.md index 7fa884c..cd81c85 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,44 @@ # EXIF-image-commenter -a shell script to aid the adding of EXIF comments in photographs or images of most types. +A shell script to aid the adding of EXIF comments in photographs or images of most types. + +## Use + +`sh addcomments.sh [foldername]` + +`sh readcomments.sh [foldername]` + +For example: + +`sh readcomments.sh photographs/day-1-selection/` + +## Dependencies -## Dependencies : * exiftool * chafa / feh ### Install exiftool - $ sudo apt install exiftool +`$ sudo apt install exiftool` ### Install chafa - $ sudo apt install chafa +`$ sudo apt install chafa` -Works for Debian Buster, but not on Stretch, ... -Doesn't work on Ubuntu 16, ... +Works for Debian Buster, but not on Stretch. Doesn't work on Ubuntu 16. ### Install feh - $ sudo apt install feh +If chafa cannot be installed on your computer, you can use `feh`. + +`$ sudo apt install feh` ## Authors : + * MB * slowrussia -These tools were created in the context of NOOO2! \ No newline at end of file +These tools were created in the context of NOOO2! diff --git a/addcomment.sh b/addcomments.sh similarity index 55% rename from addcomment.sh rename to addcomments.sh index 63965b8..56858d1 100755 --- a/addcomment.sh +++ b/addcomments.sh @@ -1,20 +1,26 @@ #!/bin/bash -for f in *; do +# A command line photograph EXIF comment inserter was built to annotate photo files inside the files themselves. +# The tool also comes with a reader to go through the annotations in the terminal. See readcomments.sh. +# https://git.vvvvvvaria.org/varia/EXIF-image-commenter + +# How to use it? +# $ sh addcomments.sh [foldername] + +for f in $(ls $1); do # First display the image ... # Check if Chafa is installed, otherwise use feh - # To install feh: $sudo apt install feh if ! [ -x "$(command -v chafa)" ]; then - feh $f + feh $1/$f else - chafa $f + chafa $1/$f fi # Then read the current comment of this image ... - CURRENT=$(exiftool -S -Comment $f | sed 's/[^ ]* //') + CURRENT=$(exiftool -S -Comment $1/$f | sed 's/[^ ]* //') echo "Currently this image is described as: $CURRENT" # Ask if the comment should be changed ... @@ -29,5 +35,5 @@ for f in *; do # Save the new comment into the exif data - exiftool $f -overwrite_original -Comment="$comment" + exiftool $1/$f -overwrite_original -Comment="$comment" done diff --git a/readcomments.sh b/readcomments.sh new file mode 100755 index 0000000..bf7dac5 --- /dev/null +++ b/readcomments.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# A command line photograph EXIF comment reader was built to inspect the annotations of photo files inside the files themselves. +# The tool also comes with a writing script to add the annotations to the files. See addcomments.sh. +# https://git.vvvvvvaria.org/varia/EXIF-image-commenter + +# How to use it? +# $ sh readcomments.sh [foldername] + +for f in $(ls $1); do + CURRENT=$(exiftool -S -Comment $1/$f | sed 's/[^ ]* //') + echo "$f $CURRENT" +done