My name is Maksim Yegorov. I'm the guy behind this blog. I'm studying structural engineering at UC Berkeley, but happen to have other all-consuming interests on the side. These are mostly passing distractions, but on a couple occassions they've added to my collection of degrees.
Anyway, over the course of the winter break I hacked together a bare-bones blogging engine in python. Outside the standard library, I'm using the web.py module to serve http requests and process templates. Flat-file storage is implemented with buzhug.
ц
Thank you for your Craigslist code. It saved me several hours by looking at what you have done. I ran the code on a windows computer and was having trouble with an exception being thrown, see below:
userbody=string.join(userbody.split(' ')[:DIGEST_SIZE],' ')
userbody = html2text(userbody) throws exception when </div> is trimmed off.
It appears the word size for userbody is being trimmed at 40 words. When userbody is 40 or less, there is no problem. But when userbody is greater than 40 the </div> is trimmed.
The solution is to trim userbody after html2text() has processed the html code.
Thank you for sharing your code. Hope you find a great job. BTW, I finished up Engineering 30 years and enjoy writing software.
Html2text()