I like to have a backup of my blog on my notebook, so that I can run searches in it when I am not connected.
Blogspot has nice URLs for each post - e.g.
http://ajayshahblog.blogspot.com/2007/03/how-to-make-email-to-blogger-work.htmlis the URL for a post that I wrote on making email -> blogger (mostly) work. This suggests a file system where there are directories
2007/03and then a file
2007/03/how-to-make-email-to-blogger-work.html, which would be a case of nice software engineering.
How would I make a personal file system which mirrors my blog which has this structure? I'm unable to do this. I tried to use wget with recursive get options and it gets lost. A key feature that I want is to be able to say wget -c so that modified posts are picked up (but all posts are not brought down).
Right now, I have a simple and dumb solution: I take one file per month, and I fetch the whole thing every time (which is wasteful of resources for google). I use this script:
#!/bin/sh rm -f *.html *.text for year in 2005 2006 2007 ; do for month in 01 02 03 04 05 06 07 08 09 10 11 12 ; do wget "http://ajayshahblog.blogspot.com/"$year"_"$month"_01_archive.html" links -dump "http://ajayshahblog.blogspot.com/"$year"_"$month"_01_archive.html" > $year$month.text done done
This works, but it's not a nice solution: (a) I'm wasting bandwidth and google's resources - and the waste will grow as the years go by - and (b) It doesn't get me the clean well organised file system with nice file names that ought to be possible.