blazar has asked for the wisdom of the Perl Monks concerning the following question:
I personally believe that this morning I must be even more dumb than usual, because I seem to be completely unable to find a supposedly simple but not entirely trivial module suitable for my needs and that IMHO should be out there...
Specifically, I have some pure text chunks: code, preformatted text, ASCII art and so on. Now, for visualization purposes, I'd like not to print them to a terminal but into an HTML file, presumably within <pre> tags, but also possibly further embedded in a <div> complete with a caption, like as if it were a figure, and so on.
To put it briefly, something akin to what PM's code tags themselves do, except that I do not need the automatic wrap on long lines, which would even be annoying in my case, but that's just a detail... Of course and to put it briefly, there's nothing in this that I could not concoct up myself, but as a matter of principle it seems strange to me that there's not a module that would simply allow me to do something like:
print $t2h->add(text => $font->figify(-A => 'Hello, World!'), caption => "Text::FIGlet example, with font '$fontname +'");
I noticed I could find stuff just as complex as HTML::FromANSI which in turn looks like an overkill for what I'm really after. Thus the actual questions are:
- do such modules exist?
- Which one would you recommend?
- Which cpan search would you suggest to locate them, since I appearently couldn't find a very good one?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: [ASCII 2 HTML] Appearently unable to find simple module!
by Corion (Patriarch) on Nov 30, 2008 at 13:21 UTC | |
by blazar (Canon) on Nov 30, 2008 at 14:10 UTC | |
Re: [ASCII 2 HTML] Appearently unable to find simple module!
by oko1 (Deacon) on Nov 30, 2008 at 13:59 UTC | |
Re: [ASCII 2 HTML] Appearently unable to find simple module!
by ww (Archbishop) on Nov 30, 2008 at 14:41 UTC | |
Re: [ASCII 2 HTML] Appearently unable to find simple module!
by planetscape (Chancellor) on Dec 01, 2008 at 03:59 UTC | |
by blazar (Canon) on Dec 01, 2008 at 12:37 UTC | |
Re: [ASCII 2 HTML] Appearently unable to find simple module!
by scorpio17 (Canon) on Dec 01, 2008 at 15:30 UTC |