| 1 |
# SOME DESCRIPTIVE TITLE. |
| 2 |
# Copyright (C) Kovid Goyal |
| 3 |
# This file is distributed under the same license as the calibre package. |
| 4 |
# |
| 5 |
# Translators: |
| 6 |
msgid "" |
| 7 |
msgstr "" |
| 8 |
"Project-Id-Version: calibre\n" |
| 9 |
"Report-Msgid-Bugs-To: \n" |
| 10 |
"POT-Creation-Date: 2014-10-17 08:20+0530\n" |
| 11 |
"PO-Revision-Date: 2014-10-17 02:53+0000\n" |
| 12 |
"Last-Translator: Kovid Goyal <[email protected]>\n" |
| 13 |
"Language-Team: Slovenian (Slovenia) (http://www.transifex.com/projects/p/calibre/language/sl_SI/)\n" |
| 14 |
"MIME-Version: 1.0\n" |
| 15 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 16 |
"Content-Transfer-Encoding: 8bit\n" |
| 17 |
"Language: sl_SI\n" |
| 18 |
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" |
| 19 |
|
| 20 |
# 14a1328bf28846488b70901fcb0f88e1 |
| 21 |
#: ../../home/kovid/work/calibre/manual/news.rst:4 |
| 22 |
msgid "Adding your favorite news website" |
| 23 |
msgstr "" |
| 24 |
|
| 25 |
# 015b6c8e206f4056ac5b9f2bf63e5817 |
| 26 |
#: ../../home/kovid/work/calibre/manual/news.rst:6 |
| 27 |
msgid "" |
| 28 |
"calibre has a powerful, flexible and easy-to-use framework for downloading " |
| 29 |
"news from the Internet and converting it into an ebook. The following will " |
| 30 |
"show you, by means of examples, how to get news from various websites." |
| 31 |
msgstr "" |
| 32 |
|
| 33 |
# 0654bd56ace341d0a01515737c666b30 |
| 34 |
#: ../../home/kovid/work/calibre/manual/news.rst:8 |
| 35 |
msgid "" |
| 36 |
"To gain an understanding of how to use the framework, follow the examples in" |
| 37 |
" the order listed below:" |
| 38 |
msgstr "" |
| 39 |
|
| 40 |
# 82357523c51746429d1b3900289a88b0 |
| 41 |
#: ../../home/kovid/work/calibre/manual/news.rst:15 |
| 42 |
msgid "Completely automatic fetching" |
| 43 |
msgstr "" |
| 44 |
|
| 45 |
# 724f3302cf3f42c3bb1798ed00a80c23 |
| 46 |
#: ../../home/kovid/work/calibre/manual/news.rst:17 |
| 47 |
msgid "" |
| 48 |
"If your news source is simple enough, calibre may well be able to fetch it " |
| 49 |
"completely automatically, all you need to do is provide the URL. calibre " |
| 50 |
"gathers all the information needed to download a news source into a " |
| 51 |
":term:`recipe`. In order to tell calibre about a news source, you have to " |
| 52 |
"create a :term:`recipe` for it. Let's see some examples:" |
| 53 |
msgstr "" |
| 54 |
|
| 55 |
# 24c07fc6e62a410bb25b26a1e5718699 |
| 56 |
#: ../../home/kovid/work/calibre/manual/news.rst:22 |
| 57 |
msgid "portfolio.com" |
| 58 |
msgstr "" |
| 59 |
|
| 60 |
# 638289e3a50644c3912b0436a008b6e9 |
| 61 |
#: ../../home/kovid/work/calibre/manual/news.rst:24 |
| 62 |
msgid "" |
| 63 |
"*portfolio.com* is the website for *Condé Nast Portfolio*, a business " |
| 64 |
"related magazine. In order to download articles from the magazine and " |
| 65 |
"convert them to ebooks, we rely on the :term:`RSS` feeds of portfolio.com. A" |
| 66 |
" list of such feeds is available at http://www.portfolio.com/rss/." |
| 67 |
msgstr "" |
| 68 |
|
| 69 |
# e13fbc6206be4687b0854c1d1a5549c6 |
| 70 |
#: ../../home/kovid/work/calibre/manual/news.rst:26 |
| 71 |
msgid "Lets pick a couple of feeds that look interesting:" |
| 72 |
msgstr "" |
| 73 |
|
| 74 |
# 269419bcc46d49d29c5bb055ec19b16b |
| 75 |
#: ../../home/kovid/work/calibre/manual/news.rst:28 |
| 76 |
msgid "Business Travel: http://feeds.portfolio.com/portfolio/businesstravel" |
| 77 |
msgstr "" |
| 78 |
|
| 79 |
# 95b667efdc8a4750a4145940548c84a6 |
| 80 |
#: ../../home/kovid/work/calibre/manual/news.rst:29 |
| 81 |
msgid "Tech Observer: http://feeds.portfolio.com/portfolio/thetechobserver" |
| 82 |
msgstr "" |
| 83 |
|
| 84 |
# 959a64489cb84198980ce4883e3daaa9 |
| 85 |
#: ../../home/kovid/work/calibre/manual/news.rst:31 |
| 86 |
msgid "" |
| 87 |
"I got the URLs by clicking the little orange RSS icon next to each feed " |
| 88 |
"name. To make calibre download the feeds and convert them into an ebook, you" |
| 89 |
" should right click the :guilabel:`Fetch news` button and then the " |
| 90 |
":guilabel:`Add a custom news source` menu item. A dialog similar to that " |
| 91 |
"shown below should open up." |
| 92 |
msgstr "" |
| 93 |
|
| 94 |
# cc32fbd1910243cda170eb8e91867aa1 |
| 95 |
#: ../../home/kovid/work/calibre/manual/news.rst:36 |
| 96 |
msgid "" |
| 97 |
"First enter ``Portfolio`` into the :guilabel:`Recipe title` field. This will" |
| 98 |
" be the title of the ebook that will be created from the articles in the " |
| 99 |
"above feeds." |
| 100 |
msgstr "" |
| 101 |
|
| 102 |
# a29b14b813244eed98b63a61448dc968 |
| 103 |
#: ../../home/kovid/work/calibre/manual/news.rst:38 |
| 104 |
msgid "" |
| 105 |
"The next two fields (:guilabel:`Oldest article` and :guilabel:`Max. number " |
| 106 |
"of articles`) allow you some control over how many articles should be " |
| 107 |
"downloaded from each feed, and they are pretty self explanatory." |
| 108 |
msgstr "" |
| 109 |
|
| 110 |
# 00fb1d188400460a99b90a34eb35ad39 |
| 111 |
#: ../../home/kovid/work/calibre/manual/news.rst:40 |
| 112 |
msgid "" |
| 113 |
"To add the feeds to the recipe, enter the feed title and the feed URL and " |
| 114 |
"click the :guilabel:`Add feed` button. Once you have added both feeds, " |
| 115 |
"simply click the :guilabel:`Add/update recipe` button and you're done! Close" |
| 116 |
" the dialog." |
| 117 |
msgstr "" |
| 118 |
|
| 119 |
# a418b74f4219488bb688335d1939100b |
| 120 |
#: ../../home/kovid/work/calibre/manual/news.rst:42 |
| 121 |
msgid "" |
| 122 |
"To test your new :term:`recipe`, click the :guilabel:`Fetch news` button and" |
| 123 |
" in the :guilabel:`Custom news sources` sub-menu click " |
| 124 |
":guilabel:`Portfolio`. After a couple of minutes, the newly downloaded " |
| 125 |
"Portfolio ebook will appear in the main library view (if you have your " |
| 126 |
"reader connected, it will be put onto the reader instead of into the " |
| 127 |
"library). Select it and hit the :guilabel:`View` button to read!" |
| 128 |
msgstr "" |
| 129 |
|
| 130 |
# cc19f496dec242fb8ee32d8a66e7ff50 |
| 131 |
#: ../../home/kovid/work/calibre/manual/news.rst:44 |
| 132 |
msgid "" |
| 133 |
"The reason this worked so well, with so little effort is that " |
| 134 |
"*portfolio.com* provides *full-content* :term:`RSS` feeds, i.e., the article" |
| 135 |
" content is embedded in the feed itself. For most news sources that provide " |
| 136 |
"news in this fashion, with *full-content* feeds, you don't need any more " |
| 137 |
"effort to convert them to ebooks. Now we will look at a news source that " |
| 138 |
"does not provide full content feeds. In such feeds, the full article is a " |
| 139 |
"webpage and the feed only contains a link to the webpage with a short " |
| 140 |
"summary of the article." |
| 141 |
msgstr "" |
| 142 |
|
| 143 |
# 868c026982884dc4a9d5ec278d11e472 |
| 144 |
#: ../../home/kovid/work/calibre/manual/news.rst:49 |
| 145 |
msgid "bbc.co.uk" |
| 146 |
msgstr "" |
| 147 |
|
| 148 |
# aa6d5740fa834e6b8e6c546963029861 |
| 149 |
#: ../../home/kovid/work/calibre/manual/news.rst:51 |
| 150 |
msgid "Lets try the following two feeds from *The BBC*:" |
| 151 |
msgstr "" |
| 152 |
|
| 153 |
# 00b56045e75746f18a4fb95c69dc6e95 |
| 154 |
#: ../../home/kovid/work/calibre/manual/news.rst:53 |
| 155 |
msgid "" |
| 156 |
"News Front Page: " |
| 157 |
"http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml" |
| 158 |
msgstr "" |
| 159 |
|
| 160 |
# fb7ec7f399e24ec3aadbe615a1ccbda0 |
| 161 |
#: ../../home/kovid/work/calibre/manual/news.rst:54 |
| 162 |
msgid "" |
| 163 |
"Science/Nature: " |
| 164 |
"http://newsrss.bbc.co.uk/rss/newsonline_world_edition/science/nature/rss.xml" |
| 165 |
msgstr "" |
| 166 |
|
| 167 |
# 605e7cde02b74939bbf3706d68a8738f |
| 168 |
#: ../../home/kovid/work/calibre/manual/news.rst:56 |
| 169 |
msgid "" |
| 170 |
"Follow the procedure outlined in :ref:`portfolio` to create a recipe for " |
| 171 |
"*The BBC* (using the feeds above). Looking at the downloaded ebook, we see " |
| 172 |
"that calibre has done a creditable job of extracting only the content you " |
| 173 |
"care about from each article's webpage. However, the extraction process is " |
| 174 |
"not perfect. Sometimes it leaves in undesirable content like menus and " |
| 175 |
"navigation aids or it removes content that should have been left alone, like" |
| 176 |
" article headings. In order, to have perfect content extraction, we will " |
| 177 |
"need to customize the fetch process, as described in the next section." |
| 178 |
msgstr "" |
| 179 |
|
| 180 |
# f33aa6cb49e7490aa14dd8520ae9df23 |
| 181 |
#: ../../home/kovid/work/calibre/manual/news.rst:59 |
| 182 |
msgid "Customizing the fetch process" |
| 183 |
msgstr "" |
| 184 |
|
| 185 |
# 98393ee1b4ae4190b08bf1a805028545 |
| 186 |
#: ../../home/kovid/work/calibre/manual/news.rst:61 |
| 187 |
msgid "" |
| 188 |
"When you want to perfect the download process, or download content from a " |
| 189 |
"particularly complex website, you can avail yourself of all the power and " |
| 190 |
"flexibility of the :term:`recipe` framework. In order to do that, in the " |
| 191 |
":guilabel:`Add custom news sources` dialog, simply click the " |
| 192 |
":guilabel:`Switch to Advanced mode` button." |
| 193 |
msgstr "" |
| 194 |
|
| 195 |
# 51cc6fe84fa74259811948b38e3a4058 |
| 196 |
#: ../../home/kovid/work/calibre/manual/news.rst:63 |
| 197 |
msgid "" |
| 198 |
"The easiest and often most productive customization is to use the print " |
| 199 |
"version of the online articles. The print version typically has much less " |
| 200 |
"cruft and translates much more smoothly to an ebook. Let's try to use the " |
| 201 |
"print version of the articles from *The BBC*." |
| 202 |
msgstr "" |
| 203 |
|
| 204 |
# af8e7fea2e17452396d589427cc07d4b |
| 205 |
#: ../../home/kovid/work/calibre/manual/news.rst:66 |
| 206 |
msgid "Using the print version of bbc.co.uk" |
| 207 |
msgstr "" |
| 208 |
|
| 209 |
# 3ffd3e60ce1246328297c70cff03a33c |
| 210 |
#: ../../home/kovid/work/calibre/manual/news.rst:68 |
| 211 |
msgid "" |
| 212 |
"The first step is to look at the ebook we downloaded previously from " |
| 213 |
":ref:`bbc`. At the end of each article, in the ebook is a little blurb " |
| 214 |
"telling you where the article was downloaded from. Copy and paste that URL " |
| 215 |
"into a browser. Now on the article webpage look for a link that points to " |
| 216 |
"the \"Printable version\". Click it to see the print version of the article." |
| 217 |
" It looks much neater! Now compare the two URLs. For me they were:" |
| 218 |
msgstr "" |
| 219 |
|
| 220 |
# 9eed6698d16643ae9d1568017df18833 |
| 221 |
#: ../../home/kovid/work/calibre/manual/news.rst:71 |
| 222 |
msgid "Article URL" |
| 223 |
msgstr "" |
| 224 |
|
| 225 |
# f4b4f0a8eaff4e0f82dfb55b853ed440 |
| 226 |
#: ../../home/kovid/work/calibre/manual/news.rst:71 |
| 227 |
msgid "http://news.bbc.co.uk/2/hi/science/nature/7312016.stm" |
| 228 |
msgstr "" |
| 229 |
|
| 230 |
# 0a508206a76c4b0d9da5333840e8baa3 |
| 231 |
#: ../../home/kovid/work/calibre/manual/news.rst:74 |
| 232 |
msgid "Print version URL" |
| 233 |
msgstr "" |
| 234 |
|
| 235 |
# d4d93509702f43b8a1b989bfe3e5f685 |
| 236 |
#: ../../home/kovid/work/calibre/manual/news.rst:74 |
| 237 |
msgid "" |
| 238 |
"http://newsvote.bbc.co.uk/mpapps/pagetools/print/news.bbc.co.uk/2/hi/science/nature/7312016.stm" |
| 239 |
msgstr "" |
| 240 |
|
| 241 |
# dada9959b2174f9f9ae35e31eb1c64d7 |
| 242 |
#: ../../home/kovid/work/calibre/manual/news.rst:76 |
| 243 |
msgid "" |
| 244 |
"So it looks like to get the print version, we need to prefix every article " |
| 245 |
"URL with:" |
| 246 |
msgstr "" |
| 247 |
|
| 248 |
# c5e769f06fb9499b9ac720bb66d08218 |
| 249 |
#: ../../home/kovid/work/calibre/manual/news.rst:78 |
| 250 |
msgid "newsvote.bbc.co.uk/mpapps/pagetools/print/" |
| 251 |
msgstr "" |
| 252 |
|
| 253 |
# 6a0cd7ebddc94ca890992a811163f156 |
| 254 |
#: ../../home/kovid/work/calibre/manual/news.rst:80 |
| 255 |
msgid "" |
| 256 |
"Now in the :guilabel:`Advanced Mode` of the Custom news sources dialog, you" |
| 257 |
" should see something like (remember to select *The BBC* recipe before " |
| 258 |
"switching to advanced mode):" |
| 259 |
msgstr "" |
| 260 |
|
| 261 |
# f36e7c0d71ec41b39f8d9357d5098ae0 |
| 262 |
#: ../../home/kovid/work/calibre/manual/news.rst:85 |
| 263 |
msgid "" |
| 264 |
"You can see that the fields from the :guilabel:`Basic mode` have been " |
| 265 |
"translated to python code in a straightforward manner. We need to add " |
| 266 |
"instructions to this recipe to use the print version of the articles. All " |
| 267 |
"that's needed is to add the following two lines:" |
| 268 |
msgstr "" |
| 269 |
|
| 270 |
# d1b354cce4b34d8dbfe73c18a3df6541 |
| 271 |
#: ../../home/kovid/work/calibre/manual/news.rst:92 |
| 272 |
msgid "" |
| 273 |
"This is python, so indentation is important. After you've added the lines, " |
| 274 |
"it should look like:" |
| 275 |
msgstr "" |
| 276 |
|
| 277 |
# 596f456ea6334669a85dfa9bf2f3af13 |
| 278 |
#: ../../home/kovid/work/calibre/manual/news.rst:97 |
| 279 |
msgid "" |
| 280 |
"In the above, ``def print_version(self, url)`` defines a *method* that is " |
| 281 |
"called by calibre for every article. ``url`` is the URL of the original " |
| 282 |
"article. What ``print_version`` does is take that url and replace it with " |
| 283 |
"the new URL that points to the print version of the article. To learn about " |
| 284 |
"`python <http://www.python.org>`_ see the `tutorial " |
| 285 |
"<http://docs.python.org/tut/>`_." |
| 286 |
msgstr "" |
| 287 |
|
| 288 |
# 6c968264c6c74cbf83fe2f1bf5507f34 |
| 289 |
#: ../../home/kovid/work/calibre/manual/news.rst:99 |
| 290 |
msgid "" |
| 291 |
"Now, click the :guilabel:`Add/update recipe` button and your changes will be" |
| 292 |
" saved. Re-download the ebook. You should have a much improved ebook. One of" |
| 293 |
" the problems with the new version is that the fonts on the print version " |
| 294 |
"webpage are too small. This is automatically fixed when converting to an " |
| 295 |
"ebook, but even after the fixing process, the font size of the menus and " |
| 296 |
"navigation bar to become too large relative to the article text. To fix " |
| 297 |
"this, we will do some more customization, in the next section." |
| 298 |
msgstr "" |
| 299 |
|
| 300 |
# 93224738c1424a40b23b23c1aa1abefd |
| 301 |
#: ../../home/kovid/work/calibre/manual/news.rst:102 |
| 302 |
msgid "Replacing article styles" |
| 303 |
msgstr "" |
| 304 |
|
| 305 |
# 19b1b909b662469eafdfd20aa971daf1 |
| 306 |
#: ../../home/kovid/work/calibre/manual/news.rst:104 |
| 307 |
msgid "" |
| 308 |
"In the previous section, we saw that the font size for articles from the " |
| 309 |
"print version of *The BBC* was too small. In most websites, *The BBC* " |
| 310 |
"included, this font size is set by means of :term:`CSS` stylesheets. We can " |
| 311 |
"disable the fetching of such stylesheets by adding the line::" |
| 312 |
msgstr "" |
| 313 |
|
| 314 |
# 99e78956cb5e48509a1212023fe000c4 |
| 315 |
#: ../../home/kovid/work/calibre/manual/news.rst:108 |
| 316 |
msgid "The recipe now looks like:" |
| 317 |
msgstr "" |
| 318 |
|
| 319 |
# bfead1898f904e18a209a01bc888b019 |
| 320 |
#: ../../home/kovid/work/calibre/manual/news.rst:115 |
| 321 |
msgid "" |
| 322 |
"The new version looks pretty good. If you're a perfectionist, you'll want to" |
| 323 |
" read the next section, which deals with actually modifying the downloaded " |
| 324 |
"content." |
| 325 |
msgstr "" |
| 326 |
|
| 327 |
# ae80afad2dfe485a8242cce769671685 |
| 328 |
#: ../../home/kovid/work/calibre/manual/news.rst:118 |
| 329 |
msgid "Slicing and dicing" |
| 330 |
msgstr "" |
| 331 |
|
| 332 |
# 1644ed9b2e3d49408363a4e4eacb01ec |
| 333 |
#: ../../home/kovid/work/calibre/manual/news.rst:120 |
| 334 |
msgid "" |
| 335 |
"calibre contains very powerful and flexible abilities when it comes to " |
| 336 |
"manipulating downloaded content. To show off a couple of these, let's look " |
| 337 |
"at our old friend the :ref:`The BBC <bbc1>` recipe again. Looking at the " |
| 338 |
"source code (:term:`HTML`) of a couple of articles (print version), we see " |
| 339 |
"that they have a footer that contains no useful information, contained in" |
| 340 |
msgstr "" |
| 341 |
|
| 342 |
# a1b4c22bfd294b9e91652d423709da14 |
| 343 |
#: ../../home/kovid/work/calibre/manual/news.rst:128 |
| 344 |
msgid "This can be removed by adding::" |
| 345 |
msgstr "" |
| 346 |
|
| 347 |
# cc1241a427154f12ab5ac9aace9328d6 |
| 348 |
#: ../../home/kovid/work/calibre/manual/news.rst:132 |
| 349 |
msgid "" |
| 350 |
"to the recipe. Finally, lets replace some of the :term:`CSS` that we " |
| 351 |
"disabled earlier, with our own :term:`CSS` that is suitable for conversion " |
| 352 |
"to an ebook::" |
| 353 |
msgstr "" |
| 354 |
|
| 355 |
# 9b7e341b2a3d48f49cd5ec7a3e3a5020 |
| 356 |
#: ../../home/kovid/work/calibre/manual/news.rst:136 |
| 357 |
msgid "" |
| 358 |
"With these additions, our recipe has become \"production quality\", indeed " |
| 359 |
"it is very close to the actual recipe used by calibre for the *BBC*, shown " |
| 360 |
"below:" |
| 361 |
msgstr "" |
| 362 |
|
| 363 |
# 150066519ae94468a9e46336bb245e85 |
| 364 |
#: ../../home/kovid/work/calibre/manual/news.rst:140 |
| 365 |
msgid "" |
| 366 |
"This :term:`recipe` explores only the tip of the iceberg when it comes to " |
| 367 |
"the power of calibre. To explore more of the abilities of calibre we'll " |
| 368 |
"examine a more complex real life example in the next section." |
| 369 |
msgstr "" |
| 370 |
|
| 371 |
# 94d86c3ea0604526a963f0125a89ffa7 |
| 372 |
#: ../../home/kovid/work/calibre/manual/news.rst:143 |
| 373 |
msgid "Real life example" |
| 374 |
msgstr "" |
| 375 |
|
| 376 |
# 49ea0265e6ce4dba90d0c1faa82998e4 |
| 377 |
#: ../../home/kovid/work/calibre/manual/news.rst:145 |
| 378 |
msgid "" |
| 379 |
"A reasonably complex real life example that exposes more of the :term:`API` " |
| 380 |
"of ``BasicNewsRecipe`` is the :term:`recipe` for *The New York Times*" |
| 381 |
msgstr "" |
| 382 |
|
| 383 |
# 97088c5a6f674ae89f08d41de7e033c6 |
| 384 |
#: ../../home/kovid/work/calibre/manual/news.rst:231 |
| 385 |
msgid "We see several new features in this :term:`recipe`. First, we have::" |
| 386 |
msgstr "" |
| 387 |
|
| 388 |
# be5db86812164d58bc24d1685040fa05 |
| 389 |
#: ../../home/kovid/work/calibre/manual/news.rst:235 |
| 390 |
msgid "" |
| 391 |
"This sets the displayed time on the front page of the created ebook to be in" |
| 392 |
" the format, ``Day, Day_Number Month, Year``. See :attr:`timefmt " |
| 393 |
"<calibre.web.feeds.news.BasicNewsRecipe.timefmt>`." |
| 394 |
msgstr "" |
| 395 |
|
| 396 |
# bcbc2a820ffa41eb8529e6594923f621 |
| 397 |
#: ../../home/kovid/work/calibre/manual/news.rst:238 |
| 398 |
msgid "" |
| 399 |
"Then we see a group of directives to cleanup the downloaded :term:`HTML`::" |
| 400 |
msgstr "" |
| 401 |
|
| 402 |
# bb990b93b40c4747bf6d5db156294be1 |
| 403 |
#: ../../home/kovid/work/calibre/manual/news.rst:244 |
| 404 |
msgid "" |
| 405 |
"These remove everything before the first ``<h1>`` tag and everything after " |
| 406 |
"the first tag whose id is ``footer``. See :attr:`remove_tags " |
| 407 |
"<calibre.web.feeds.news.BasicNewsRecipe.remove_tags>`, " |
| 408 |
":attr:`remove_tags_before " |
| 409 |
"<calibre.web.feeds.news.BasicNewsRecipe.remove_tags_before>`, " |
| 410 |
":attr:`remove_tags_after " |
| 411 |
"<calibre.web.feeds.news.BasicNewsRecipe.remove_tags_after>`." |
| 412 |
msgstr "" |
| 413 |
|
| 414 |
# 9fc8f8bc6289421e8b938e60a3e14551 |
| 415 |
#: ../../home/kovid/work/calibre/manual/news.rst:246 |
| 416 |
msgid "The next interesting feature is::" |
| 417 |
msgstr "" |
| 418 |
|
| 419 |
# 1124392089704895967683cfc3013bf6 |
| 420 |
#: ../../home/kovid/work/calibre/manual/news.rst:253 |
| 421 |
msgid "" |
| 422 |
"``needs_subscription = True`` tells calibre that this recipe needs a " |
| 423 |
"username and password in order to access the content. This causes, calibre " |
| 424 |
"to ask for a username and password whenever you try to use this recipe. The " |
| 425 |
"code in :meth:`calibre.web.feeds.news.BasicNewsRecipe.get_browser` actually " |
| 426 |
"does the login into the NYT website. Once logged in, calibre will use the " |
| 427 |
"same, logged in, browser instance to fetch all content. See `mechanize " |
| 428 |
"<http://wwwsearch.sourceforge.net/mechanize/>`_ to understand the code in " |
| 429 |
"``get_browser``." |
| 430 |
msgstr "" |
| 431 |
|
| 432 |
# 65ea45d0dfa14608b14bfc31b41cf1d6 |
| 433 |
#: ../../home/kovid/work/calibre/manual/news.rst:255 |
| 434 |
msgid "" |
| 435 |
"The next new feature is the " |
| 436 |
":meth:`calibre.web.feeds.news.BasicNewsRecipe.parse_index` method. Its job " |
| 437 |
"is to go to http://www.nytimes.com/pages/todayspaper/index.html and fetch " |
| 438 |
"the list of articles that appear in *todays* paper. While more complex than " |
| 439 |
"simply using :term:`RSS`, the recipe creates an ebook that corresponds very " |
| 440 |
"closely to the days paper. ``parse_index`` makes heavy use of `BeautifulSoup" |
| 441 |
" <http://www.crummy.com/software/BeautifulSoup/documentation.html>`_ to " |
| 442 |
"parse the daily paper webpage. You can also use other, more modern parsers " |
| 443 |
"if you dislike BeatifulSoup. calibre comes with `lxml <http://lxml.de/>`_ " |
| 444 |
"and `html5lib <https://github.com/html5lib/html5lib-python>`_, which are the" |
| 445 |
" recommended parsers. To use them, replace the call to ``index_to_soup()`` " |
| 446 |
"with the following::" |
| 447 |
msgstr "" |
| 448 |
|
| 449 |
# 087c534bbb734138a0dc94cbb0c9b17a |
| 450 |
#: ../../home/kovid/work/calibre/manual/news.rst:276 |
| 451 |
msgid "" |
| 452 |
"The final new feature is the " |
| 453 |
":meth:`calibre.web.feeds.news.BasicNewsRecipe.preprocess_html` method. It " |
| 454 |
"can be used to perform arbitrary transformations on every downloaded HTML " |
| 455 |
"page. Here it is used to bypass the ads that the nytimes shows you before " |
| 456 |
"each article." |
| 457 |
msgstr "" |
| 458 |
|
| 459 |
# f07b83c7497042bcb02e1518ef9b1b81 |
| 460 |
#: ../../home/kovid/work/calibre/manual/news.rst:279 |
| 461 |
msgid "Tips for developing new recipes" |
| 462 |
msgstr "" |
| 463 |
|
| 464 |
# 303bf7b0e9e54411b4dccd9d9e2946ac |
| 465 |
#: ../../home/kovid/work/calibre/manual/news.rst:281 |
| 466 |
msgid "" |
| 467 |
"The best way to develop new recipes is to use the command line interface. " |
| 468 |
"Create the recipe using your favorite python editor and save it to a file " |
| 469 |
"say :file:`myrecipe.recipe`. The `.recipe` extension is required. You can " |
| 470 |
"download content using this recipe with the command::" |
| 471 |
msgstr "" |
| 472 |
|
| 473 |
# 765a0fef113240918c212d7ac908c47a |
| 474 |
#: ../../home/kovid/work/calibre/manual/news.rst:285 |
| 475 |
msgid "" |
| 476 |
"The command :command:`ebook-convert` will download all the webpages and save" |
| 477 |
" them to the EPUB file :file:`myrecipe.epub`. The :option:`-vv` makes ebook-" |
| 478 |
"convert spit out a lot of information about what it is doing. The " |
| 479 |
":option:`--test` makes it download only a couple of articles from at most " |
| 480 |
"two feeds. In addition, ebook-convert will put the downloaded HTML into the " |
| 481 |
"``debug/input`` directory, where ``debug`` is the directory you specified in" |
| 482 |
" the :option:`--debug-pipeline` option." |
| 483 |
msgstr "" |
| 484 |
|
| 485 |
# 075f6103d44a4525b09ac10749432bb2 |
| 486 |
#: ../../home/kovid/work/calibre/manual/news.rst:287 |
| 487 |
msgid "" |
| 488 |
"Once the download is complete, you can look at the downloaded :term:`HTML` " |
| 489 |
"by opening the file :file:`debug/input/index.html` in a browser. Once you're" |
| 490 |
" satisfied that the download and preprocessing is happening correctly, you " |
| 491 |
"can generate ebooks in different formats as shown below::" |
| 492 |
msgstr "" |
| 493 |
|
| 494 |
# 6e50853ba33b4900bf8e4a0d9e3919fe |
| 495 |
#: ../../home/kovid/work/calibre/manual/news.rst:294 |
| 496 |
msgid "" |
| 497 |
"If you're satisfied with your recipe, and you feel there is enough demand to" |
| 498 |
" justify its inclusion into the set of built-in recipes, post your recipe in" |
| 499 |
" the `calibre recipes forum " |
| 500 |
"<http://www.mobileread.com/forums/forumdisplay.php?f=228>`_ to share it with" |
| 501 |
" other calibre users." |
| 502 |
msgstr "" |
| 503 |
|
| 504 |
# b3816376016f4dd0bd909f0699b79385 |
| 505 |
#: ../../home/kovid/work/calibre/manual/news.rst:297 |
| 506 |
msgid "" |
| 507 |
"On OS X, the command line tools are inside the calibre bundle, for example, " |
| 508 |
"if you installed calibre in :file:`/Applications` the command line tools are" |
| 509 |
" in :file:`/Applications/calibre.app/Contents/console.app/Contents/MacOS/`." |
| 510 |
msgstr "" |
| 511 |
|
| 512 |
# 558118728838443ca9056a2fa695d946 |
| 513 |
#: ../../home/kovid/work/calibre/manual/news.rst:303 |
| 514 |
msgid ":doc:`generated/en/ebook-convert`" |
| 515 |
msgstr "" |
| 516 |
|
| 517 |
# aebfb92bd10d48618c745c423ad96972 |
| 518 |
#: ../../home/kovid/work/calibre/manual/news.rst:304 |
| 519 |
msgid "The command line interface for all ebook conversion." |
| 520 |
msgstr "" |
| 521 |
|
| 522 |
# 2d4f3df4dd28440a97ecabe629f52c4c |
| 523 |
#: ../../home/kovid/work/calibre/manual/news.rst:308 |
| 524 |
msgid "Further reading" |
| 525 |
msgstr "" |
| 526 |
|
| 527 |
# 8116d9e1d7424cfbb091db482afec299 |
| 528 |
#: ../../home/kovid/work/calibre/manual/news.rst:310 |
| 529 |
msgid "" |
| 530 |
"To learn more about writing advanced recipes using some of the facilities, " |
| 531 |
"available in ``BasicNewsRecipe`` you should consult the following sources:" |
| 532 |
msgstr "" |
| 533 |
|
| 534 |
# c9724839242e4fd897c071ce43c0de56 |
| 535 |
#: ../../home/kovid/work/calibre/manual/news.rst:313 |
| 536 |
msgid ":ref:`API Documentation <news_recipe>`" |
| 537 |
msgstr "" |
| 538 |
|
| 539 |
# 7a4e3abc8fe74625bd18eda11f7c5e0e |
| 540 |
#: ../../home/kovid/work/calibre/manual/news.rst:313 |
| 541 |
msgid "" |
| 542 |
"Documentation of the ``BasicNewsRecipe`` class and all its important methods" |
| 543 |
" and fields." |
| 544 |
msgstr "" |
| 545 |
|
| 546 |
# 37ea981e853c455e90f72aa75e0eb700 |
| 547 |
#: ../../home/kovid/work/calibre/manual/news.rst:316 |
| 548 |
msgid "" |
| 549 |
"`BasicNewsRecipe " |
| 550 |
"<http://bazaar.launchpad.net/~kovid/calibre/trunk/annotate/head:/src/calibre/web/feeds/news.py>`_" |
| 551 |
msgstr "" |
| 552 |
|
| 553 |
# 2097a5bad9364392bb240d40e2cf6dbc |
| 554 |
#: ../../home/kovid/work/calibre/manual/news.rst:316 |
| 555 |
msgid "The source code of ``BasicNewsRecipe``" |
| 556 |
msgstr "" |
| 557 |
|
| 558 |
# d5d3b5d9234e49ae8712628828109bbb |
| 559 |
#: ../../home/kovid/work/calibre/manual/news.rst:319 |
| 560 |
msgid "" |
| 561 |
"`Built-in recipes " |
| 562 |
"<http://bazaar.launchpad.net/~kovid/calibre/trunk/files/head:/recipes/>`_" |
| 563 |
msgstr "" |
| 564 |
|
| 565 |
# 137c023dc977404698ca562534a9a0d3 |
| 566 |
#: ../../home/kovid/work/calibre/manual/news.rst:319 |
| 567 |
msgid "The source code for the built-in recipes that come with calibre" |
| 568 |
msgstr "" |
| 569 |
|
| 570 |
# a51d554135604a02a2930af36af5abc5 |
| 571 |
#: ../../home/kovid/work/calibre/manual/news.rst:323 |
| 572 |
msgid "" |
| 573 |
"`The calibre recipes forum " |
| 574 |
"<http://www.mobileread.com/forums/forumdisplay.php?f=228>`_" |
| 575 |
msgstr "" |
| 576 |
|
| 577 |
# 27e2afdfba564b64a0a66c1ff27f2c89 |
| 578 |
#: ../../home/kovid/work/calibre/manual/news.rst:322 |
| 579 |
msgid "Lots of knowledgeable calibre recipe writers hang out here." |
| 580 |
msgstr "" |
| 581 |
|
| 582 |
# c9dbd977ee4a45abaee331fe2d0360cd |
| 583 |
#: ../../home/kovid/work/calibre/manual/news.rst:326 |
| 584 |
msgid "API documentation" |
| 585 |
msgstr "" |