home | list info | list archive | date index | thread index

[OCLUG-Tech] looking for perl(?) script to convert list of URLs to PDF files

  • Subject: [OCLUG-Tech] looking for perl(?) script to convert list of URLs to PDF files
  • From: "Robert P. J. Day" <rpjday [ at ] crashcourse [ dot ] ca>
  • Date: Wed, 26 Sep 2012 15:43:26 -0400 (EDT)
  at the risk of sounding lazy, i'm hoping someone can just hand me a
short (probably perl) script to do the following, since it's a long
time since i've played in perl.

  i have a text file containing over 100 URLs (one per line), and i
want to produce that many PDF files of those URL pages, with output
filenames simply 1.pdf, 2.pdf and so on -- that numbering is
required.

  only possible issue is that, *occasionally*, a list entry won't be a
URL but will have to be an obvious placeholder that i can choose --
say the line "SKIP" -- that will still represent a line that must be
numbered, but should produce no corresponding output PDF file.  (IOW,
occasionally, the list of output files will jump from, say, 64.pdf to
66.pdf because line 65 contained the word "SKIP").

  for anyone who knows perl, i'm sure this will be trivial given the
right perl module.  if anyone can help me out, i would be grateful to
the extent of a beer or three, or something along those lines.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================