Automated gallery/portfolio Printing

6 views
Skip to first unread message

Scott B

unread,
Feb 11, 2013, 10:51:23 PM2/11/13
to hackerspac...@googlegroups.com
We have just received a new graphics package for our BMS system - its a folder containing many hundreds of small images sorted in the various sub folders... 

It is a rather painful exercize to manually look through them to see what is in there, so it would be great if there was some easy way to simply print every image (along with its path and name) in to a portfolio (multiple images to a page, most are only icon sized - I can then hand it around so all our tech's can flick through it to make them aware of what is available - and also allow me to find them quickly by looking at a printed copy rather than hidden folders.

anyone got any ideas how I can achieve this? Perhaps IrfanView has a batch open/compile/print function? Or can I drop them all in to a word document and auto sort them somehow?

Kim Hawtin

unread,
Feb 11, 2013, 10:59:02 PM2/11/13
to hackerspac...@googlegroups.com
On Tue, Feb 12, 2013 at 2:21 PM, Scott B <solar....@gmail.com> wrote:
> We have just received a new graphics package for our BMS system - its a
> folder containing many hundreds of small images sorted in the various sub
> folders...

> anyone got any ideas how I can achieve this? Perhaps IrfanView has a batch
> open/compile/print function? Or can I drop them all in to a word document
> and auto sort them somehow?

there are auto index to html page apps, then print the page out...
i've written a few over the years, there must be much better ones out there now.

regards,

kim
--
"Art without engineering is dreaming; engineering without art is
calculating." --SKR

Kim Hawtin

unread,
Feb 11, 2013, 11:00:34 PM2/11/13
to hackerspac...@googlegroups.com
On Tue, Feb 12, 2013 at 2:29 PM, Kim Hawtin <kimh...@gmail.com> wrote:
> On Tue, Feb 12, 2013 at 2:21 PM, Scott B <solar....@gmail.com> wrote:
>> anyone got any ideas how I can achieve this? Perhaps IrfanView has a batch
>> open/compile/print function? Or can I drop them all in to a word document
>> and auto sort them somehow?
>
> there are auto index to html page apps, then print the page out...

https://duckduckgo.com/?q=automatic+image+gallery+generator

cheers,

Paul Schulz

unread,
Feb 11, 2013, 11:23:01 PM2/11/13
to hackerspace-adelaide
What about something like the following in perl..

----
#!/usr/bin/perl

@files = `find . -type f`;
for my $file (@files) {
  print "<img src=\"$file\"> - $file<br/>\n";
}
----

- Run it at the top of the directory and pipe the output to a file (.html)
- View it in a browser, and send to the printer.
- Adjust script as appropriate.



--
You received this message because you are subscribed to the Google Groups "HackerSpace - Adelaide, South Australia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hackerspace-adel...@googlegroups.com.
To post to this group, send email to hackerspac...@googlegroups.com.
Visit this group at http://groups.google.com/group/hackerspace-adelaide?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



Paul Schulz

unread,
Feb 11, 2013, 11:23:37 PM2/11/13
to hackerspace-adelaide
Hmm. might need a 'chomp $file' after the 'for' line.

Ken

unread,
Feb 11, 2013, 11:36:53 PM2/11/13
to hackerspac...@googlegroups.com
Small point, but its cleaner with:

      print "<img src='$file'> - $file<br/>\n";

\" all over the place makes for harder to read code.

-Yeah, being pedantic, but...

Ken.

Paul Schulz

unread,
Feb 11, 2013, 11:43:45 PM2/11/13
to hackerspace-adelaide
Is that HTML complient though?

Scott B

unread,
Feb 11, 2013, 11:45:20 PM2/11/13
to hackerspac...@googlegroups.com, pa...@mawsonlakes.org
Sadly you lost me a perl... - I'm a mechanical/electrical guy, the only software I know is self taught and 90 based - pic's commodore 64's and the like =(
To unsubscribe from this group and stop receiving emails from it, send an email to hackerspace-adelaide+unsub...@googlegroups.com.

Scott B

unread,
Feb 11, 2013, 11:47:29 PM2/11/13
to hackerspac...@googlegroups.com
thanks, downloading one of the programs now... if you don't hear from me in the next 30 minutes, then I have probably taken the company network down with some Malware.

ZIEBARTH Matthew

unread,
Feb 11, 2013, 11:50:18 PM2/11/13
to hackerspac...@googlegroups.com

Scott.  I can help you out if yiu want.

To unsubscribe from this group and stop receiving emails from it, send an email to hackerspace-adel...@googlegroups.com.

Ken

unread,
Feb 11, 2013, 11:50:40 PM2/11/13
to hackerspac...@googlegroups.com

Scott B

unread,
Feb 11, 2013, 11:56:41 PM2/11/13
to hackerspac...@googlegroups.com
Matt, Bring a USB stick with you tonight if you have one handy... I'll take you up on that if I don't get it done before you get here.

Downloaded egg - easy gallery generator, but it looks like it only handles jpg's, mine are all png's and jif's

maybe a batch convert with ifranview will still get the job done.

To unsubscribe from this group and stop receiving emails from it, send an email to hackerspace-adelaide+unsubscrib...@googlegroups.com.

To post to this group, send email to hackerspac...@googlegroups.com.
Visit this group at http://groups.google.com/group/hackerspace-adelaide?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Tim Parkinson

unread,
Feb 12, 2013, 12:09:27 AM2/12/13
to hackerspac...@googlegroups.com
Picasa has  "Print Contact Sheet" function. Just load up the folder and go Folder > Print Contact Sheet. You can change how many pictures per page etc.


“In the arts of life man invents nothing; but in the arts of death he outdoes Nature herself, and produces by chemistry and machinery all the slaughter of plague, pestilence, and famine.”

-George Bernard Shaw


To unsubscribe from this group and stop receiving emails from it, send an email to hackerspace-adel...@googlegroups.com.

Kim Hawtin

unread,
Feb 12, 2013, 12:20:49 AM2/12/13
to hackerspac...@googlegroups.com
On Tue, Feb 12, 2013 at 3:26 PM, Scott B <solar....@gmail.com> wrote:
> maybe a batch convert with ifranview will still get the job done.

this one liner should get you close;

perl -MFile::Find -e 'print "<html><body><ul>\n"; \
find({wanted => sub{ if (m/\.(jpg|gif|tif)/i) { \
print "<li><a href=\"$File::Find::name\"><img width="100"
height="100">src=\"$File::Find::name\">$File::Find::name</a></li>
\n"}}}, "."); \
print "</ul></body></html>\n"' > gallery.html

basically use the find() function[1] to get all the files in the
rcurrent directory,
check with an if (m//i) of this file matches an "image" type of file,
then print it out with some nasty html



cheers,

kim

[1] http://search.cpan.org/dist/perl/lib/File/Find.pm

Scott B

unread,
Feb 12, 2013, 12:46:12 AM2/12/13
to hackerspac...@googlegroups.com
where do I stick said one liner? my commodore 64 doesn't seem to be liking it ;)

Ifran/egg has done a rough enough job for now - just over 1000 thumb nails printed on to about 30 pages.

Sadly they had to loose the tree structure in the process, and gif>jpg>resize to 150x150 has done some nasty things to some of them given some started as 10x10 pixels and some are  more like 1000x600.
Reply all
Reply to author
Forward
0 new messages