From: Mischa POSLAWSKY Date: Wed, 17 May 2017 09:45:52 +0000 (+0200) Subject: sample: html wrapper for unicode text file X-Git-Tag: v1.11~77 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/87cefe5b2565b86fdfb3404b4ed9c180282f0272 sample: html wrapper for unicode text file --- diff --git a/Makefile b/Makefile index 64e034b..0dbde30 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all: sitemap.xml data/digraphs.inc.pl data/unicode-cover.inc.pl data/countries.inc.pl data/browser data/termcol-xcolor.inc.pl more: all data/digraphs-xorg.inc.pl -download: data/DerivedAge.txt data/rfc1345.txt data/xorg-compose data/countryInfo.txt data/browser/caniuse data/browser/usage-wm.tsv data/xcolors +download: data/DerivedAge.txt data/rfc1345.txt data/xorg-compose data/countryInfo.txt data/browser/caniuse data/browser/usage-wm.tsv data/xcolors data/unicode-sampler .PHONY: download sitemap.xml: tools/mksitemap @@ -40,6 +40,11 @@ data/unicode-char.inc.pl: tools/mkcharinfo data/digraphs-rfc.inc.pl data/digraph data/font/%.inc.pl: tools/mkttfinfo data/font/%.ttf $< $(word 2,$^) $@ || true +data/unicode-sampler: + @echo git pull or clone $@ + @[ -r $@/.git ] && cd $@ && git pull --ff-only || true + @[ -e $@ ] || git clone git://git.shiar.nl/unicode-sampler $@ + data/xcolors/themes: data/xcolors data/xcolors: @echo git pull or clone $@ diff --git a/sample.plp b/sample.plp new file mode 100644 index 0000000..7f8b636 --- /dev/null +++ b/sample.plp @@ -0,0 +1,20 @@ +<(common.inc.plp)><: + +Html({ + title => "unicode sampler", + version => '2.0', + stylesheet => [qw'light dark mono red'], +}); + +open my $source, '<', 'data/unicode-sampler/unicode.txt' + or die "Could not open text: $!\n"; + +my $title = readline $source; +my $hr = readline $source; +say "

$title

"; + +say '
';
+while (my $p = readline $source) {
+	print EscapeHTML($p);
+}
+say "
\n";