Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 08-03-2011, 06:48 AM   #1
pabloaldama
Junior Member
pabloaldama began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2011
Device: kindle 3
Help with sections

I would like to know how to make different sections from one single rss. How do I do this?

I am trying to make a recipe forhttp://www.cartacapital.com.br/

There is a single rss which is: http://www.cartacapital.com.br/feed/rss

I found two different ways to view the section, one from the url

- for example for internacional:- for política:or in the code itself you can find it in <p id="BlogDate">

Any help?
pabloaldama is offline   Reply With Quote
Old 08-03-2011, 08:59 AM   #2
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by pabloaldama View Post
Any help?
I don't understand what you are asking. If you want to break up a single RSS feed into multiple virtual feeds, see here:
https://www.mobileread.com/forums/sho...45&postcount=2
Starson17 is offline   Reply With Quote
Advert
Old 08-03-2011, 10:56 AM   #3
pabloaldama
Junior Member
pabloaldama began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2011
Device: kindle 3
Quote:
Originally Posted by Starson17 View Post
I don't understand what you are asking. If you want to break up a single RSS feed into multiple virtual feeds, see here:
https://www.mobileread.com/forums/sho...45&postcount=2
That is exactly what I would like.

There is only one rss under which all the articles from all the sections are listed, therefore in that rss I can find articles from the economy section mixed with articles from the politics section. I would like to have a different section for each topic.

I have taken a look at that post, however I cannot make it work, I must be doing something wrong or not understanding the process.

Thanks.
pabloaldama is offline   Reply With Quote
Old 08-03-2011, 11:23 AM   #4
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by pabloaldama View Post
That is exactly what I would like.

There is only one rss under which all the articles from all the sections are listed, therefore in that rss I can find articles from the economy section mixed with articles from the politics section. I would like to have a different section for each topic.

I have taken a look at that post, however I cannot make it work, I must be doing something wrong or not understanding the process.

Thanks.
1) make a recipe that works to get the entire feed. Until that works, don't fool with the virtual feed.
2) find a word that appears in the title of each article that you want to use to grab that article out of the main feed (like "POLITICS") (if there is no such word, then you'll need to use something in the description or the link address - see some of my code examples in the code sticky about removing VIDEO links to see other characteristics you can key on)
3) copy in all of the code from that post, but change two lines:
Code:
if curarticle.title.upper().find('RECIPE') >= 0:
change the word "RECIPE" above to "POLITICS" (or whatever word is in the title that you are using to identify the articles to be moved into the new virtual feed).
and, optionally, change the name of the new virtual feed in this line:
Code:
pfeed.title = 'Recipes'
Starson17 is offline   Reply With Quote
Old 08-03-2011, 12:11 PM   #5
pabloaldama
Junior Member
pabloaldama began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2011
Device: kindle 3
Thanks 4 r help!

Found an alternative to build the recipe. Here it goes:

Code:
class AdvancedUserRecipe1312361378(BasicNewsRecipe):
    title          = u'Carta capital'
    oldest_article = 9
    max_articles_per_feed = 100

    feeds          = [(u'Politica', u'http://www.cartacapital.com.br/category/politica/feed')
                      ,(u'Economia', u'http://www.cartacapital.com.br/category/economia/feed')
                      ,(u'Cultura', u'http://www.cartacapital.com.br/category/cultura/feed')
                      ,(u'Internacional', u'http://www.cartacapital.com.br/category/internacional/feed')
                      ,(u'Saude', u'http://www.cartacapital.com.br/category/saude/feed')
                      ,(u'Sociedade', u'http://www.cartacapital.com.br/category/sociedade/feed')
                      ,(u'Tecnologia', u'http://www.cartacapital.com.br/category/tecnologia/feed')
                      ,(u'Carta na escola', u'http://www.cartacapital.com.br/category/carta-na-escola/feed')
                      ,(u'Carta fundamental', u'http://www.cartacapital.com.br/category/carta-fundamental/feed')
                      ,(u'Carta verde', u'http://www.cartacapital.com.br/category/carta-verde/feed')

]
    def print_version(self, url):
        return url + '/print'
pabloaldama is offline   Reply With Quote
Advert
Old 08-03-2011, 01:31 PM   #6
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by pabloaldama View Post
Thanks 4 r help!
Found an alternative to build the recipe. Here it goes:
I thought you wanted to split a single feed up into separate feeds?
Starson17 is offline   Reply With Quote
Old 08-04-2011, 03:29 AM   #7
pabloaldama
Junior Member
pabloaldama began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2011
Device: kindle 3
Quote:
Originally Posted by Starson17 View Post
I thought you wanted to split a single feed up into separate feeds?
Still trying to do that. However I found separate feeds on the source code of the site, so until I can manage to make it work in that way, this would do the trick. I will post the code with how far I got.
pabloaldama is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to break up into sections ??? katielady Sigil 14 02-18-2011 05:01 PM
New Forum Sections gvtexas Announcements 1 06-09-2003 09:05 AM


All times are GMT -4. The time now is 11:48 PM.


MobileRead.com is a privately owned, operated and funded community.