< Previous
Next >

Pocket Wisherman 2.0: I keep getting frantic emails from Amazon about how they're going to shut off their ECS 3.0 service and I need to rewrite my software to use the ECS 4.0 service. So this weekend I rewrote The Pocket Wisherman. Your Amazon wish lists can still be exported to handy PDF cards. But then I realized that the emails are probably actually about my sales rank tracker script, so I gotta rewrite that too.

I struggled and couldn't get PyAWS to work right, so I punted and wrote a cheap client with Beautiful Soup. The upside is that the PW tarball is much smaller because I'm no longer including a big third-party library.

The genre classification rules are also a lot simpler now. Previously I tried to partition books into the smallest possible number of genres, which meant waiting until you'd gathered all the books before deciding on a genre for any one book. It also meant that sometimes the genres didn't correspond to the sections you'd find in the bookstore.

The new system works from the fact that Amazon files a book under a huge number of categories, all of which are subcategories of a few general categories that you'd see in a bookstore. One of the books on my wishlist is under "Philosophy->Aesthetics", "Philosophy->Movements->Existentialism", "Philosophy->Eastern->Japanese", "Philosophy->Ontology", and "Arts & Photography->History & Criticism->Regional->Asian". Obviously it should go under "Philosophy" and not "Arts & Photography", because it's under "Philosophy" four times.

This reminds me that there's still something I need to do: handle situations where a book has a tie between general categories. In that situation I'll probably go through afterwards and assign each book to the most populous category.

Update: OK, that worked well. The once-huge "Unclassified" section now only contains books that Amazon didn't classify. I've still got the longstanding problem that the "History" section is too big and contains lots of things not filed under "History" in bookstores, but my attempts to compensate (eg. by counting "History" less than other genres) didn't lead to anything, partially because there's no standard place in bookstores where such books are filed.


Unless otherwise noted, all content licensed by Leonard Richardson
under a Creative Commons License.