make the whole xdg/dev directories /configs etc more sense making. now theres just...
[uzbl-mobile] / examples / data / uzbl / scripts / uzblcat
1 #!/usr/bin/env perl
2 # uzblcat - safely push html to uzbl
3 # See http://www.uzbl.org/wiki/html-mode
4 use strict; use warnings;
5  
6 my $html;
7 local $/;      # slurp files
8 # automagically choose to read from stdin/files/...
9 $html .= $_ for <>;
10  
11 my $endmarker = rand;
12 $endmarker .= rand() while $html =~ /^\Q$endmarker\E$/m;
13  
14 print "set base_url = $ENV{BASE_URL}\n" if $ENV{BASE_URL};
15 print << "EOS";
16 set html_endmarker = $endmarker
17 set mode = 1
18 $html
19 $endmarker
20 EOS