Browse Source

updated the README (added a how to use the tools), finetuned the tools

master
manetta 5 years ago
parent
commit
989a5472ed
  1. 29
      README.md
  2. 18
      addcomments.sh
  3. 13
      readcomments.sh

29
README.md

@ -1,31 +1,44 @@
# EXIF-image-commenter # 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 * exiftool
* chafa / feh * chafa / feh
### Install exiftool ### Install exiftool
$ sudo apt install exiftool `$ sudo apt install exiftool`
### Install chafa ### Install chafa
<https://hpjansson.org/chafa/> <https://hpjansson.org/chafa/>
<https://github.com/hpjansson/chafa/> <https://github.com/hpjansson/chafa/>
$ sudo apt install chafa `$ sudo apt install chafa`
Works for Debian Buster, but not on Stretch, ... Works for Debian Buster, but not on Stretch. Doesn't work on Ubuntu 16.
Doesn't work on Ubuntu 16, ...
### Install feh ### Install feh
$ sudo apt install feh If chafa cannot be installed on your computer, you can use `feh`.
`$ sudo apt install feh`
## Authors : ## Authors :
* MB * MB
* slowrussia * slowrussia
These tools were created in the context of NOOO2! These tools were created in the context of NOOO2!

18
addcomment.sh → addcomments.sh

@ -1,20 +1,26 @@
#!/bin/bash #!/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 ... # First display the image ...
# Check if Chafa is installed, otherwise use feh # Check if Chafa is installed, otherwise use feh
# To install feh: $sudo apt install feh
if ! [ -x "$(command -v chafa)" ]; then if ! [ -x "$(command -v chafa)" ]; then
feh $f feh $1/$f
else else
chafa $f chafa $1/$f
fi fi
# Then read the current comment of this image ... # 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" echo "Currently this image is described as: $CURRENT"
# Ask if the comment should be changed ... # Ask if the comment should be changed ...
@ -29,5 +35,5 @@ for f in *; do
# Save the new comment into the exif data # Save the new comment into the exif data
exiftool $f -overwrite_original -Comment="$comment" exiftool $1/$f -overwrite_original -Comment="$comment"
done done

13
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
Loading…
Cancel
Save