# SOME DESCRIPTIVE TITLE.
# Copyright (C) Kovid Goyal
# This file is distributed under the same license as the calibre package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: calibre 2.5.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-10-03 09:06+0530\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: ../../home/kovid/work/calibre/manual/news.rst:5
# 4c4beffc73734007accb58e85ca98dc2
msgid "Adding your favorite news website"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:7
# 5b176cece2b04f3aa24a75ead36e3f41
msgid "|app| has a powerful, flexible and easy-to-use framework for downloading news from the Internet and converting it into an ebook. The following will show you, by means of examples, how to get news from various websites."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:9
# c99d6d86454c40bf9df049ab0d05837a
msgid "To gain an understanding of how to use the framework, follow the examples in the order listed below:"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:16
# a63acd4abbd14a1a8be4c36142b2a1af
msgid "Completely automatic fetching"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:18
# 98ef90a486414befbbf3b6d6cfcb5239
msgid "If your news source is simple enough, |app| may well be able to fetch it completely automatically, all you need to do is provide the URL. |app| gathers all the information needed to download a news source into a :term:`recipe`. In order to tell |app| about a news source, you have to create a :term:`recipe` for it. Let's see some examples:"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:23
# 6ee4f3b6cc084e42b5369663218f4dec
msgid "portfolio.com"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:25
# 7e02bd86998741ab8eb3490401a035bd
msgid "*portfolio.com* is the website for *Condé Nast Portfolio*, a business related magazine. In order to download articles from the magazine and convert them to ebooks, we rely on the :term:`RSS` feeds of portfolio.com. A list of such feeds is available at http://www.portfolio.com/rss/."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:27
# e050c32bda7b4b0281d03d563b5be263
msgid "Lets pick a couple of feeds that look interesting:"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:29
# 01bd24a9bbcc42efbcfdab7a2cc492d2
msgid "Business Travel: http://feeds.portfolio.com/portfolio/businesstravel"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:30
# 2e11ff9f9b8d4975be255bafae9cf11f
msgid "Tech Observer: http://feeds.portfolio.com/portfolio/thetechobserver"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:32
# ca695b27dedd460ebf50267918581ed7
msgid "I got the URLs by clicking the little orange RSS icon next to each feed name. To make |app| download the feeds and convert them into an ebook, you should right click the :guilabel:`Fetch news` button and then the :guilabel:`Add a custom news source` menu item. A dialog similar to that shown below should open up."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:37
# dcff288753314be08a14c5f60d6cbe99
msgid "First enter ``Portfolio`` into the :guilabel:`Recipe title` field. This will be the title of the ebook that will be created from the articles in the above feeds."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:39
# 3fd2c359ea1846aca9b8b03b5caa3d3b
msgid "The next two fields (:guilabel:`Oldest article` and :guilabel:`Max. number of articles`) allow you some control over how many articles should be downloaded from each feed, and they are pretty self explanatory."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:41
# 165bedafba394f39b1225d047770faf1
msgid "To add the feeds to the recipe, enter the feed title and the feed URL and click the :guilabel:`Add feed` button. Once you have added both feeds, simply click the :guilabel:`Add/update recipe` button and you're done! Close the dialog."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:43
# d1b6a2e1c19f45c9b57d8d64325e23db
msgid "To test your new :term:`recipe`, click the :guilabel:`Fetch news` button and in the :guilabel:`Custom news sources` sub-menu click :guilabel:`Portfolio`. After a couple of minutes, the newly downloaded Portfolio ebook will appear in the main library view (if you have your reader connected, it will be put onto the reader instead of into the library). Select it and hit the :guilabel:`View` button to read!"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:45
# 1f3ad6fc9e8d41f39468d60b95ba57a3
msgid "The reason this worked so well, with so little effort is that *portfolio.com* provides *full-content* :term:`RSS` feeds, i.e., the article content is embedded in the feed itself. For most news sources that provide news in this fashion, with *full-content* feeds, you don't need any more effort to convert them to ebooks. Now we will look at a news source that does not provide full content feeds. In such feeds, the full article is a webpage and the feed only contains a link to the webpage with a short summary of the article."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:50
# 5f0c3da3a15841079f556c34011e5fa7
msgid "bbc.co.uk"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:52
# 1022e02d82134e5fa41f303f27a374f9
msgid "Lets try the following two feeds from *The BBC*:"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:54
# 9747327c67d14952b6fe0cb4fc3d50ab
msgid "News Front Page: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:55
# 98bfcbba12b94bdabb50257964c4ba9c
msgid "Science/Nature: http://newsrss.bbc.co.uk/rss/newsonline_world_edition/science/nature/rss.xml"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:57
# 55b44b27919046d1833c3ae18fc267e2
msgid "Follow the procedure outlined in :ref:`portfolio` to create a recipe for *The BBC* (using the feeds above). Looking at the downloaded ebook, we see that |app| has done a creditable job of extracting only the content you care about from each article's webpage. However, the extraction process is not perfect. Sometimes it leaves in undesirable content like menus and navigation aids or it removes content that should have been left alone, like article headings. In order, to have perfect content extraction, we will need to customize the fetch process, as described in the next section."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:60
# 4dee9cc3ff754f0da575d01b5803bcaa
msgid "Customizing the fetch process"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:62
# 3dcd25bdd68a4fc3af0c61ebb5df7a45
msgid "When you want to perfect the download process, or download content from a particularly complex website, you can avail yourself of all the power and flexibility of the :term:`recipe` framework. In order to do that, in the :guilabel:`Add custom news sources` dialog, simply click the :guilabel:`Switch to Advanced mode` button."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:64
# 6c1f0a4ebd7346e08862341836ed9743
msgid "The easiest and often most productive customization is to use the print version of the online articles. The print version typically has much less cruft and translates much more smoothly to an ebook. Let's try to use the print version of the articles from *The BBC*."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:67
# 2c13d6d8254f48b582ca4c55d47dfd24
msgid "Using the print version of bbc.co.uk"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:69
# a0553c2e8a4640069e0d1fb725fa13fa
msgid "The first step is to look at the ebook we downloaded previously from :ref:`bbc`. At the end of each article, in the ebook is a little blurb telling you where the article was downloaded from. Copy and paste that URL into a browser. Now on the article webpage look for a link that points to the \"Printable version\". Click it to see the print version of the article. It looks much neater! Now compare the two URLs. For me they were:"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:72
# af6ab0d5bb254fe4b8bd1412811afb40
msgid "Article URL"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:72
# 636522c964d44149957495cd01ca5dcb
msgid "http://news.bbc.co.uk/2/hi/science/nature/7312016.stm"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:75
# 7c19ea8ee21f4d3392c55d4e1078e521
msgid "Print version URL"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:75
# 89398f866ace492fa82085f743c4bf4a
msgid "http://newsvote.bbc.co.uk/mpapps/pagetools/print/news.bbc.co.uk/2/hi/science/nature/7312016.stm"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:77
# ea5c9f04b38c42c189f3785681d88289
msgid "So it looks like to get the print version, we need to prefix every article URL with:"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:79
# 19aebe9395dd499385261ecc9d7367e9
msgid "newsvote.bbc.co.uk/mpapps/pagetools/print/"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:81
# 60bf3862950044139fc593f9f2805eaa
msgid "Now in the :guilabel:`Advanced Mode` of the Custom  news sources dialog, you should see something like (remember to select *The BBC* recipe before switching to advanced mode):"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:86
# d44a8b1540394a2b8c36a8d09e535f96
msgid "You can see that the fields from the :guilabel:`Basic mode` have been translated to python code in a straightforward manner. We need to add instructions to this recipe to use the print version of the articles. All that's needed is to add the following two lines:"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:93
# 83a1e46ac01542069f1bf69018a1ff9e
msgid "This is python, so indentation is important. After you've added the lines, it should look like:"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:98
# 7aee6a4b1bbf4332aba50d6c9982b057
msgid "In the above, ``def print_version(self, url)`` defines a *method* that is called by |app| for every article. ``url`` is the URL of the original article. What ``print_version`` does is take that url and replace it with the new URL that points to the print version of the article. To learn about `python <http://www.python.org>`_ see the `tutorial <http://docs.python.org/tut/>`_."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:100
# 6647316849b749a3849e3ccb516ca74b
msgid "Now, click the :guilabel:`Add/update recipe` button and your changes will be saved. Re-download the ebook. You should have a much improved ebook. One of the problems with the new version is that the fonts on the print version webpage are too small. This is automatically fixed when converting to an ebook, but even after the fixing process, the font size of the menus and navigation bar to become too large relative to the article text. To fix this, we will do some more customization, in the next section."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:103
# 3228ef32cdc24bea89d2f91752aeb125
msgid "Replacing article styles"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:105
# 295fc9bf598d4699a21e33dc9fd3e4f5
msgid "In the previous section, we saw that the font size for articles from the print version of *The BBC* was too small. In most websites, *The BBC* included, this font size is set by means of :term:`CSS` stylesheets. We can disable the fetching of such stylesheets by adding the line::"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:109
# abd72998df7a40f89704c56e3f1a6658
msgid "The recipe now looks like:"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:116
# 8eafd89a67164772836787d69457aa8e
msgid "The new version looks pretty good. If you're a perfectionist, you'll want to read the next section, which deals with actually modifying the downloaded content."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:119
# 3ae710a5e282404a877d8e0e6bddc61b
msgid "Slicing and dicing"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:121
# ba4b0e39d29a4e86bef70395b1946838
msgid "|app| contains very powerful and flexible abilities when it comes to manipulating downloaded content. To show off a couple of these, let's look at our old friend the :ref:`The BBC <bbc1>` recipe again. Looking at the source code (:term:`HTML`) of a couple of articles (print version), we see that they have a footer that contains no useful information, contained in"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:129
# 7b149e8e056b4b27abae1dd2f9f449d9
msgid "This can be removed by adding::"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:133
# c16ff5d0754c463ebc8c2d8923f14040
msgid "to the recipe. Finally, lets replace some of the :term:`CSS` that we disabled earlier, with our own :term:`CSS` that is suitable for conversion to an ebook::"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:137
# 0c4bc8e459d04b9983b9a90f1992e587
msgid "With these additions, our recipe has become \"production quality\", indeed it is very close to the actual recipe used by |app| for the *BBC*, shown below:"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:141
# 8d4aac65903440fbae440e62740f2f89
msgid "This :term:`recipe` explores only the tip of the iceberg when it comes to the power of |app|. To explore more of the abilities of |app| we'll examine a more complex real life example in the next section."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:144
# 1128e1364000457f9e7964cc7c470868
msgid "Real life example"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:146
# 6f9776d7342f4fb98cdbb302b179638d
msgid "A reasonably complex real life example that exposes more of the :term:`API` of ``BasicNewsRecipe`` is the :term:`recipe` for *The New York Times*"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:232
# 69e544f9fa1c4e2a91e8a65e4f49a102
msgid "We see several new features in this :term:`recipe`. First, we have::"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:236
# d33a6b9e1e8241619b0d25f2df5f6809
msgid "This sets the displayed time on the front page of the created ebook to be in the format, ``Day, Day_Number Month, Year``. See :attr:`timefmt <calibre.web.feeds.news.BasicNewsRecipe.timefmt>`."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:239
# adbe8eb4aaf74abdadf60f7e24cceb93
msgid "Then we see a group of directives to cleanup the downloaded :term:`HTML`::"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:245
# 03a8acbaf10a4e04973ddd8bed7f530f
msgid "These remove everything before the first ``<h1>`` tag and everything after the first tag whose id is ``footer``. See :attr:`remove_tags <calibre.web.feeds.news.BasicNewsRecipe.remove_tags>`, :attr:`remove_tags_before <calibre.web.feeds.news.BasicNewsRecipe.remove_tags_before>`, :attr:`remove_tags_after <calibre.web.feeds.news.BasicNewsRecipe.remove_tags_after>`."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:247
# 8c48b747b0b047d39a8fc62c667a8057
msgid "The next interesting feature is::"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:254
# d65adfa84e1b4532b6b355c9c54c150c
msgid "``needs_subscription = True`` tells |app| that this recipe needs a username and password in order to access the content. This causes, |app| to ask for a username and password whenever you try to use this recipe. The code in :meth:`calibre.web.feeds.news.BasicNewsRecipe.get_browser` actually does the login into the NYT website. Once logged in, |app| will use the same, logged in, browser instance to fetch all content. See `mechanize <http://wwwsearch.sourceforge.net/mechanize/>`_ to understand the code in ``get_browser``."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:256
# e91d397006154a4b8e844624ba689a3b
msgid "The next new feature is the :meth:`calibre.web.feeds.news.BasicNewsRecipe.parse_index` method. Its job is to go to http://www.nytimes.com/pages/todayspaper/index.html and fetch the list of articles that appear in *todays* paper. While more complex than simply using :term:`RSS`, the recipe creates an ebook that corresponds very closely to the days paper. ``parse_index`` makes heavy use of `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/documentation.html>`_ to parse the daily paper webpage. You can also use other, more modern parsers if you dislike BeatifulSoup. calibre comes with `lxml <http://lxml.de/>`_ and `html5lib <https://github.com/html5lib/html5lib-python>`_, which are the recommended parsers. To use them, replace the call to ``index_to_soup()`` with the following::"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:277
# 1a67027880184b29b3a1c63498fddcf3
msgid "The final new feature is the :meth:`calibre.web.feeds.news.BasicNewsRecipe.preprocess_html` method. It can be used to perform arbitrary transformations on every downloaded HTML page. Here it is used to bypass the ads that the nytimes shows you before each article."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:280
# 21980675f3a0427f8a9671a73f367cdc
msgid "Tips for developing new recipes"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:282
# 078f459937904eefb4618e35d417145b
msgid "The best way to develop new recipes is to use the command line interface. Create the recipe using your favorite python editor and save it to a file say :file:`myrecipe.recipe`. The `.recipe` extension is required. You can download content using this recipe with the command::"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:286
# bff11e75aec640e5ab02d1a360a367d1
msgid "The command :command:`ebook-convert` will download all the webpages and save them to the EPUB file :file:`myrecipe.epub`. The :option:`-vv` makes ebook-convert spit out a lot of information about what it is doing. The :option:`--test` makes it download only a couple of articles from at most two feeds. In addition, ebook-convert will put the downloaded HTML into the ``debug/input`` directory, where ``debug`` is the directory you specified in the :option:`--debug-pipeline` option."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:288
# 31e7f89bfbed4c28b50b37acbae34c3e
msgid "Once the download is complete, you can look at the downloaded :term:`HTML` by opening the file :file:`debug/input/index.html` in a browser. Once you're satisfied that the download and preprocessing is happening correctly, you can generate ebooks in different formats as shown below::"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:295
# ffdbf87f95494962bda5c26e8a41f22e
msgid "If you're satisfied with your recipe, and you feel there is enough demand to justify its inclusion into the set of built-in recipes, post your recipe in the `calibre recipes forum <http://www.mobileread.com/forums/forumdisplay.php?f=228>`_ to share it with other calibre users."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:298
# b8ea1186c55040fc8fcb66fd8ee9c22b
msgid "On OS X, the command line tools are inside the |app| bundle, for example, if you installed calibre in :file:`/Applications` the command line tools are in :file:`/Applications/calibre.app/Contents/console.app/Contents/MacOS/`."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:304
# b303c2dcb6e749adad036fb64e099d83
msgid ":doc:`generated/en/ebook-convert`"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:305
# 3d7b2b20c2f94c299066d35e9784cc02
msgid "The command line interface for all ebook conversion."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:309
# 920037ec7af24b2083e189b9e6983174
msgid "Further reading"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:311
# f1938325a8cb440088df720b473a7d21
msgid "To learn more about writing advanced recipes using some of the facilities, available in ``BasicNewsRecipe`` you should consult the following sources:"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:314
# 4d1778436d524eaab60510f1d80304ef
msgid ":ref:`API Documentation <news_recipe>`"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:314
# dd909461c62c4827aa38bd018376ef14
msgid "Documentation of the ``BasicNewsRecipe`` class and all its important methods and fields."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:317
# 1cc72ac0d59d4a969037bfbb7480891d
msgid "`BasicNewsRecipe <http://bazaar.launchpad.net/~kovid/calibre/trunk/annotate/head:/src/calibre/web/feeds/news.py>`_"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:317
# 6dd8e6ea03074b6286ffbf9364f8f891
msgid "The source code of ``BasicNewsRecipe``"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:320
# 84394a5672584a2a91f4e979a036a478
msgid "`Built-in recipes <http://bazaar.launchpad.net/~kovid/calibre/trunk/files/head:/recipes/>`_"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:320
# 204bfc9b5bc8454695b9d610f09e6344
msgid "The source code for the built-in recipes that come with |app|"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:324
# 6875c3ce9a404768aaab42ec29c25548
msgid "`The calibre recipes forum <http://www.mobileread.com/forums/forumdisplay.php?f=228>`_"
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:323
# df36ce770372497b9bf8b1df7cc7c2b0
msgid "Lots of knowledgeable |app| recipe writers hang out here."
msgstr ""

#: ../../home/kovid/work/calibre/manual/news.rst:327
# 47bd33ce1831458392c8491a4fad75f5
msgid "API documentation"
msgstr ""

