Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-12-2011, 11:59 PM   #1
mufc
Connoisseur
mufc doesn't littermufc doesn't litter
 
Posts: 99
Karma: 170
Join Date: Nov 2010
Location: Airdrie Alberta
Device: Sony 650
Getting rid of date and time

I have created an epub food recipe book using a newspaper style recipe. Each food category links to an rss file. After downloading, all the articles in each section have the time and date appended. How do I get rid of that. I tried timefont = "
Thanks
mufc is offline   Reply With Quote
Old 03-13-2011, 11:03 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 mufc View Post
I have created an epub food recipe book using a newspaper style recipe. Each food category links to an rss file. After downloading, all the articles in each section have the time and date appended. How do I get rid of that. I tried timefont = "
Thanks
We need more info to know where it's coming from and what you want removed. Are you objecting to the date on the RSS feed list page or something on each article page?
Starson17 is offline   Reply With Quote
Advert
Old 03-13-2011, 12:33 PM   #3
mufc
Connoisseur
mufc doesn't littermufc doesn't litter
 
Posts: 99
Karma: 170
Join Date: Nov 2010
Location: Airdrie Alberta
Device: Sony 650
This book is set up exactly like a newspaper recipe. I have several categories in the book that each has its own rss link. After Front Page you get a list of categories. When I click on that I get the articles in that category.These all have a date and time attached to the end of the article heading. Here is my recipe. It downloads quite fast.
Spoiler:

Code:
class AdvancedUserRecipe1289709253(BasicNewsRecipe):
    title          = u'Laura Recipes test'
    oldest_article = 100
    max_articles_per_feed = 100
    timefmt = ''
    use_embedded_content  = False

    remove_javascript     = True
    extra_css = '''
        h1{font-family:Arial,sans-serif; font-weight:bold;font-size:large;}
        h2{font-family:Arial,sans-serif; font-weight:normal;font-size:small;}
        body{font-family:Arial,sans-serif;font-size:small;}
        a.feed {text-decoration: none;background-color: none;}
        a.article {text-decoration: none;background-color: none;}
        p{font-family:Arial,sans-serif;font-size:small;line-height: 1.2;margin-bottom: 0;margin-left: 2pt;
        margin-right: 2pt;margin-top: 0;padding-left: 0;padding-right: 0;text-align: left;text-indent: 1.5em}
        '''
   
    feeds       = [(u'Soup', u'http://www.members.shaw.ca/conventions/Recipes/soup.rss'),
                        (u'Muffins', u'http://www.members.shaw.ca/conventions/Recipes/muffins.rss'),
                        (u'Cake', u'http://www.members.shaw.ca/conventions/Recipes/cake.rss'),
                        (u'Cookies', u'http://www.members.shaw.ca/conventions/Recipes/cookies.rss'),
                        (u'Pies', u'http://www.members.shaw.ca/conventions/Recipes/pies.rss'),
                        (u'Chicken', u'http://www.members.shaw.ca/conventions/Recipes/chicken.rss'),
                        (u'Beef', u'http://www.members.shaw.ca/conventions/Recipes/beef.rss'),
                        (u'Turkey', u'http://www.members.shaw.ca/conventions/Recipes/turkey.rss'),
                        (u'Fish', u'http://www.members.shaw.ca/conventions/Recipes/fish.rss')]

Moderator Notice
Code tags added for readability

Last edited by Starson17; 03-13-2011 at 12:50 PM.
mufc is offline   Reply With Quote
Old 03-13-2011, 12:52 PM   #4
mufc
Connoisseur
mufc doesn't littermufc doesn't litter
 
Posts: 99
Karma: 170
Join Date: Nov 2010
Location: Airdrie Alberta
Device: Sony 650
I exploded the epub and then tried adding this to my recipe but it has not worked
remove_tags = [dict(name='span', attrs={'class':'articledate'})]

Tried this and it removed my articles
remove_tags = dict(name='span', attrs={'class':['articledate']})



I have also successfully removed the underline from a.feeds and a.article but have not yet solved how to remove the background shading.

Last edited by mufc; 03-13-2011 at 01:01 PM.
mufc is offline   Reply With Quote
Old 03-13-2011, 01:08 PM   #5
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 mufc View Post
I exploded the epub and then tried adding this to my recipe but it has not worked
remove_tags = [dict(name='span', attrs={'class':'articledate'})]
That won't work - remove_tags operates on the input and the article date is part of the output.

The article date at the point you are referring to is part of the standard recipe structure. You can control the date with populate_article_metadata. but I don't recall it being removed completely. Perhaps Kovid can advise, or you can search the code base.
Starson17 is offline   Reply With Quote
Advert
Old 03-13-2011, 01:25 PM   #6
mufc
Connoisseur
mufc doesn't littermufc doesn't litter
 
Posts: 99
Karma: 170
Join Date: Nov 2010
Location: Airdrie Alberta
Device: Sony 650
Thanks for your help. It is not critical. Just thought it might look more like a real book.
Can you help with removal of shading from a.feeds and a.article
I have tried backgound-color and background css settings with no luck.
mufc is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Constantly Setting the Date and Time kobodragon Kobo Reader 2 05-28-2010 07:52 PM
Problems setting date and time Katie H Kobo Reader 2 05-15-2010 09:00 AM
iLiad how to change iliad's date and time laozhang iRex Developer's Corner 2 04-26-2010 08:37 PM
Date and Time Settings KimnCocoa Interead COOL-ER 0 02-16-2010 07:34 PM
Date and Time VillageReader iRex 10 08-25-2006 03:33 PM


All times are GMT -4. The time now is 10:22 PM.


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