I've created a script (very crude indeed) to download high quality scans from BNF out of a plurality of tiles. It's a python script. I've used python since it's comprehensible for me (I'm a C programmer) and as a lilypond user in a windows box (I suppose many of you are lilypond users) Python it's already installed with your lilypond installation. If you're running a linux box, then you'll probably have it installed along with the other necessary tools anyways. In any case please check.
So, what the script does is, to download a bunch of jpg tiles (being the page division user defined) and then assemble it to individual high quality pages. The tile size
is set to the resulting size of a 4X4 tiles per page as absolute (and default) minimal (you can increase the page division if you wish)
What you need to run it is: Python installed, with the paths correctly set, cURL installed with the path correctly set, and Imagemagick installed with the paths correctly set.
check: http://www.python.org/ http://curl.haxx.se/ http://www.imagemagick.org
To make it work you need first to open a directory for your piece . This is mandatory by common sense, since there will be heavy file activity and the script will delete all the downloaded tiles once it assembled the pages (it will issue the command del PAGE* so, be warned)
Then open the console and CD to your piece's directory . In a web browser, go to the gallica site and go for the document of your choice. select the max possible document zoom and point your mouse to the far bottom right zone of the image (you may need to drag the document scan to make viewable that part of the scan). Once there, right click the said image/tile and click "image properties" (or so, depending on your browser) option. In firefox a popup will apear with a link like thishttp://gallica.bnf.fr/proxy?method=R&ar ... 08,256,256
Briefly said, this command says "Hey gallica, put yerself in zoom 6 and gimme' a tile of 256X256 pixels from the Y=6144 and X=4608 coord' "
As, from some time on we can not do the trick o requesting a tile of 6144X4608 from the coordinates 0,0 anymore (as cypressdome says, it' was limited to a smaller area) we need a script that automates this task for us, and access the hi definition zoom.
Now we copy this address, write down the document pages quantity (26 in this case) and write to the command line (the double quotes are mandatory here):
- Code: Select all
getbnf -a "http://gallica.bnf.fr/proxy?method=R&ark=btv1b9009896r.f1&l=6&r=6144,4608,256,256" -p26 -o "cambiniduos2va2bk_"
That's it!! for this document in particular, it took +-30 minutes to download and assemble all (more than 400 tiles) and get a directory with 26 jpg's of +-4mB each. My internet connection is rather very slow, but I think that with connections of better bandwidth and speed the download will be more brief and expeditive.
Here is the script. Test it with few pages, and if you need more options type getbnf -h (or ask me here!)
I hope it's of some usefulness for the comunity