Advice needed on bash script
Page 1 of 1
Advice needed on bash script
Hi
Just started to use this great piece of software and I was wondering if someone could help with a bash problem (new to bash scripting!)
My code is as follows:
for file in $(find /path/to/comics -type f -name '*.cbz')
do
base=$(basename $file .cbz);
id=$(echo "$base" | sed -e 's/^.*__\([0-9]*\)$/\1/');
echo "$id";
python /usr/local/bin/comictagger.py -s -t cr -m "ID=$id" -o -v $file;
done;
My comics are tagged as follows: Amazing.Spider-Man.V1963.0020__7550.cbz (i.e. the comicvine issue id always follows the double underscore).
My script parses out the comicvine issue id from the filename (this bit works) and I want to use comictagger to pull the issue metadata from comicvine.com but the error I get when I run the script is:
Warning: 'ID' is not a valid tag name
No metadata given to search online with!
If I hand comictagger other variables like :python comictagger.py -s -t cr -m "series=$name,volume=$volume,issue=$issue" -o -v $file; - this works but I would like to pass the ID each time instead
I'm running lubuntu and the latest 1.1.9 beta of comictagger
Any help would be appreciated
Great piece of software by the way!
E
Just started to use this great piece of software and I was wondering if someone could help with a bash problem (new to bash scripting!)
My code is as follows:
for file in $(find /path/to/comics -type f -name '*.cbz')
do
base=$(basename $file .cbz);
id=$(echo "$base" | sed -e 's/^.*__\([0-9]*\)$/\1/');
echo "$id";
python /usr/local/bin/comictagger.py -s -t cr -m "ID=$id" -o -v $file;
done;
My comics are tagged as follows: Amazing.Spider-Man.V1963.0020__7550.cbz (i.e. the comicvine issue id always follows the double underscore).
My script parses out the comicvine issue id from the filename (this bit works) and I want to use comictagger to pull the issue metadata from comicvine.com but the error I get when I run the script is:
Warning: 'ID' is not a valid tag name
No metadata given to search online with!
If I hand comictagger other variables like :python comictagger.py -s -t cr -m "series=$name,volume=$volume,issue=$issue" -o -v $file; - this works but I would like to pass the ID each time instead
I'm running lubuntu and the latest 1.1.9 beta of comictagger
Any help would be appreciated
Great piece of software by the way!
E
ethelfrith- Posts : 2
Join date : 2013-05-23
Re: Advice needed on bash script
Finally found the answer,
replaced this line: python /usr/local/bin/comictagger.py -s -t cr -m "ID=$id" -o -v $file;
with this line: python /usr/local/bin/comictagger.py -s -t cr -o --id="$id" -v $file;
works great now!
replaced this line: python /usr/local/bin/comictagger.py -s -t cr -m "ID=$id" -o -v $file;
with this line: python /usr/local/bin/comictagger.py -s -t cr -o --id="$id" -v $file;
works great now!
ethelfrith- Posts : 2
Join date : 2013-05-23
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|