And the Winner Is ... Tellico
|
|
Continuing on from yesterday's book cataloging fun, I can tell you that I persevered and with great help from Robby Stephenson (thanks!), I now have my book collection cataloged on my Ferrari using tellico. |
So here's what I had to do, to get things to work. Importing in RIS format: I was not conforming exactly to the RIS specification. There needed to be exactly two spaces each side of the hyphen. I adjusted my conversion script accordingly:
import sys
def readBookList():
return sys.stdin.readlines()
def writeRISEntries(lines):
for line in lines:
tokens = line.split('\t')
tokensLen = len(tokens)
sys.stdout.writelines('\n')
sys.stdout.writelines('TY - BOOK\n')
if tokensLen > 37:
sys.stdout.writelines('AU - ' + tokens[37] + '\n')
if tokensLen > 10:
sys.stdout.writelines('TI - ' + tokens[10] + '\n')
if tokensLen > 8:
sys.stdout.writelines('SN - ' + tokens[8] + '\n')
sys.stdout.writelines('ER - \n')
if __name__ == "__main__":
lines = readBookList()
writeRISEntries(lines)
and reconverted my Delicious Library exported data and reimported it into tellico. This was very quick. At this point, tellico did nothing more than read and remember the data. There were no pretty book cover images to go with the title, author and ISBN values.
To fix this, I needed to select all the books and run
Collection->Update Entry->Amazon (US).
This proceeded to check and update each book, with each update taking
about 1-2 seconds. It then tried to update the images of the books on
the shelf. As it progressed, this got slower and slower (taking upto 8
seconds per book). Apparently the graphics update is in the main thread
as the rest of the application refused to redraw when I put the window
to the back and then bought it forward again.
Anyhoo, I let it continue and several hours later, there were all my book covers (or at least as many as Amazon US knows about). I quit the application and saved the new book information. Images were saved in with the rest of the data, and this resulted in a 10MB file. Still, it reloads the book data quickly the next time the application is started. As there are no books initially selected, then it doesn't have to display the book cover image detail right away. Selecting all the books does take about twenty seconds, but that's still faster than Delicious Library on my old G4 Powerbook.
One of the nice features with tellico is that I now know how many books per author I have. My most popular author is Jack Vance with 52 followed by John Brunner (37), Terry Pratchett (34), Robert Silverberg (31), Michael Moorcock (31) and Isaac Asimov (30). Do you see a pattern here. My biggest non-SF/Fantasy authors are Martin Gardner (19) and Graham Greene (18).
I now need to spend a little time to fully read the documentation and find out all the other features it has.
[Technorati Tag: Book Cataloging]
( Dec 07 2007, 03:33:51 PM PST ) [Listen] Permalink Comments [8]
Comments are closed for this entry.












Being such a book lover. Did you take a look at LibraryThing.com ? I've got my collection up there and love using it.
Posted by jcopenha on December 07, 2007 at 04:35 PM PST #
Yes I did (see a comment in the last post) for
more details. It's a control thing. I want the
ability to be able to modify/hack on the
cataloging software if I so desire. LibraryThing
doesn't give me that. Or at least not so easily.
Posted by Rich Burridge on December 07, 2007 at 04:55 PM PST #
Great to hear that you got it working, Rich!
There's an option in the settings to save the images separate from the rest of the data. That speeds up the loading and saving quite a bit. The images get saved in $HOME/.kde/apps/share/tellico/data/ in that case so if you ever want to back them up, be sure to grab that directory, or export to Zip.
Amazon is about the only source that provides a cover image. z39.50 sources, which come from a lot of national libraries, provide some really good data, but no graphics. That's a bit of a shame. You can drag images from your browser into the editor when you want to add a cover to an existing record, too.
Incidentally, at some point, I want to write an importer for Delicious Library files. Do you know if the XML format is documented anywhere? Could I ask you to share part or all of your XML file so I can see how easy it would be to figure out the format?
Posted by Robby Stephenson on December 07, 2007 at 07:32 PM PST #
Hi Robby,
No problem. I'll send you email.
Posted by Rich Burridge on December 07, 2007 at 08:25 PM PST #
Could you please switch to a more pythonic naming convention as described in PEP 8 (http://www.python.org/dev/peps/pep-0008/). This means in particular readBookList -> read_book_list and writeRISEntries -> write_ris_entries. Please :)? Or is there a particular reason for your style?
Posted by Robin on December 08, 2007 at 07:00 AM PST #
> Or is there a particular reason for your style?
It's the style we use in the Orca code.
See files under:
http://svn.gnome.org/viewvc/orca/trunk/src/orca/
(and probably that because the team lead and
myself come from recently writing a lot of Java
code).
I realize there is more than one way to do this.
I quite often write in C, Java, Python and
Javascript. Each has their own prefered style.
Trying to remember that preffered coding style
for each language can get tiresome.
One could also argue that why isn't:
sys.stdout.writelines
really
sys.stdout.write_lines
?
Posted by Rich Burridge on December 08, 2007 at 07:17 AM PST #
I was afraid that was the reason. But one should not carry over naming conventions from one language to the other, even if it is sometimes hard to accustom one to the style.
I know it's too late for Orca, but not using the "host" naming style can put people off from using a library. (By the way, outloud.py does seem to use namesruntogether.)
Agreed, Python itself is not too consistent (SAX parser and the like), but that's not a reason to give consistency up altogether. Also, it's not too long ago PEP 8 was changed to say underscore_names should be used for methods and attributes, so depending on how old the Orca project is, you may be excused :).
Posted by Robin on December 09, 2007 at 08:16 AM PST #
> By the way, outloud.py does seem to use
> namesruntogether
Yup. It was written by somebody else and
contributed to the project.
My simple philosophy for code style is that
it should be unified and therefore depends
upon the person(s) that started the project
(which wasn't me in the case of Orca).
But you make a good point. I'll try to wrap
my brain around the latest OneTruePythonStyle(TM).
Posted by Rich Burridge on December 09, 2007 at 09:00 AM PST #