summaryrefslogtreecommitdiff
path: root/workflow.pl
diff options
context:
space:
mode:
authorFranck Cuny <franck.cuny@gmail.com>2013-09-28 15:12:03 -0700
committerFranck Cuny <franck.cuny@gmail.com>2013-09-28 15:12:03 -0700
commit3b95d4aec6334b0e18eed433120fd549eaa5fa36 (patch)
treedc849b8a5e5414cda9bd7836a7b356f4948015c1 /workflow.pl
downloadcpan-explorer-3b95d4aec6334b0e18eed433120fd549eaa5fa36.tar.gz
import cpan-explorermaster
Diffstat (limited to 'workflow.pl')
-rw-r--r--workflow.pl41
1 files changed, 41 insertions, 0 deletions
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';
+