Re: Noob questions on module naming and repo organization

2021-06-24 Thread Leam Hall

On 6/22/21 8:59 PM, Leam Hall wrote:

If you assume I know nothing, you'll be pretty close to right.  :)

I'm working on an application that collates text files into a "book". It will 
also provide grade level reports and alternate output formats. I'm looking for wisdom on 
how to organize the Perl code and how to set up the git repo to reasonably replicate the 
namespaces. For reference, the current code is:

 https://github.com/LeamHall/bookbot

The namespace "Book::Collate" has been suggested. In reading the perlmod* documents, my 
plan might be an app. Unless I make the "Book::Collate" modules and then write an app 
that uses them. As an app, usage might be:

 my_app -f  --report --word-list --thumbs --latex

Assuming the a book repository like:

 my_app_repo/
   my_app.conf
     /sections    // book chapters, or sections
     /images
     /output

my_app would make a ~/reports directory (or other, as specified in the 
config_file) and write grade level reports (by section, and by grade) to that 
directory. Because of the --word-list it would also write a file that listed 
words that were frequently used. The --thumbs would make it go into ~/images 
and make a thumbnail image for any image file in the directory. (Useful for web 
pages and listing books on Amazon). It would produce LaTeX and text (default) 
output in ~/output.

So, write modules like this:

 Book::Collate
 Book::Collate::Report
 Book::Collate::Thumbnails
 Book::Collate::LaTeX
 Book::Collage::WordList

and then a app that pulls it all together? Should all the above be one 
repository, or one per namespace? They are tightly coupled, so you couldn't use 
Book::Collate::Report without Book::Collate.

I'd appreciate your help getting this right.

Thanks!



I've gotten some good advice in private e-mail, so the plan is being refined. 
I'm also studying the perlmod* docs for guidance. So far the solution seems to 
be:

Modules:
  Book::Collate
  Book::Collate::Report
  Book::Collate::Thumbnails
  Book::Collate::LaTeX
  Book::Collage::WordList

Application:
  App::BookBot// Or something like that.

I've also gotten a copy of Cross' "Data Munging With Perl"; good stuff! It's 
helping me refine my thought processes. I do need to figure out the data structures, 
since the modules will each use them, and someone might not have a module installed.

Leam

--
Systems Programmer (reuel.net/resume)
Scribe: The Domici War (domiciwar.net)
General Ne'er-do-well  (github.com/LeamHall)



Noob questions on module naming and repo organization

2021-06-22 Thread Leam Hall

If you assume I know nothing, you'll be pretty close to right.  :)

I'm working on an application that collates text files into a "book". It will 
also provide grade level reports and alternate output formats. I'm looking for wisdom on 
how to organize the Perl code and how to set up the git repo to reasonably replicate the 
namespaces. For reference, the current code is:

https://github.com/LeamHall/bookbot

The namespace "Book::Collate" has been suggested. In reading the perlmod* documents, my 
plan might be an app. Unless I make the "Book::Collate" modules and then write an app 
that uses them. As an app, usage might be:

my_app -f  --report --word-list --thumbs --latex

Assuming the a book repository like:

my_app_repo/
my_app.conf
/sections   // book chapters, or sections
/images
/output

my_app would make a ~/reports directory (or other, as specified in the 
config_file) and write grade level reports (by section, and by grade) to that 
directory. Because of the --word-list it would also write a file that listed 
words that were frequently used. The --thumbs would make it go into ~/images 
and make a thumbnail image for any image file in the directory. (Useful for web 
pages and listing books on Amazon). It would produce LaTeX and text (default) 
output in ~/output.

So, write modules like this:

Book::Collate   
Book::Collate::Report
Book::Collate::Thumbnails
Book::Collate::LaTeX
Book::Collage::WordList

and then a app that pulls it all together? Should all the above be one 
repository, or one per namespace? They are tightly coupled, so you couldn't use 
Book::Collate::Report without Book::Collate.

I'd appreciate your help getting this right.

Thanks!

Leam



--
Systems Programmer (reuel.net/resume)
Scribe: The Domici War (domiciwar.net)
General Ne'er-do-well  (github.com/LeamHall)