Aren't there such tools around? I swear I saw one on
CPAN the other day, but I'm darned if I can remember
it's name or location. Have a good look and you'll
find something. Alternatively, wait a couple of weeks
and download my one when I get around to cleaning
it up and putting it on CPAN. It allows users to
use a plain text template much like yours, or select
from HTML pages with <SPECIALTAGS> surrounding the
editable regions (like a Dreamweaver template); it
can build menus too, and is all done with CGI.
Easy to write, too ;)
Anyway, when you say 'tags' do you mean your
[[ tags ]]? I used <TAGS>tags like this</TAGS>
so I could use HTML::TokeParser to do the job,
as you never know what stuff the punters will
put in their page. But if you're sure they'll
never do [[ tags ]], then just do something like:
foreach my $tag (keys %TAGNAMES){
/[[ $tag ]]((?![[).*)/;
# $_ now holds the contents of the tag, including the tag
# $1 should hold just the tag's contents
}
But I've not tested it. Wait a couple of mins
to see my reg-exs improved upon by the list ;)
hth
lee
Anyway, when you
At 15:38 09/04/2001 +0200, Joris Lambrecht wrote:
>Hi,
>
>I'm trying to create some easy way of publishing websites. I'm thinking
>about using plain-text files to parse and generate html from.
>This way non-it related people could maintain the content in an easy
>fashion.
>
>The file would look something like.
>
>[[ TITLE ]] The Title
>
>[[ subtitle ]] The Subtitle
>
>[[ body ]] The text for that article wich could contain html
>
>[[ links ]] a hyperlink section
>
>[[ refs ]] some pointers to various references
>
>
>Main problem i'm not confident on how to solve this is the TAG thing. Also,
>i find it hard to imagine there are no such toolkits around.
>
>Can anyone give me some feedback ?
>
>Thanks,
>
>Joris
>_______________________________________________
>ActivePerl mailing list
>[EMAIL PROTECTED]
>http://listserv.ActiveState.com/mailman/listinfo/activeperl
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl