From 3b95d4aec6334b0e18eed433120fd549eaa5fa36 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sat, 28 Sep 2013 15:12:03 -0700 Subject: import cpan-explorer --- workflow.pl | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 workflow.pl (limited to 'workflow.pl') diff --git a/workflow.pl b/workflow.pl new file mode 100644 index 0000000..cf2b8e1 --- /dev/null +++ b/workflow.pl @@ -0,0 +1,41 @@ +#!/usr/bin/perl + +use Term::ReadKey; + +print " .---------------------------------------------.\n"; +print " | cpan-explorer.org static content generation |\n"; +print " '---------------------------------------------'\n"; + +echo "" +echo "Step 1 - Downloading database.." +#`./download_sqlite.pl`; + +echo "" +echo "Step 2 - Manual spatialization : press any key when svg is ready" +ReadMode 4; # Turn off controls keys +while (not defined ($key = ReadKey(-1)) { + # No key yet +} +ReadMode 0; # Reset tty mode before exiting + + +print "\nStep 3 - Generating high-res PNGs..\n"; + +my $scale = 20000; +my $inputfile = 'packages.svg'; +my $outputfile = 'packages.png'; +my $rsvgpath = 'rsvg'; + +die "couldn't find $inputfile" unless -e $inputfile; +`$rsvgpath -x $scale -y $scale $inputfile $outputfile`; + +my $inputfile = 'authors.svg'; +my $outputfile = 'authors.png'; +my $rsvgpath = 'rsvg'; + +die "couldn't find $inputfile" unless -e $inputfile; +`$rsvgpath -x $scale -y $scale $inputfile $outputfile`; + +print "\nStep 4 - Generating tiles..\n"; +`./generate_tiles.pl'; + -- cgit v1.2.3