From b18f4e453ecdf3404a107f9fc72d7bd9249401d0 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 8 Apr 2012 20:44:14 +0200 Subject: add helper script to create split css files Signed-off-by: Florian Pritz --- application/libraries/contrib/process-geshi-css.pl | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 application/libraries/contrib/process-geshi-css.pl diff --git a/application/libraries/contrib/process-geshi-css.pl b/application/libraries/contrib/process-geshi-css.pl new file mode 100644 index 000000000..dbf76c294 --- /dev/null +++ b/application/libraries/contrib/process-geshi-css.pl @@ -0,0 +1,26 @@ +#!/usr/bin/perl +use warnings; +use strict; + +open INPUT, "<", "geshi.css" or die $!; + +my $last=""; + +while () { + my $line = $_; + my ($lang, $rest) = split / /; + $lang =~ s/\.//; + $lang =~ s/^_+//; + chomp $lang; + + next if ($lang eq ""); + + if ($lang ne $last) { + $last = $lang; + unlink "paste-$lang.css"; + print STDERR "processing $lang\n"; + } + open OUT, ">>", "paste-$lang.css"; + print OUT "$line"; + close OUT; +} -- cgit v1.2.3-24-g4f1b