summaryrefslogtreecommitdiffstats
path: root/application/libraries/contrib
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-04-08 20:44:14 +0200
committerFlorian Pritz <bluewind@xinu.at>2012-04-09 20:47:34 +0200
commitb18f4e453ecdf3404a107f9fc72d7bd9249401d0 (patch)
tree35f48f544c294ac91b328274b40334fed27d7d15 /application/libraries/contrib
parent2704dd7b04746b325eb87f9d7eaf671e9ed5e7e3 (diff)
add helper script to create split css files
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/libraries/contrib')
-rw-r--r--application/libraries/contrib/process-geshi-css.pl26
1 files changed, 26 insertions, 0 deletions
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 (<INPUT>) {
+ 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;
+}