#!/usr/bin/perl # # Copyright 2006-2009 by Jonathan Epstein (jonathan.epstein@adatshalom.net) # # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # # See http://www.perl.com/perl/misc/Artistic.html # # The author wishes to thank the WorldORT organization for its wonderful # Navigating the Bible website (bible.ort.org), and will yield copyright # to this software to WorldORT upon request. # # ----------------------------------------- # # Fetch a Torah-reader's Tikkun excerpt from the bible.ort.org website. # The resulting output is suitable for printing or for exporting to a # handheld device. # use strict; use LWP::Simple; use HTML::TokeParser; use GD; use CGI; # sample: http://bible.ort.org/books/torahd5.asp?action=displaypage&book=2&chapter=27&verse=1&portion=19 # # $outputVersion should be incremented each time the format is changed in # a manner which affects previously cached output files # my $outputVersion = 4; my $site = "http://bible.ort.org"; my $base = "$site/books/torahd5.asp?action=displaypage&book=%d&chapter=%d&verse=%d&portion=%d"; my $gifWidth = 445; my $shadingDir = "ScrollScraperalphaPNGs"; my $forbiddenFile = "forbidden-referers.txt"; my $smilFormat = "