Quote:
Originally Posted by badhaggis
Hi all,
I'm trying to modify the Google Reader uber recipe.
Issue #2 is the area I need help in. The feed from http://www.google.com/reader/atom/ includes the tags I need I'm just not sure how to get Calibre to reformat the articles.
|
It looks like you want to add text to the article page and the text is available from the RSS feed? If that's right, then there are two parts to do what you want - 1) how to get the text you want to add, and 2) how to put it on the article page.
If the text you want on the article is appearing in your finished ebook on the page that links to the article, then calibre has already found it, and you could use populate_article_metadata to access it. Otherwise, you can just use index_to_soup to grab a soup of the feed page and parse it to find what you want (e.g. search for the article title and grab the other elements/text you want once it's found).
Once you have the text, you would use preprocess_html or postprocess_html and modify the page soup.
If you don't know what a "soup" is, it's just html from the page, but made accessible in a database with
BeautifulSoup.