April 9th, 2006

  • evan

kanji worksheets

I finally got around to using that kanji database dump to generate worksheets: low-tech paper output. My plan is to read them on the train.

Here's a sample page [59kb gzipped postscript].

(Obligatory tech stuff: Debian's Cairo packages were built without the PS support 'cause it's still experimental, which means I had to rebuild Cairo myself. And then I had to rebuild Ruby/Cairo. And then I had to rebuild SQLite because the Hoary* one is old and that kanji database was generated with a new one. And then I had to rebuild the Ruby/SQLite bindings. And that PS output really does appear to be experimental, as generating too many pages made ghostscript unable to view it. Sometimes it feels like the world's stacked against you...)

* I did this on my work computer.
  • evan

ljfs

puppy:~/projects/lj/ljrb/sample% ./fuse ../../evan_tech.db lj
...
puppy:~/projects/lj/ljrb/sample% ls lj/2006/03/10
661.txt 662.txt
puppy:~/projects/lj/ljrb/sample% cat lj/2006/03/10/662.txt
gem for ljrb
============

Thanks to your advice, I have successfully made a gem and uploaded it to Rubyforge. So I guess it'll show up in the gems system eventually...?

Otherwise, you can download the tarball or gem from the <a href="http://neugierig.org/software/livejournal/ruby/">homepage</a>.

Please let me know if it works for you.


I was thinking of using this to make offline editing painless: I could make it so editing one of these files marks it as dirty in the database, and then I could make the "sync" mode bidirectional by pushing the dirty entries. But I dunno if it's worth it, and I'm a little concerned about the distributed revisioning problem: if it's edited on the server and on the client separately, how can the client know not to clobber your changes? (I guess it could retrieve each entry before allowing pushing new ones and verify the server-side one is as expected...)

Using fuse, at least through Ruby, is a little cumbersome: each method you provide (directory?, read_file) needs to validate all the paths provided. *shrug*