I can't agree more. Always wrap your ORM with your own logic that makes sense to you and your application. You'll find code reuse will go way up, readability will go way up, testing is easier. You can actually test the model without bootstrapping the whole app. I've been preaching this in my SqlAlchemy talks and tutorials for years.
For our project I've been thinking about this a lot lately. Could you maybe elaborate on how you did this with SqlAlchemy and how you write your tests against the new model? Do you now of any more in-depth articles on the subject?
This really seems to hit a sweet spot of moving business logic into the model and I would love to use this in some form.
Yes, the json dump is much more pleasant to work with than the old Netscape HTML format. To begin with, it can be easily parsed by any modern programming language. But the file I tried to import into Pinboard the other day was actually an HTML dump from Chrome, where I keep the same set of bookmarks modulo some private stuff. Not that it makes a difference when it comes to preserving folders.
Yea, the big issue is the denormalization of the data in the json dump. While it's machine readable, it's still a bit of a pita to put it together. The other thing is that since you're a folder user, how to you transition that to the tags concepts most services use. Right now I just import the folders as tags from the html dump, but want users that have tags in their stuff to be able to load the json dump to preserve those tags, which seems like it'd still not do what you were looking for. I need to make sure that nested folders means you get multiple tags during import, and I wonder if that'd help you out.