[pm-h] October Houston.pm Technical Meeting

G. Wade Johnson gwadej at anomaly.org
Tue Sep 25 05:23:18 PDT 2012


On Tue, 25 Sep 2012 07:34:32 +0000
"Russell L. Harris" <rlharris at oplink.net> wrote:

> * 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.

We haven't had a beginning presentation in a while. But, I can still
see some potential here.

* Recursive directory processing
  - File::Find vs File::Find::Rule vs roll-your-own

* Modifying text file
  - diamond operator, print, file name manipulation
  - Perl's in-place edit feature

* Modifying a text file
  - Changing in-place vs generating from subtexts and Template

Some of this could even be extended further given time...

Anyone else interested in this topic?

G. Wade
> 
> %%%%%%%
> 
> 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
> _______________________________________________
> Houston mailing list
> Houston at pm.org
> http://mail.pm.org/mailman/listinfo/houston
> Website: http://houston.pm.org/


-- 
When in doubt, use brute force                      -- Ken Thompson


More information about the Houston mailing list