# SOME DESCRIPTIVE TITLE. # Copyright (C) Kovid Goyal # This file is distributed under the same license as the calibre package. # # Translators: msgid "" msgstr "" "Project-Id-Version: calibre\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-10-17 08:20+0530\n" "PO-Revision-Date: 2014-10-17 02:53+0000\n" "Last-Translator: Kovid Goyal \n" "Language-Team: Slovenian (Slovenia) (http://www.transifex.com/projects/p/calibre/language/sl_SI/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: sl_SI\n" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" # 14a1328bf28846488b70901fcb0f88e1 #: ../../home/kovid/work/calibre/manual/news.rst:4 msgid "Adding your favorite news website" msgstr "" # 015b6c8e206f4056ac5b9f2bf63e5817 #: ../../home/kovid/work/calibre/manual/news.rst:6 msgid "" "calibre 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 "" # 0654bd56ace341d0a01515737c666b30 #: ../../home/kovid/work/calibre/manual/news.rst:8 msgid "" "To gain an understanding of how to use the framework, follow the examples in" " the order listed below:" msgstr "" # 82357523c51746429d1b3900289a88b0 #: ../../home/kovid/work/calibre/manual/news.rst:15 msgid "Completely automatic fetching" msgstr "" # 724f3302cf3f42c3bb1798ed00a80c23 #: ../../home/kovid/work/calibre/manual/news.rst:17 msgid "" "If your news source is simple enough, calibre may well be able to fetch it " "completely automatically, all you need to do is provide the URL. calibre " "gathers all the information needed to download a news source into a " ":term:`recipe`. In order to tell calibre about a news source, you have to " "create a :term:`recipe` for it. Let's see some examples:" msgstr "" # 24c07fc6e62a410bb25b26a1e5718699 #: ../../home/kovid/work/calibre/manual/news.rst:22 msgid "portfolio.com" msgstr "" # 638289e3a50644c3912b0436a008b6e9 #: ../../home/kovid/work/calibre/manual/news.rst:24 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 "" # e13fbc6206be4687b0854c1d1a5549c6 #: ../../home/kovid/work/calibre/manual/news.rst:26 msgid "Lets pick a couple of feeds that look interesting:" msgstr "" # 269419bcc46d49d29c5bb055ec19b16b #: ../../home/kovid/work/calibre/manual/news.rst:28 msgid "Business Travel: http://feeds.portfolio.com/portfolio/businesstravel" msgstr "" # 95b667efdc8a4750a4145940548c84a6 #: ../../home/kovid/work/calibre/manual/news.rst:29 msgid "Tech Observer: http://feeds.portfolio.com/portfolio/thetechobserver" msgstr "" # 959a64489cb84198980ce4883e3daaa9 #: ../../home/kovid/work/calibre/manual/news.rst:31 msgid "" "I got the URLs by clicking the little orange RSS icon next to each feed " "name. To make calibre 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 "" # cc32fbd1910243cda170eb8e91867aa1 #: ../../home/kovid/work/calibre/manual/news.rst:36 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 "" # a29b14b813244eed98b63a61448dc968 #: ../../home/kovid/work/calibre/manual/news.rst:38 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 "" # 00fb1d188400460a99b90a34eb35ad39 #: ../../home/kovid/work/calibre/manual/news.rst:40 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 "" # a418b74f4219488bb688335d1939100b #: ../../home/kovid/work/calibre/manual/news.rst:42 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 "" # cc19f496dec242fb8ee32d8a66e7ff50 #: ../../home/kovid/work/calibre/manual/news.rst:44 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 "" # 868c026982884dc4a9d5ec278d11e472 #: ../../home/kovid/work/calibre/manual/news.rst:49 msgid "bbc.co.uk" msgstr "" # aa6d5740fa834e6b8e6c546963029861 #: ../../home/kovid/work/calibre/manual/news.rst:51 msgid "Lets try the following two feeds from *The BBC*:" msgstr "" # 00b56045e75746f18a4fb95c69dc6e95 #: ../../home/kovid/work/calibre/manual/news.rst:53 msgid "" "News Front Page: " "http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml" msgstr "" # fb7ec7f399e24ec3aadbe615a1ccbda0 #: ../../home/kovid/work/calibre/manual/news.rst:54 msgid "" "Science/Nature: " "http://newsrss.bbc.co.uk/rss/newsonline_world_edition/science/nature/rss.xml" msgstr "" # 605e7cde02b74939bbf3706d68a8738f #: ../../home/kovid/work/calibre/manual/news.rst:56 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 calibre 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 "" # f33aa6cb49e7490aa14dd8520ae9df23 #: ../../home/kovid/work/calibre/manual/news.rst:59 msgid "Customizing the fetch process" msgstr "" # 98393ee1b4ae4190b08bf1a805028545 #: ../../home/kovid/work/calibre/manual/news.rst:61 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 "" # 51cc6fe84fa74259811948b38e3a4058 #: ../../home/kovid/work/calibre/manual/news.rst:63 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 "" # af8e7fea2e17452396d589427cc07d4b #: ../../home/kovid/work/calibre/manual/news.rst:66 msgid "Using the print version of bbc.co.uk" msgstr "" # 3ffd3e60ce1246328297c70cff03a33c #: ../../home/kovid/work/calibre/manual/news.rst:68 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 "" # 9eed6698d16643ae9d1568017df18833 #: ../../home/kovid/work/calibre/manual/news.rst:71 msgid "Article URL" msgstr "" # f4b4f0a8eaff4e0f82dfb55b853ed440 #: ../../home/kovid/work/calibre/manual/news.rst:71 msgid "http://news.bbc.co.uk/2/hi/science/nature/7312016.stm" msgstr "" # 0a508206a76c4b0d9da5333840e8baa3 #: ../../home/kovid/work/calibre/manual/news.rst:74 msgid "Print version URL" msgstr "" # d4d93509702f43b8a1b989bfe3e5f685 #: ../../home/kovid/work/calibre/manual/news.rst:74 msgid "" "http://newsvote.bbc.co.uk/mpapps/pagetools/print/news.bbc.co.uk/2/hi/science/nature/7312016.stm" msgstr "" # dada9959b2174f9f9ae35e31eb1c64d7 #: ../../home/kovid/work/calibre/manual/news.rst:76 msgid "" "So it looks like to get the print version, we need to prefix every article " "URL with:" msgstr "" # c5e769f06fb9499b9ac720bb66d08218 #: ../../home/kovid/work/calibre/manual/news.rst:78 msgid "newsvote.bbc.co.uk/mpapps/pagetools/print/" msgstr "" # 6a0cd7ebddc94ca890992a811163f156 #: ../../home/kovid/work/calibre/manual/news.rst:80 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 "" # f36e7c0d71ec41b39f8d9357d5098ae0 #: ../../home/kovid/work/calibre/manual/news.rst:85 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 "" # d1b354cce4b34d8dbfe73c18a3df6541 #: ../../home/kovid/work/calibre/manual/news.rst:92 msgid "" "This is python, so indentation is important. After you've added the lines, " "it should look like:" msgstr "" # 596f456ea6334669a85dfa9bf2f3af13 #: ../../home/kovid/work/calibre/manual/news.rst:97 msgid "" "In the above, ``def print_version(self, url)`` defines a *method* that is " "called by calibre 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 `_ see the `tutorial " "`_." msgstr "" # 6c968264c6c74cbf83fe2f1bf5507f34 #: ../../home/kovid/work/calibre/manual/news.rst:99 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 "" # 93224738c1424a40b23b23c1aa1abefd #: ../../home/kovid/work/calibre/manual/news.rst:102 msgid "Replacing article styles" msgstr "" # 19b1b909b662469eafdfd20aa971daf1 #: ../../home/kovid/work/calibre/manual/news.rst:104 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 "" # 99e78956cb5e48509a1212023fe000c4 #: ../../home/kovid/work/calibre/manual/news.rst:108 msgid "The recipe now looks like:" msgstr "" # bfead1898f904e18a209a01bc888b019 #: ../../home/kovid/work/calibre/manual/news.rst:115 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 "" # ae80afad2dfe485a8242cce769671685 #: ../../home/kovid/work/calibre/manual/news.rst:118 msgid "Slicing and dicing" msgstr "" # 1644ed9b2e3d49408363a4e4eacb01ec #: ../../home/kovid/work/calibre/manual/news.rst:120 msgid "" "calibre 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 ` 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 "" # a1b4c22bfd294b9e91652d423709da14 #: ../../home/kovid/work/calibre/manual/news.rst:128 msgid "This can be removed by adding::" msgstr "" # cc1241a427154f12ab5ac9aace9328d6 #: ../../home/kovid/work/calibre/manual/news.rst:132 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 "" # 9b7e341b2a3d48f49cd5ec7a3e3a5020 #: ../../home/kovid/work/calibre/manual/news.rst:136 msgid "" "With these additions, our recipe has become \"production quality\", indeed " "it is very close to the actual recipe used by calibre for the *BBC*, shown " "below:" msgstr "" # 150066519ae94468a9e46336bb245e85 #: ../../home/kovid/work/calibre/manual/news.rst:140 msgid "" "This :term:`recipe` explores only the tip of the iceberg when it comes to " "the power of calibre. To explore more of the abilities of calibre we'll " "examine a more complex real life example in the next section." msgstr "" # 94d86c3ea0604526a963f0125a89ffa7 #: ../../home/kovid/work/calibre/manual/news.rst:143 msgid "Real life example" msgstr "" # 49ea0265e6ce4dba90d0c1faa82998e4 #: ../../home/kovid/work/calibre/manual/news.rst:145 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 "" # 97088c5a6f674ae89f08d41de7e033c6 #: ../../home/kovid/work/calibre/manual/news.rst:231 msgid "We see several new features in this :term:`recipe`. First, we have::" msgstr "" # be5db86812164d58bc24d1685040fa05 #: ../../home/kovid/work/calibre/manual/news.rst:235 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 " "`." msgstr "" # bcbc2a820ffa41eb8529e6594923f621 #: ../../home/kovid/work/calibre/manual/news.rst:238 msgid "" "Then we see a group of directives to cleanup the downloaded :term:`HTML`::" msgstr "" # bb990b93b40c4747bf6d5db156294be1 #: ../../home/kovid/work/calibre/manual/news.rst:244 msgid "" "These remove everything before the first ``

`` tag and everything after " "the first tag whose id is ``footer``. See :attr:`remove_tags " "`, " ":attr:`remove_tags_before " "`, " ":attr:`remove_tags_after " "`." msgstr "" # 9fc8f8bc6289421e8b938e60a3e14551 #: ../../home/kovid/work/calibre/manual/news.rst:246 msgid "The next interesting feature is::" msgstr "" # 1124392089704895967683cfc3013bf6 #: ../../home/kovid/work/calibre/manual/news.rst:253 msgid "" "``needs_subscription = True`` tells calibre that this recipe needs a " "username and password in order to access the content. This causes, calibre " "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, calibre will use the " "same, logged in, browser instance to fetch all content. See `mechanize " "`_ to understand the code in " "``get_browser``." msgstr "" # 65ea45d0dfa14608b14bfc31b41cf1d6 #: ../../home/kovid/work/calibre/manual/news.rst:255 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" " `_ to " "parse the daily paper webpage. You can also use other, more modern parsers " "if you dislike BeatifulSoup. calibre comes with `lxml `_ " "and `html5lib `_, which are the" " recommended parsers. To use them, replace the call to ``index_to_soup()`` " "with the following::" msgstr "" # 087c534bbb734138a0dc94cbb0c9b17a #: ../../home/kovid/work/calibre/manual/news.rst:276 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 "" # f07b83c7497042bcb02e1518ef9b1b81 #: ../../home/kovid/work/calibre/manual/news.rst:279 msgid "Tips for developing new recipes" msgstr "" # 303bf7b0e9e54411b4dccd9d9e2946ac #: ../../home/kovid/work/calibre/manual/news.rst:281 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 "" # 765a0fef113240918c212d7ac908c47a #: ../../home/kovid/work/calibre/manual/news.rst:285 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 "" # 075f6103d44a4525b09ac10749432bb2 #: ../../home/kovid/work/calibre/manual/news.rst:287 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 "" # 6e50853ba33b4900bf8e4a0d9e3919fe #: ../../home/kovid/work/calibre/manual/news.rst:294 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 " "`_ to share it with" " other calibre users." msgstr "" # b3816376016f4dd0bd909f0699b79385 #: ../../home/kovid/work/calibre/manual/news.rst:297 msgid "" "On OS X, the command line tools are inside the calibre 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 "" # 558118728838443ca9056a2fa695d946 #: ../../home/kovid/work/calibre/manual/news.rst:303 msgid ":doc:`generated/en/ebook-convert`" msgstr "" # aebfb92bd10d48618c745c423ad96972 #: ../../home/kovid/work/calibre/manual/news.rst:304 msgid "The command line interface for all ebook conversion." msgstr "" # 2d4f3df4dd28440a97ecabe629f52c4c #: ../../home/kovid/work/calibre/manual/news.rst:308 msgid "Further reading" msgstr "" # 8116d9e1d7424cfbb091db482afec299 #: ../../home/kovid/work/calibre/manual/news.rst:310 msgid "" "To learn more about writing advanced recipes using some of the facilities, " "available in ``BasicNewsRecipe`` you should consult the following sources:" msgstr "" # c9724839242e4fd897c071ce43c0de56 #: ../../home/kovid/work/calibre/manual/news.rst:313 msgid ":ref:`API Documentation `" msgstr "" # 7a4e3abc8fe74625bd18eda11f7c5e0e #: ../../home/kovid/work/calibre/manual/news.rst:313 msgid "" "Documentation of the ``BasicNewsRecipe`` class and all its important methods" " and fields." msgstr "" # 37ea981e853c455e90f72aa75e0eb700 #: ../../home/kovid/work/calibre/manual/news.rst:316 msgid "" "`BasicNewsRecipe " "`_" msgstr "" # 2097a5bad9364392bb240d40e2cf6dbc #: ../../home/kovid/work/calibre/manual/news.rst:316 msgid "The source code of ``BasicNewsRecipe``" msgstr "" # d5d3b5d9234e49ae8712628828109bbb #: ../../home/kovid/work/calibre/manual/news.rst:319 msgid "" "`Built-in recipes " "`_" msgstr "" # 137c023dc977404698ca562534a9a0d3 #: ../../home/kovid/work/calibre/manual/news.rst:319 msgid "The source code for the built-in recipes that come with calibre" msgstr "" # a51d554135604a02a2930af36af5abc5 #: ../../home/kovid/work/calibre/manual/news.rst:323 msgid "" "`The calibre recipes forum " "`_" msgstr "" # 27e2afdfba564b64a0a66c1ff27f2c89 #: ../../home/kovid/work/calibre/manual/news.rst:322 msgid "Lots of knowledgeable calibre recipe writers hang out here." msgstr "" # c9dbd977ee4a45abaee331fe2d0360cd #: ../../home/kovid/work/calibre/manual/news.rst:326 msgid "API documentation" msgstr ""