Originally Posted by
Nonno Bassotto
Fine, this solves the bookmarks issue.
Maybe you could mention it in the instructions.
I will.
Originally Posted by
Nonno Bassotto
What I mean is that now one could create a anobii-account grabber. A user could give the id of his account to the grabber and avatar-factory would create the avatars for all books in the shelf, without the need to create a bookmark for each book.
This page shows that, once you have a Anobii API account, you can use a dedicated URL to retrieve the list of all books in the shelf, in XML format. Actually for each book you only get the id; then you use
this other method to get the title and the cover.
Oh, I see... I am not sure how to implement this since I am planning to change the way bookmark grabbers work.
Now it is:
Code:
avatar-factory -g anobii destination
I want to implement something like:
Code:
avatar-factory -g anobii source destination
Where source could be firefox, opera, epiphany, a list of links file and I could add your idea here. This way no additional grabber will be needed.
Originally Posted by
Nonno Bassotto
By the way, one could use something like
XMLStarlet to parse the XML output, so the new grabber would be very simple. This would add a new dependency to avatar-factory, but one can just ignore it if he doesn't need the new grabber. Moreover the same thing could be done for other social websites (like IMDB itself, or flixster...) as soon as they provide a similar API.
XMLStarlet seems great. I didn't know about it.
I read a little the docs and it seems a like complex (I have almost no experience in XML)
I think that I can use sed for this.
Do you mean for example, to grab the links from a page like this
I can get the links with:
Code:
wget -qO - http://www.anobii.com/cyesuta/books | sed -e 's/<a href="/\n/g' -e '/\/books\//!d' -e 's/".*$//g' | sed -e '/\/books\//!d' -e 's|^|http://www.anobii.com|'
Bookmarks