Discussion:
Fixes to nodebox web library
Stuart Axon
2010-01-27 09:16:56 UTC
Permalink
Heres, what would be my bugreport to the nodebox guys about their web library.
I probably need to get in contact with them to get any further.

------------------------------------------------------
I've put some fixes up to the web library here:
http://bitbucket.org/stuaxo/shoebot-nodebox-web/

(It's the version distributed with shoebot -
go into the lib/web folder to find it).


It works with the new morguefile URL schema and
their new XML (Atom) feed.

Other fixes are:
Save files in users directory under Windows
Jython support (useful for nodebox 2)



For thumbnails on morguefile everything is great,
however for 'large' pictures, it seems like a
newline is inserted every so often
(this is probably after or before every 'block'
that is downloaded).



To test the problem, run the following bot:


## bot start
import web

images = web.morguefile.search("leaf", max=10)
img = images[0]
img.download(wait=60, size='large')
print img.path
print img.url
image(img.path, 0, 0)

## bot end

Note the path where the file is downloaded.

Navigate to the path where the file was downloaded,
and use wget to retrieve it.

You can now use the tool VBinDiff [http://www.cjmweb.net/vbindiff/]
to compare the originally cached file and the new one,
what you'll see is that the one downloaded by the web library
has lots of extra '0D' characters in it - their the newlines.


Note:
To successfully run the bot, change the size to 'small'


Note 2:
The wikipedia example didn't seem to work for me either.

Loading...