Hi Sean, On Saturday 23 Apr 2011 11:14:46 Sean Murphy wrote: > Hi all. > > I am starting another project and I wish to know the best method of > creating a web page via Perl. I don't want to reinvent the wheel here. The > perl script must generate plain 4.0 HTML code. I am not after any bells or > whistles on the page. > > The Perl script will go through all my Audio books and group them by > author, title and titles in series. I was thinking a table with the below > columns: > > Author, Series, Title, stream, category and rating. Rating is Adult, > Junior, etc. Category is SiFi, thriller, etc. > > If the person clicks on the title, a brief description would pop-up. This > would be a text file that it would show. Stream it would send the audio > directly to the browser. > > So is there any simple modules that would achieve this? I am not after a > complex tool like the Ruby Rail project. > > the info would come from the directory structure of the audio books. I > would run the script and it would build the web pages. So the HTML pages > would be semi-static. > > Ideas and thoughts would be welcomed >
There are several solutions: 1. Template Toolkit: http://perl-begin.org/uses/text-generation/#template-toolkit The end-all and be-all of templating systems for Perl. Very powerful, but a little quirky. 2. You can also output XML and generate HTML (or XHTML) from it using XSLT. «All problems in computer science can be solved by another level of indirection;» -- http://en.wikipedia.org/wiki/Indirection 3. Also see the other resources about text-generation on the link, and if you're interested in more complex directory structures, then look at IO::All ( http://search.cpan.org/dist/IO-All/ ) and similar modules. ----- Some of these tools are complex and a bit error-prone, but they could be tamed (for example using http://search.cpan.org/dist/Template-Stash-AutoEscaping/ ). As I recently talked with a friend, I think that minimalist tools (i.e: ones that are kept minimal and useless on purpose) are not something we like, and that it's important that a tool will have a low-barrier for entry, and then have many dark corners, which users can find if they want that. But most programmers and power users want and need a lot of features. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Stop Using MSIE - http://www.shlomifish.org/no-ie/ Every successful open-source project will eventually spawn a sub-project. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/