[Alexandria-list] iPod Notes support [PATCH]

Cathal Mc Ginley cathal.alexandria at gnostai.org
Wed Jan 16 19:56:33 EST 2008


On Wed, 16 Jan 2008 14:51:36 -0500
"Joseph Method" <tristil at gmail.com> wrote:

> Hi Timothy,
> 
> Looks good to me. If you would like to commit it yourself you can
> email me your Rubyforge username and I'll give you commit rights.
> 
> On Jan 16, 2008 2:36 PM, Timothy Malone <timothy.malone at gmail.com>
> wrote:
> > So I finally decided that nobody else was gonna code support for
> > this (especially since I've never asked), and no other Linux
> > program that I found could do it either, so I bit the bullet and
> > added it myself. This is a feature that I used to like in Books.app
> > for the Mac.
> >
I'd never heard of iPod Notes (since I don't have an iPod) but this
looks like a very handy little feature: a hyperlinked list of books to
carry around with you. I can imagine it being very useful for academic
reading lists.

> > It exports your books as iPod note files. It works by making a .linx
> > file that includes links to each book in your library (they are
> > given the numerical identifiers that Alexandria uses internally to
> > avoid filename problems with certain characters (':' for
> > instance)).
How about files starting with a '-'? Some of the non-isbn ident's end
up as negative numbers.

> >  Each of those notes includes the title, author,
> > edition, and isbn.
I looked up the iPod Notes format, and we can touch up the export by
including <p> tags to keep those fields on separate lines. 

Also, the index.linx file can have the library name in a <title> tag.

Individual note files shouldn't be greater than 4kb either... It
shouldn't be a real concern, though; you'd need several hundred books
for the index to get that big.

> > Also, if you have cover images, it will make the
> > title into a link to the cover image. The iPod should fail
> > gracefully if a book doesn't have a cover image.
We can just check in advance for the presence of an image file before
linking.

> > The images will
> > only work on 5th generation and above iPods with firmware version
> > 1.2 and above. I don't know how earlier iPods will respond (or the
> > Touch for that matter. Does it even have notes?). Perhaps a
> > checkbox in the file dialog would be good? Maybe just two export
> > entries, "iPod Notes with photos" and "iPod Notes without photos".
> >
A checkbox would be fine, if this is needed. The export dialog adapts
dynamically already (for the HTML export, for example).

> > Also, iPods can only handle 1,000 notes. I'm not sure, but I will
> > try to find out, if the cover images count towards that total.
> > Basically, support is somewhat limited. I personally use it to keep
> > a list of books I am looking for when I go shopping.
> >
Tags and Smart Libraries should help here. I mentioned it in the
manual, but if you tag all the books you're looking for with
e.g. "shoppinglist", and then create a new Smart Library where "Tags"
"containss" "shoppinglist", you can export just that smart library.
You've probably figured this out, but I just thought I'd mention it.

> > Oh, and this is the first time I've ever even looked at Ruby code,
> > so please forgive the glaring errors I'm sure I made. Though I must
> > say I already like Ruby quite a bit. This patch took all of 45
> > minutes to make, including time spent figuring out how to structure
> > the iPod Notes. Though mostly I copied code from the other
> > exporters.
> >
A great thing about free software - it's easy to get into: coding by
imitation is a good way to learn. And while I've been making comments
on improvements we can make to your code, I must say it's no mean feat
for your first experiment with a programming language to result in
adding a useful new feature to a program!

> > Tim Malone

   -   Cathal.


More information about the Alexandria-list mailing list