What I've written is a quick little AppleScript script that takes your currently selected text file, and "un-gutenbergizes" it. What I mean is that it removes all those senseless newlines they put into Project Gutenberg ebooks, and gives you back a text file with paragraphs that actually wrap! It's the only practical way to view ebooks on my new iPod Touch and/or Tofu on my Mac, which is an excellent text viewer and "columnifier". I've read entire books with my macbook sitting on my chest, lying down in bed, with Tofu. I think it's truly the next gen of readable ebooks, and we need an iPod/iPhone port!
For those interested in actually using the script, there are caveats since I don't really USE applescript (more on that next time!). First of all, it has a giant bug that means you must run it "indirectly". It only works if you select your file, then run it from your scripts menu on the menu bar. Double-clicking on the script file app itself and/or just dragging your text file to it does not work. Don't know why. Also, you WILL need TextWrangler installed, as that is how I automagically replace \n's with spaces and keep \n\n's the same.
As for a bullet-proof, drag-and-drop, stand-alone Cocoa app that does the right thing, that is coming soon enough. It really won't be much more coding than I used in the AppleScript, but it's more time than I have in between exam studying-periods. I wish they made a C-syntax language that let you use all the scripting hooks; I HATE AppleScript! Oh wait, they put that in Leopard with the beautiful, beautiful scripting bridge. I officially [heart] Leopard just for that! Oh, and free garbage collection too!
Also I just realized that there's no actual way to upload real FILES to a blogger.com blog, so let's just pretend I never offered a buggy AppleScript app in the first place, kay? A real developer (such as yours truly) wouldn't do that! So until I write the new code (and find a free host for my files), enjoy some nerdy science lolcats.
No comments:
Post a Comment