Good topics.

This (link below) is a file that I didn't write,
but I use various versions of quite often.  It
processes backwards in the directory structure.

http://www.mflan.com/temp/dirproc.txt

I would like to hear about other techniques also.

I wonder if you could modify the files in place
while running through this script.  You probably
can, but I never do.


Mike



On 9/25/2012 2:34 AM, Russell L. Harris wrote:
* G. Wade Johnson <[email protected]> [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
_______________________________________________
Houston mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/houston
Website: http://houston.pm.org/


_______________________________________________
Houston mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/houston
Website: http://houston.pm.org/

Reply via email to