05-16-2011, 08:44 AM | #1 |
Enthusiast
Posts: 37
Karma: 10
Join Date: Apr 2011
Device: none
|
could someone create tutorial how to work with print version
could someone create tutorial how to work with print version
for instance: how to change this h**p://www.thedailygreen.com/green-homes/latest/six-plants-to-grow-anywhere-44072308?src=rss for h**p://www.thedailygreen.com/print-this/green-homes/latest/six-plants-to-grow-anywhere-44072308?page=all |
05-16-2011, 08:49 AM | #2 |
Chocolate Grasshopper ...
Posts: 27,600
Karma: 20821184
Join Date: Mar 2008
Location: Scotland
Device: Muse HD , Cybook Gen3 , Pocketbook 302 (Black) , Nexus 10: wife has PW
|
xXxXxXxXxXx
Interesting name ! Welcome to Mobileread ..... |
Advert | |
|
05-16-2011, 09:04 AM | #3 |
Enthusiast
Posts: 37
Karma: 10
Join Date: Apr 2011
Device: none
|
Welcome, J notice lack of mens magazines, and woman magazines so J want to create a recipes, but J always get stuck with changing url to print version
|
05-16-2011, 09:16 AM | #4 |
Zealot
Posts: 119
Karma: 100
Join Date: Jan 2011
Location: Germany / NRW /Köln
Device: prs-650 / prs-350 /kindle 3
|
actually the same question I've asked myself
you have many sources for information please read this Code:
https://www.mobileread.com/forums/showpost.php?p=1538585&postcount=5 |
05-16-2011, 09:32 AM | #5 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
https://www.mobileread.com/forums/sho...9&postcount=12 |
|
Advert | |
|
05-16-2011, 09:54 AM | #6 |
Enthusiast
Posts: 37
Karma: 10
Join Date: Apr 2011
Device: none
|
J create this, but unfortunately j get error
Code:
class AdvancedUserRecipe1305547242(BasicNewsRecipe): title = u'thedailygreen' oldest_article = 7 max_articles_per_feed = 100 def print_version(self,url): segments = url.split('/') printURL = '/'.join(segments[0:3]) + '/print-this/' + '/'.join(segments[3:]) return printURL def preprocess_html(self, soup): for alink in soup.findAll('a'): if alink.string is not None: tstr = alink.string alink.replaceWith(tstr) return soup feeds = [(u'Green Homes', u'http://www.thedailygreen.com/green-homes/rss/'), (u'New Green Cuisine', u'http://www.thedailygreen.com/healthy-eating/rss/'), (u'Living Green', u'http://www.thedailygreen.com/living-green/rss/'), (u'Ask An Organic Mom', u'http://www.thedailygreen.com/living-green/blogs/organic-parenting/organic-parenting-rss'), (u'Backyard Matters', u'http://www.thedailygreen.com/living-green/blogs/easy-tips/easy-tips-rss'), (u'Big Green Purse', u'http://www.thedailygreen.com/green-homes/blogs/green-products-services/green-products-services-rss'), (u'Driving Directions Getting There Green', u'http://www.thedailygreen.com/living-green/blogs/cars-transportation/cars-transportation-rss'), (u'Green Hacks', u'http://www.thedailygreen.com/green-homes/blogs/diy-hacks/diy-hacks-rss'), (u'Pix We Need From You', u'http://www.thedailygreen.com/weird-weather/blogs/submit/submit-rss'), (u'Recipes from the Gluten-Free Girl', u'http://www.thedailygreen.com/healthy-eating/blogs/gluten-free/gluten-free-rss'), (u'Shapattack', u'http://www.thedailygreen.com/environmental-news/blogs/shapley/shapley-rss'), (u'SOLE Food Digest', u'http://www.thedailygreen.com/healthy-eating/blogs/organic-sustainable-food/organic-sustainable-food-rss'), (u'Starre Power: Fashion and Beauty', u'http://www.thedailygreen.com/living-green/blogs/fashion-beauty/fashion-beauty-rss'), (u'The 100 Mile Diet', u'http://www.thedailygreen.com/healthy-eating/blogs/100-mile-diet/100-mile-diet-rss'), (u'The Beekeeper', u'http://www.thedailygreen.com/environmental-news/blogs/bees/bees-rss'), (u'The Green Carpet: Hollywood', u'http://www.thedailygreen.com/living-green/blogs/celebrities/celebrities-rss'), (u'The Green Cheapskate', u'http://www.thedailygreen.com/living-green/blogs/save-money/save-money-rss'), (u'The Green Conservative', u'http://www.thedailygreen.com/environmental-news/blogs/republican/republican-rss'), (u'The Greengrower', u'http://www.thedailygreen.com/green-homes/blogs/organic-gardening/organic-gardening-rss'), (u'The Hypermiler', u'http://www.thedailygreen.com/living-green/blogs/gas-mileage/gas-mileage-rss'), (u'The Storm Pundit', u'http://www.thedailygreen.com/environmental-news/blogs/hurricanes-storms/hurricanes-storms-rss'), (u'The Zen Cleaner', u'http://www.thedailygreen.com/green-homes/blogs/nontoxic/nontoxic-rss'), (u'What to Eat', u'http://www.thedailygreen.com/healthy-eating/blogs/healthy-food/healthy-food-rss'), (u'Urth Guy', u'http://www.thedailygreen.com/living-green/blogs/recycling-design-technology/recycling-design-technology-rss')] |
05-16-2011, 10:04 AM | #7 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
It looks like you have an indent error in your feeds, but you should always post the error you get. That's not necessarily the only error. Don't make those trying to help you guess.
Last edited by Starson17; 05-16-2011 at 10:17 AM. |
05-16-2011, 10:07 AM | #8 |
Enthusiast
Posts: 37
Karma: 10
Join Date: Apr 2011
Device: none
|
this is what J revive
Code:
Fetch news from thedailygreen Resolved conversion options calibre version: 0.8.1 {'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_download_recipe': False, 'dont_split_on_page_breaks': True, 'enable_heuristics': False, 'epub_flatten': False, 'extra_css': None, 'extract_to': None, 'fix_indents': True, 'flow_size': 260, 'font_size_mapping': None, 'format_scene_breaks': True, 'html_unwrap_factor': 0.4, 'input_encoding': None, 'input_profile': <calibre.customize.profiles.InputProfile object at 0x0419A1D0>, '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, 'no_chapters_in_toc': False, 'no_default_epub_cover': False, 'no_inline_navbars': False, 'no_svg_cover': False, 'output_profile': <calibre.customize.profiles.TabletOutput object at 0x0419A690>, 'page_breaks_before': None, 'password': None, 'prefer_metadata_cover': False, 'preserve_cover_aspect_ratio': False, 'pretty_print': True, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': None, 'remove_fake_margins': True, 'remove_first_image': False, 'remove_paragraph_spacing': False, 'remove_paragraph_spacing_indent_size': 1.5, 'renumber_headings': True, 'replace_scene_breaks': '', '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, 'unwrap_lines': True, 'use_auto_toc': False, 'username': None, 'verbose': 2} InputFormatPlugin: Recipe Input running Python function terminated unexpectedly (Error Code: 1) Traceback (most recent call last): File "site.py", line 103, in main File "site.py", line 85, in run_entry_point File "site-packages\calibre\utils\ipc\worker.py", line 119, 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 920, 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 735, in download File "site-packages\calibre\web\feeds\news.py", line 877, in build_index File "site-packages\calibre\web\feeds\news.py", line 1304, in parse_feeds File "site-packages\calibre\web\feeds\news.py", line 352, in get_feeds NotImplementedError |
05-16-2011, 10:14 AM | #9 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
05-16-2011, 10:14 AM | #10 |
Zealot
Posts: 119
Karma: 100
Join Date: Jan 2011
Location: Germany / NRW /Köln
Device: prs-650 / prs-350 /kindle 3
|
yep,
try this Code:
no_stylesheets = True use_embedded_content = False remove_javascript = True def print_version(self,url): segments = url.split('/') printURL = '/'.join(segments[0:3]) + '/print-this/' + '/'.join(segments[4:]) return printURL def preprocess_html(self, soup): for alink in soup.findAll('a'): if alink.string is not None: tstr = alink.string alink.replaceWith(tstr) return soup |
05-16-2011, 10:18 AM | #11 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
05-16-2011, 10:21 AM | #12 |
Zealot
Posts: 119
Karma: 100
Join Date: Jan 2011
Location: Germany / NRW /Köln
Device: prs-650 / prs-350 /kindle 3
|
ooooooh yes |
05-16-2011, 10:22 AM | #13 |
Enthusiast
Posts: 37
Karma: 10
Join Date: Apr 2011
Device: none
|
J put this
Code:
class AdvancedUserRecipe1305547242(BasicNewsRecipe): title = u'thedailygreen' oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False remove_javascript = True def print_version(self,url): segments = url.split('/') printURL = '/'.join(segments[0:3]) + '/print-this/' + '/'.join(segments[4:]) return printURL def preprocess_html(self, soup): for alink in soup.findAll('a'): if alink.string is not None: tstr = alink.string alink.replaceWith(tstr) return soup feeds = [(u'Green Homes', u'http://www.thedailygreen.com/green-homes/rss/'), (u'New Green Cuisine', u'http://www.thedailygreen.com/healthy-eating/rss/'), (u'Living Green', u'http://www.thedailygreen.com/living-green/rss/'), (u'Ask An Organic Mom', u'http://www.thedailygreen.com/living-green/blogs/organic-parenting/organic-parenting-rss'), (u'Backyard Matters', u'http://www.thedailygreen.com/living-green/blogs/easy-tips/easy-tips-rss'), (u'Big Green Purse', u'http://www.thedailygreen.com/green-homes/blogs/green-products-services/green-products-services-rss'), (u'Driving Directions Getting There Green', u'http://www.thedailygreen.com/living-green/blogs/cars-transportation/cars-transportation-rss'), (u'Green Hacks', u'http://www.thedailygreen.com/green-homes/blogs/diy-hacks/diy-hacks-rss'), (u'Pix We Need From You', u'http://www.thedailygreen.com/weird-weather/blogs/submit/submit-rss'), (u'Recipes from the Gluten-Free Girl', u'http://www.thedailygreen.com/healthy-eating/blogs/gluten-free/gluten-free-rss'), (u'Shapattack', u'http://www.thedailygreen.com/environmental-news/blogs/shapley/shapley-rss'), (u'SOLE Food Digest', u'http://www.thedailygreen.com/healthy-eating/blogs/organic-sustainable-food/organic-sustainable-food-rss'), (u'Starre Power: Fashion and Beauty', u'http://www.thedailygreen.com/living-green/blogs/fashion-beauty/fashion-beauty-rss'), (u'The 100 Mile Diet', u'http://www.thedailygreen.com/healthy-eating/blogs/100-mile-diet/100-mile-diet-rss'), (u'The Beekeeper', u'http://www.thedailygreen.com/environmental-news/blogs/bees/bees-rss'), (u'The Green Carpet: Hollywood', u'http://www.thedailygreen.com/living-green/blogs/celebrities/celebrities-rss'), (u'The Green Cheapskate', u'http://www.thedailygreen.com/living-green/blogs/save-money/save-money-rss'), (u'The Green Conservative', u'http://www.thedailygreen.com/environmental-news/blogs/republican/republican-rss'), (u'The Greengrower', u'http://www.thedailygreen.com/green-homes/blogs/organic-gardening/organic-gardening-rss'), (u'The Hypermiler', u'http://www.thedailygreen.com/living-green/blogs/gas-mileage/gas-mileage-rss'), (u'The Storm Pundit', u'http://www.thedailygreen.com/environmental-news/blogs/hurricanes-storms/hurricanes-storms-rss'), (u'The Zen Cleaner', u'http://www.thedailygreen.com/green-homes/blogs/nontoxic/nontoxic-rss'), (u'What to Eat', u'http://www.thedailygreen.com/healthy-eating/blogs/healthy-food/healthy-food-rss'), (u'Urth Guy', u'http://www.thedailygreen.com/living-green/blogs/recycling-design-technology/recycling-design-technology-rss')] Code:
calibre, version 0.8.1 ERROR: Conversion Error: <b>Failed</b>: Fetch news from thedailygreen Fetch news from thedailygreen Resolved conversion options calibre version: 0.8.1 {'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_download_recipe': False, 'dont_split_on_page_breaks': True, 'enable_heuristics': False, 'epub_flatten': False, 'extra_css': None, 'extract_to': None, 'fix_indents': True, 'flow_size': 260, 'font_size_mapping': None, 'format_scene_breaks': True, 'html_unwrap_factor': 0.4, 'input_encoding': None, 'input_profile': <calibre.customize.profiles.InputProfile object at 0x041EC1D0>, '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, 'no_chapters_in_toc': False, 'no_default_epub_cover': False, 'no_inline_navbars': False, 'no_svg_cover': False, 'output_profile': <calibre.customize.profiles.TabletOutput object at 0x041EC690>, 'page_breaks_before': None, 'password': None, 'prefer_metadata_cover': False, 'preserve_cover_aspect_ratio': False, 'pretty_print': True, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': None, 'remove_fake_margins': True, 'remove_first_image': False, 'remove_paragraph_spacing': False, 'remove_paragraph_spacing_indent_size': 1.5, 'renumber_headings': True, 'replace_scene_breaks': '', '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, 'unwrap_lines': True, 'use_auto_toc': False, 'username': None, 'verbose': 2} InputFormatPlugin: Recipe Input running Python function terminated unexpectedly (Error Code: 1) Traceback (most recent call last): File "site.py", line 103, in main File "site.py", line 85, in run_entry_point File "site-packages\calibre\utils\ipc\worker.py", line 119, 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 920, 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 735, in download File "site-packages\calibre\web\feeds\news.py", line 877, in build_index File "site-packages\calibre\web\feeds\news.py", line 1304, in parse_feeds File "site-packages\calibre\web\feeds\news.py", line 352, in get_feeds NotImplementedError |
05-16-2011, 10:35 AM | #14 |
Zealot
Posts: 119
Karma: 100
Join Date: Jan 2011
Location: Germany / NRW /Köln
Device: prs-650 / prs-350 /kindle 3
|
this work`s for me
Code:
class AdvancedUserRecipe1305547242(BasicNewsRecipe): title = u'thedailygreen' oldest_article = 7 max_articles_per_feed = 1 no_stylesheets = True use_embedded_content = False remove_javascript = True def print_version(self,url): segments = url.split('/') printURL = '/'.join(segments[0:3]) + '/print-this/' + '/'.join(segments[4:]) return printURL def preprocess_html(self, soup): for alink in soup.findAll('a'): if alink.string is not None: tstr = alink.string alink.replaceWith(tstr) return soup feeds = [ (u'Green Homes', u'http://www.thedailygreen.com/green-homes/rss/'), (u'New Green Cuisine', u'http://www.thedailygreen.com/healthy-eating/rss/'), (u'Living Green', u'http://www.thedailygreen.com/living-green/rss/'), (u'Ask An Organic Mom', u'http://www.thedailygreen.com/living-green/blogs/organic-parenting/organic-parenting-rss'), (u'Backyard Matters', u'http://www.thedailygreen.com/living-green/blogs/easy-tips/easy-tips-rss'), (u'Big Green Purse', u'http://www.thedailygreen.com/green-homes/blogs/green-products-services/green-products-services-rss'), (u'Driving Directions Getting There Green', u'http://www.thedailygreen.com/living-green/blogs/cars-transportation/cars-transportation-rss'), (u'Green Hacks', u'http://www.thedailygreen.com/green-homes/blogs/diy-hacks/diy-hacks-rss'), (u'Pix We Need From You', u'http://www.thedailygreen.com/weird-weather/blogs/submit/submit-rss'), (u'Recipes from the Gluten-Free Girl', u'http://www.thedailygreen.com/healthy-eating/blogs/gluten-free/gluten-free-rss'), (u'Shapattack', u'http://www.thedailygreen.com/environmental-news/blogs/shapley/shapley-rss'), (u'SOLE Food Digest', u'http://www.thedailygreen.com/healthy-eating/blogs/organic-sustainable-food/organic-sustainable-food-rss'), (u'Starre Power: Fashion and Beauty', u'http://www.thedailygreen.com/living-green/blogs/fashion-beauty/fashion-beauty-rss'), (u'The 100 Mile Diet', u'http://www.thedailygreen.com/healthy-eating/blogs/100-mile-diet/100-mile-diet-rss'), (u'The Beekeeper', u'http://www.thedailygreen.com/environmental-news/blogs/bees/bees-rss'), (u'The Green Carpet: Hollywood', u'http://www.thedailygreen.com/living-green/blogs/celebrities/celebrities-rss'), (u'The Green Cheapskate', u'http://www.thedailygreen.com/living-green/blogs/save-money/save-money-rss'), (u'The Green Conservative', u'http://www.thedailygreen.com/environmental-news/blogs/republican/republican-rss'), (u'The Greengrower', u'http://www.thedailygreen.com/green-homes/blogs/organic-gardening/organic-gardening-rss'), (u'The Hypermiler', u'http://www.thedailygreen.com/living-green/blogs/gas-mileage/gas-mileage-rss'), (u'The Storm Pundit', u'http://www.thedailygreen.com/environmental-news/blogs/hurricanes-storms/hurricanes-storms-rss'), (u'The Zen Cleaner', u'http://www.thedailygreen.com/green-homes/blogs/nontoxic/nontoxic-rss'), (u'What to Eat', u'http://www.thedailygreen.com/healthy-eating/blogs/healthy-food/healthy-food-rss'), (u'Urth Guy', u'http://www.thedailygreen.com/living-green/blogs/recycling-design-technology/recycling-design-technology-rss')] |
05-16-2011, 10:39 AM | #15 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tutorial - How to Create a MobiPocket eBook | HarryT | Kindle Books | 80 | 10-27-2016 11:32 AM |
getting the print version | eremiya | Recipes | 3 | 03-18-2011 06:48 AM |
getting the print version | ccrriiss | Recipes | 0 | 02-27-2011 04:33 PM |
Updated Christian Bible Launches eBook Version Before Print Version | tubemonkey | News | 21 | 12-30-2010 03:53 PM |
If i have a print version... | dhume01 | General Discussions | 3 | 10-06-2010 08:38 PM |