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 02-01-2011, 06:14 PM   #1
enzo94
Member
enzo94 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Feb 2011
Device: kindle 3
Lightbulb Techno-science.net

Dear Calibre dev's,

First thank you for this useful program,
i would like to read techno-science.net on my kindle 3, can you help me ?

Here is the RSS feed adress : http://www.techno-science.net/include/news.xml

Best regards,
enzo
enzo94 is offline   Reply With Quote
Old 02-01-2011, 06:25 PM   #2
tolyluis
Enthusiast
tolyluis doesn't littertolyluis doesn't litter
 
Posts: 49
Karma: 196
Join Date: Jan 2011
Device: Kindle 3
What do you want, this feed only or the full-content of the page? (there are many feeds available)
tolyluis is offline   Reply With Quote
Advert
Old 02-01-2011, 06:29 PM   #3
enzo94
Member
enzo94 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Feb 2011
Device: kindle 3
Yes this feed would be a good start
enzo94 is offline   Reply With Quote
Old 02-01-2011, 06:33 PM   #4
enzo94
Member
enzo94 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Feb 2011
Device: kindle 3
well in fact when i add this feed using the adress http://www.techno-science.net/include/news.xml in google reader i have the result i would like to see on my kindle, if that helps...

Last edited by enzo94; 02-01-2011 at 06:42 PM.
enzo94 is offline   Reply With Quote
Old 02-01-2011, 06:43 PM   #5
tolyluis
Enthusiast
tolyluis doesn't littertolyluis doesn't litter
 
Posts: 49
Karma: 196
Join Date: Jan 2011
Device: Kindle 3
Don't care about it....
tolyluis is offline   Reply With Quote
Advert
Old 02-01-2011, 06:51 PM   #6
tolyluis
Enthusiast
tolyluis doesn't littertolyluis doesn't litter
 
Posts: 49
Karma: 196
Join Date: Jan 2011
Device: Kindle 3
I have it, but with no styles (it looks very ugly ), may any recipe expert give us a lesson on apply styles with no <hn> tags, if it could be done.

Just wait for a little test and I post it.

Last edited by tolyluis; 02-01-2011 at 07:23 PM.
tolyluis is offline   Reply With Quote
Old 02-01-2011, 07:27 PM   #7
tolyluis
Enthusiast
tolyluis doesn't littertolyluis doesn't litter
 
Posts: 49
Karma: 196
Join Date: Jan 2011
Device: Kindle 3
Techno-science.com (v0.5) - French

Here is the initial code

SOURCE CODE

Code:
__license__   = 'GPL v3'
__author__    = 'Luis Hernandez'
__copyright__ = 'Luis Hernandez<tolyluis@gmail.com>'
__version__     = 'v0.5'
__date__        = '02 Feb 2011'

'''
http://www.techno-science.net
'''

class AdvancedUserRecipe1294946868(BasicNewsRecipe):

    title             = u'Techno-Science'
    __author__  = 'Luis Hernandez'
    description   = 'french page about tech and science'

    oldest_article = 30
    max_articles_per_feed = 100

    remove_javascript = True
    no_stylesheets        = True
    use_embedded_content  = False

    encoding              = 'ISO-8859-1'
    remove_empty_feeds    = True
    language              = 'fr_FR'
    timefmt        = '[%a, %d %b, %Y]'

    keep_only_tags     = [dict(name='div', attrs={'class':['titre','texte','conteneurEncadre']})]

    remove_tags_before = dict(name='div' , attrs={'class':['headerModuleCentre']})
    remove_tags_after  = dict(name='div' , attrs={'class':['commentaires']})
 
    feeds          = [
	       (u'News', u'http://www.techno-science.net/include/news.xml')
	      ,(u'Aeronautique', u'http://www.techno-science.net/include/news6.xml')
	      ,(u'Transports', u'http://www.techno-science.net/include/news20.xml')
	      ,(u'Espace', u'http://www.techno-science.net/include/news7.xml')
	      ,(u'Energie', u'http://www.techno-science.net/include/news8.xml')
	      ,(u'Multimedia', u'http://www.techno-science.net/include/news9.xml')
	      ,(u'Architecture', u'http://www.techno-science.net/include/news10.xml')
	      ,(u'Mathematiques', u'http://www.techno-science.net/include/news11.xml')
	      ,(u'Physique', u'http://www.techno-science.net/include/news12.xml')
	      ,(u'Astrophysique', u'http://www.techno-science.net/include/news13.xml')
	      ,(u'Astronomie', u'http://www.techno-science.net/include/news14.xml')
	      ,(u'Vie et Terre', u'http://www.techno-science.net/include/news24.xml')
	      ,(u'Autres sujets', u'http://www.techno-science.net/include/news27.xml')
	      ,(u'Retro', u'http://www.techno-science.net/include/news25.xml')
                       ]
it's about 2 Mb file, say us something about this recipe.
tolyluis is offline   Reply With Quote
Old 02-02-2011, 01:20 AM   #8
enzo94
Member
enzo94 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Feb 2011
Device: kindle 3
Dear Mr Hernandez,
i've try adding this code in the advanced area of the add personalize news menu.
I have this error when i try to download the content from the planification menu :

calibre, version 0.7.43
ERROR: Erreur lors de la conversion: <b>Échoué</b>: Récupérer des News de technologie

Récupérer des News de technologie
Resolved conversion options
calibre version: 0.7.43
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 0,
'book_producer': None,
'change_justification': 'original',
'chapter': None,
'chapter_mark': 'pagebreak',
'comments': None,
'cover': None,
'debug_pipeline': None,
'dehyphenate': True,
'delete_blank_paragraphs': True,
'disable_font_rescaling': False,
'dont_compress': False,
'dont_download_recipe': False,
'enable_heuristics': False,
'extra_css': None,
'fix_indents': True,
'font_size_mapping': None,
'format_scene_breaks': True,
'html_unwrap_factor': 0.4,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x1087a9050>,
'insert_blank_line': False,
'insert_metadata': False,
'isbn': None,
'italicize_common_cases': True,
'keep_ligatures': False,
'language': None,
'level1_toc': None,
'level2_toc': None,
'level3_toc': None,
'line_height': 0,
'linearize_tables': False,
'lrf': False,
'margin_bottom': 5.0,
'margin_left': 5.0,
'margin_right': 5.0,
'margin_top': 5.0,
'markup_chapter_headings': True,
'max_toc_links': 50,
'minimum_line_height': 120.0,
'mobi_ignore_margins': False,
'no_chapters_in_toc': False,
'no_inline_navbars': True,
'no_inline_toc': False,
'output_profile': <calibre.customize.profiles.KindleOutput object at 0x1087a9690>,
'page_breaks_before': None,
'password': None,
'personal_doc': '[PDOC]',
'prefer_author_sort': False,
'prefer_metadata_cover': False,
'pretty_print': False,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': None,
'remove_first_image': False,
'remove_paragraph_spacing': False,
'remove_paragraph_spacing_indent_size': 1.5,
'renumber_headings': True,
'rescale_images': False,
'series': None,
'series_index': None,
'smarten_punctuation': False,
'sr1_replace': '',
'sr1_search': '',
'sr2_replace': '',
'sr2_search': '',
'sr3_replace': '',
'sr3_search': '',
'tags': None,
'test': False,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'toc_title': None,
'unwrap_lines': True,
'use_auto_toc': False,
'username': None,
'verbose': 2}
Python function terminated unexpectedly:
InputFormatPlugin: Recipe Input running
Traceback (most recent call last):
File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 147, in main
return run_entry_point()
File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 116, in run_entry_point
return getattr(pmod, func)()
File "site-packages/calibre/utils/ipc/worker.py", line 110, in main
File "site-packages/calibre/gui2/convert/gui_conversion.py", line 25, in gui_convert
File "site-packages/calibre/ebooks/conversion/plumber.py", line 899, in run
File "site-packages/calibre/customize/conversion.py", line 204, in __call__
File "site-packages/calibre/web/feeds/input.py", line 105, in convert
File "site-packages/calibre/web/feeds/news.py", line 734, in download
File "site-packages/calibre/web/feeds/news.py", line 876, in build_index
File "site-packages/calibre/web/feeds/news.py", line 1303, in parse_feeds
File "site-packages/calibre/web/feeds/news.py", line 351, in get_feeds
NotImplementedError

Thank you fr your help,
enzo
enzo94 is offline   Reply With Quote
Old 02-02-2011, 10:09 AM   #9
tolyluis
Enthusiast
tolyluis doesn't littertolyluis doesn't litter
 
Posts: 49
Karma: 196
Join Date: Jan 2011
Device: Kindle 3
enzo94, make sure source web page (www.techno-science.net) is working. Right now the page is down, and last night too. The code works, (tested and re-tested) is not very nice how calibre shows it, but is working, functional and readable.

Maybe it helps to a better display, just change

Code:
no_stylesheets        = True
to

Code:
no_stylesheets        = False
It looks a little better on K4PC, now the recipe looks:



Clik on image to enlarge

Last edited by tolyluis; 02-02-2011 at 10:13 AM.
tolyluis is offline   Reply With Quote
Old 02-02-2011, 02:00 PM   #10
enzo94
Member
enzo94 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Feb 2011
Device: kindle 3
Dear Mr. Hernandez,
Many, many thanks it is fully working.

Maybe i can ask you some cosmetic improve of this code by adding in someway the title of a feed before the related article.

For now it works fine on my computer i'll tell you how it works on my kindle when i'll have it back.

If i can of any help for the community i'll be glad to contribute, but i'm a really poor programmer, but if that could help i!m in materials chemistry ;-)

Best regards,
enzo
enzo94 is offline   Reply With Quote
Old 02-02-2011, 02:07 PM   #11
enzo94
Member
enzo94 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Feb 2011
Device: kindle 3
In fact, when i compare it with the google reader's article, i find the titles so they are in there.

Is it possible to do a line spacing and put the title in bold and add one more line spacing ? This way it will be much more easy to read.

Again it is a cosmetic improvement so if you think that would take you too much time i'll keep it that way ;-)

Just perfectionism ^^
enzo94 is offline   Reply With Quote
Old 02-02-2011, 02:31 PM   #12
tolyluis
Enthusiast
tolyluis doesn't littertolyluis doesn't litter
 
Posts: 49
Karma: 196
Join Date: Jan 2011
Device: Kindle 3
Quote:
Originally Posted by enzo94 View Post
In fact, when i compare it with the google reader's article, i find the titles so they are in there.

Is it possible to do a line spacing and put the title in bold and add one more line spacing ? This way it will be much more easy to read.

Again it is a cosmetic improvement so if you think that would take you too much time i'll keep it that way ;-)

Just perfectionism ^^
Unfortunately I can't help you, it's not a cuestion of time, it's a cuestion of knowledge. Just I said before, may another people more experimented can help you, I'm just a beginner in this of reciping news. I understand your petition, the ebook looks very ugly, line-spacing the title is required for a comfortable reading.
tolyluis is offline   Reply With Quote
Old 02-03-2011, 06:22 AM   #13
enzo94
Member
enzo94 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Feb 2011
Device: kindle 3
Thank you very much anyway,

if someone have the skills to add this feature it would be nice,

have a good day ;-)
enzo94 is offline   Reply With Quote
Reply

Tags
french, recipes, science


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
TAG - A Techno Thriller set in the near future simonroyle Self-Promotions by Authors and Publishers 160 06-15-2012 12:17 AM
Asus DR-950 : 9" & SiPix techno DannyElfman Autres liseuses 34 09-21-2011 02:51 AM
Techno-worship is a triumphalist and intolerant cult? taglines News 8 02-06-2010 11:45 AM
Techno addiction Patricia Lounge 43 10-06-2009 07:17 AM
I'm New - Moving from Tactile to Techno theodoron Introduce Yourself 15 12-19-2008 09:44 PM


All times are GMT -4. The time now is 06:12 PM.


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