From d421f5b3729367f8345c268adea2b0f7b8e30777 Mon Sep 17 00:00:00 2001 From: Robert Hak Date: Thu, 22 Aug 2002 03:33:33 +0000 Subject: initial creation.. file is to convert plain text to html git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1910 a1c6a512-1295-4272-9138-f99709370657 --- www/txt2html.pl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 www/txt2html.pl (limited to 'www/txt2html.pl') diff --git a/www/txt2html.pl b/www/txt2html.pl new file mode 100755 index 0000000000..8e88a4c1fa --- /dev/null +++ b/www/txt2html.pl @@ -0,0 +1,25 @@ +#!/usr/bin/perl + +# this is really a faq2html and should only be used for this purpose + +sub fixline { + $_ =~ s/\/>/g; + + $_ =~ s/(http:\/\/([a-zA-Z0-9_.\/-]*)[^\) .\n])/\$1\<\/a\>/g; + + $_ =~ s/(\\|\/)$/$1 /g; # clobber backslash on end of line +} + +while() { + fixline($_); + push @p, "$_"; +} + +print "
\n";
+print @p;
+print "
\n"; + + + + -- cgit v1.2.3