[pm-h] October Houston.pm Technical Meeting

Russell L. Harris rlharris at oplink.net
Tue Sep 25 00:34:32 PDT 2012


* G. Wade Johnson <gwadej at anomaly.org> [120925 04:06]:
> The next meeting is in about 2.5 weeks on Thursday, Oct 11. 
> 
> Does anyone have a topic to present or a topic they would like to hear?

(1) I would benefit from a tutorial on the various (or just the
"best") approach to recursively operating on all the files in a
directory and its subdirectories.  It appears that the "File::..." 
modules are applicable.

(2) I also would benefit from a tutorial on use of the diamond
operator (or other approaches) to make changes throughout a file.

%%%%%%%

My motivation is the need to perform a sequence of perhaps a dozen
operations on less than a hundred text files.  The ultimate product is
a total of about a thousand files, all of which are identical in
format, but categorized in at least two directory tiers.

Specifically, I need to create for each chapter of the Bible a LaTeX
template to which a commentator may add commentary.  The template must
include the Scripture text for the respective chapter.  The total
number of templates to be produced is on the order of a thousand.  The
templates are in a directory structure, categorized by book; so it
appears to me that the task calls for recursive processing.

Some of the tasks include:

  => Parse each book file into chapter files, automatically creating
     for each chapter a filename of the form
     "<bookname>-<chapter-number>".

  => Strip from the source text assorted publisher-specific
     typographic artifacts (such as marginal notes and redundant white
     space).

  => Add markup for features such as verse numbers set in a small font.

  => Add markup for header, footer, multiple columns, page number,
     revision date, etc.

  => Standardize the spelling of proper names to either the
     Hellenistic or the Hebraic form (such as changing "Noe" to "Noah").

But I suppose that use of the diamond operator and recursion in the
context of "File::..." are a bit too elementary to be of general
interest; after all, the subjects ARE covered in "Learning Perl".

RLH


More information about the Houston mailing list