Sheepology Update
June 24, 2009
I finally started working on Sheepology again. I decided that the next order of business is a content management system (CMS). I have spent the last couple months working with Ellington and Jazbox here at the Naples Daily News and have developed strong feelings about these systems and consequently a vision for something better. Coupling this knowledge with my experience of Joomla and Bricolage, I think I have a pretty good idea of what a good CMS should be. (Bricolage is by far my favorite CMS, but not very friendly). And hey, Django was designed as a framework for building content management systems, so I’ve already got a good start.
In addition, the church I am attending has a strong need for a new website. I would like to use Sheepology to do that. Initially the integrated CMS will be simple so that I can get something out the door, but I do have a vision for something larger.
All that said, without thinking about it I packed away my desktop computer into my trunk to free up space on our camper’s kitchen table. Shari got a laptop and I decided that we no longer needed to have the whole desktop taking up all that space. So before I thought to commit my changes I tore it all down.
Thankfully we should close on “our” house by the end of July and all will be well.
Kindle 2
June 11, 2009
I have an opportunity to play with an Amazon Kindle 2 for a while. I’m not supposed to buy any books since it’s on the company card, but there are oodles of free books out there.
I’m a big fan of Christian Classics Ethereal Library CCEL, so I wanted to see if I could get any of their books onto this Kindle. It turns out that many if CCEL’s books are available in the online store for a nominal fee, but having been mandated not to buy anything I decided to see if I could go a different route.
I started out by downloading a PDF from CCEL and trying to convert that. That was not as easy as I thought it would be. You’re supposed to be able to send an email to a service on Amazon and have it converted, but apparently my address was not approved for that. So I installed Calibre. That actually worked pretty well. It converted the PDF to a .mobi file and then I was able to drag it onto the USB Kindle “drive.” Unfortunately, the formatting is really not that great.
It turns out that the easiest way to do this is to simply use a plain old .txt file. CCEL has .txt files for everything so I downloaded one (Eusebius’ Ecclesiastical History) and stuck it on the Kindle. Really bad formatting. No biggie because it’s just a .txt file. I can mangle it all I want with Python or Perl. So I put this little script together and it makes a very readable book on Kindle.
#!/usr/bin/env python
import re,sys
for line in file( sys.argv[1] ):
if re.match('\s+$',line):
print '\n'
else:
# shrink strings of spaces to one
line = re.sub('[ ]+',' ',line).strip()
# shrink strings of repeating characters
line = re.sub(r'(.)\1{39,500}','\n'+r'\1'*40+'\n',line)
print line,