Appending multiple images from a folder confusion
Posted: 2016-09-19T14:38:06-07:00
I'm looking to append a bunch of comic I downloaded into one long strip and found that -append is better than compiling it to pdf as there were white lines between the images.
I'm currently using a Mac el cap, specifically automator to automate this for me as there are 200 chapters for the manga I want to append.
I am trying to make a work flow with automator so when I drag and drop the folder on to the work flow, it would append all the images and output the file into the same folder that I originally drag and drop into.
i.e. drop chapter 1 onto the work flow and the appended output should be in the chapter 1 folder.
This is what my code in automate looks like:
The error/confusion I'm getting is, I'm not able to output the file into the same folder as the original images but it's outputting at my $home folder? I tried to set a path to desktop but when it comes to processing the other chapters, it overwrites the output file. I tried to set a variable on the output filename to be sequential but I'm not good enough to make it so.
Is there a way I can fix it and still use automator to automate the work flow or do I have to manually do all 200 chapters? Thanks in advance for the helps.
I'm currently using a Mac el cap, specifically automator to automate this for me as there are 200 chapters for the manga I want to append.
I am trying to make a work flow with automator so when I drag and drop the folder on to the work flow, it would append all the images and output the file into the same folder that I originally drag and drop into.
i.e. drop chapter 1 onto the work flow and the appended output should be in the chapter 1 folder.
This is what my code in automate looks like:
Code: Select all
for f in "$@"
do
cd "$@"
/usr/local/bin/convert "$@" -append Chapter%03d.jpg
done
Is there a way I can fix it and still use automator to automate the work flow or do I have to manually do all 200 chapters? Thanks in advance for the helps.