...making Linux just a little more fun!
[ In reference to "Automatic creation of an Impress presentation from a series of images" in LG#116 ]
Karl-Heinz Herrmann [kh1 at khherrmann.de]
Hello,
since this is a question directly related to the linux-gazette I'm CC'ing the mailinglist there (TAG).
On Mon, 24 Mar 2008 14:44:43 -0400 "Jim Shupert, Jr." <[email protected]> wrote:
> http://linuxgazette.net/116/herrmann.html
> I have the complete perl script.
be aware that recent versions of ::OODoc broke the script. A tiny correction will make it work again, see: http://linuxgazette.net/132/lg_talkback.html#talkback.02 http://www.khherrmann.de/Programs.shtml http://www.khherrmann.de/Code/img2ooImpress.pl
> 1 matter eludes me - i do not understand - > Where is the info to tell the program where to find a dir of images.
the inbuilt mini-help says:
img2ooImpress.pl Usage: img2ooImpress.pl ImageFileList [outputfile.odp] ImageFileList is a file containing all images to import
and yes, the script expects a filename containing all images, each on its own line. You can easily create a file like that by following the examples in the original linux-gazette article.
essentially, after making sure your files are sorted properly by ls something like:
ls image*.jpg > filelist
will write all jpg-images starting with "image" into the file "filelist".
running img2ooImpress.pl filelist
will then create the output odp file (default odp name, if you pass a second parameter it will be used as output file).
> i see this > my $imgFileList=shift;how is this imagefile list made? I am expecting
no -- it simply fetches the first commandline argument into $imgFileList -- and subsequently opens that file (or fails).
> to see a path to a dir of images....I have just reread your code > before sending this and Think I might understand now.the usage > img2ooImpress.pl ImageFileList [outputfile.swi]the perl prog then > a txtfile [ and this is optional? ]and then should the > imageFileList be in the same dir with the perl?
No -- you can keep the perl script in ~/bin (and add ~/bin to your PATH). Also the given file-name for the file-list can contain a full path -- so no need to have it lokal in the the same directory as the perl script OR the images.
> I wish I had an > example of this ImageFileListI see where you say : " created by 'ls > *png > file "maybe I should try thatso does the perl and images and > image list all need to be together?does imageFileList ( a text > file ) need to be in the same dir as the imagesshould this > imageFileList have paths or just a list of file names?ThanksjS
ls imgp000*jpg > filelist
filelist then contains
imgp0001.jpg imgp0002.jpg imgp0003.jpg imgp0004.jpg imgp0005.jpg
If the script produces some output (instead of complaining) see the new version for current OODoc module version. With the old script this will simply produce a seamingly empty odp file.
Kind regards,
K.-H.