Debian Codegraph @

translations/manual/zh_TW/news.po

raw
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 # Dennis Chu, 2023
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: calibre\n"
10 "Report-Msgid-Bugs-To: \n"
11 "POT-Creation-Date: 2023-03-09 03:59+0000\n"
12 "PO-Revision-Date: 2014-06-17 08:34+0000\n"
13 "Last-Translator: Dennis Chu, 2023\n"
14 "Language-Team: Chinese (Taiwan) (http://www.transifex.com/calibre/calibre/language/zh_TW/)\n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18 "Language: zh_TW\n"
19 "Plural-Forms: nplurals=1; plural=0;\n"
20
21 #: ../../__w/calibre/calibre/manual/news.rst:4
22 msgid "Adding your favorite news website"
23 msgstr "添加你喜歡的新聞網站"
24
25 #: ../../__w/calibre/calibre/manual/news.rst:6
26 msgid ""
27 "calibre has a powerful, flexible and easy-to-use framework for downloading "
28 "news from the Internet and converting it into an e-book. The following will "
29 "show you, by means of examples, how to get news from various websites."
30 msgstr "caliber有一个强大,灵活且易于使用的框架,用于从Internet下载新闻并将其转换为电子书。 以下将通过示例向您展示如何从各种网站获取新闻。"
31
32 #: ../../__w/calibre/calibre/manual/news.rst:8
33 msgid ""
34 "To gain an understanding of how to use the framework, follow the examples in"
35 " the order listed below:"
36 msgstr "要了解如何使用框架,请按照下面列出的顺序执行示例:"
37
38 #: ../../__w/calibre/calibre/manual/news.rst:15
39 msgid "Completely automatic fetching"
40 msgstr "完全自动获取"
41
42 #: ../../__w/calibre/calibre/manual/news.rst:17
43 msgid ""
44 "If your news source is simple enough, calibre may well be able to fetch it "
45 "completely automatically, all you need to do is provide the URL. calibre "
46 "gathers all the information needed to download a news source into a "
47 ":term:`recipe`. In order to tell calibre about a news source, you have to "
48 "create a :term:`recipe` for it. Let's see some examples:"
49 msgstr ""
50
51 #: ../../__w/calibre/calibre/manual/news.rst:26
52 msgid "The calibre blog"
53 msgstr "calibre部落格"
54
55 #: ../../__w/calibre/calibre/manual/news.rst:28
56 msgid ""
57 "The calibre blog is a blog of posts that describe many useful calibre "
58 "features in a simple and accessible way for new calibre users. In order to "
59 "download this blog into an e-book, we rely on the :term:`RSS` feed of the "
60 "blog::"
61 msgstr ""
62
63 #: ../../__w/calibre/calibre/manual/news.rst:34
64 msgid ""
65 "I got the RSS URL by looking under \"Subscribe to\" at the bottom of the "
66 "blog page and choosing :guilabel:`Posts->Atom`. To make calibre download the"
67 " feeds and convert them into an e-book, you should right click the "
68 ":guilabel:`Fetch news` button and then the :guilabel:`Add a custom news "
69 "source` menu item and then the :guilabel:`New Recipe` button. A dialog "
70 "similar to that shown below should open up."
71 msgstr ""
72
73 #: ../../__w/calibre/calibre/manual/news.rst:43
74 msgid ""
75 "First enter ``Calibre Blog`` into the :guilabel:`Recipe title` field. This "
76 "will be the title of the e-book that will be created from the articles in "
77 "the above feeds."
78 msgstr ""
79
80 #: ../../__w/calibre/calibre/manual/news.rst:45
81 msgid ""
82 "The next two fields (:guilabel:`Oldest article` and :guilabel:`Max. number "
83 "of articles`) allow you some control over how many articles should be "
84 "downloaded from each feed, and they are pretty self explanatory."
85 msgstr ""
86
87 #: ../../__w/calibre/calibre/manual/news.rst:47
88 msgid ""
89 "To add the feeds to the recipe, enter the feed title and the feed URL and "
90 "click the :guilabel:`Add feed` button. Once you have added the feed, simply "
91 "click the :guilabel:`Save` button and you're done! Close the dialog."
92 msgstr ""
93
94 #: ../../__w/calibre/calibre/manual/news.rst:51
95 msgid ""
96 "To test your new :term:`recipe`, click the :guilabel:`Fetch news` button and"
97 " in the :guilabel:`Custom news sources` sub-menu click :guilabel:`calibre "
98 "Blog`. After a couple of minutes, the newly downloaded e-book of blog posts "
99 "will appear in the main library view (if you have your reader connected, it "
100 "will be put onto the reader instead of into the library). Select it and hit "
101 "the :guilabel:`View` button to read!"
102 msgstr ""
103
104 #: ../../__w/calibre/calibre/manual/news.rst:53
105 msgid ""
106 "The reason this worked so well, with so little effort is that the blog "
107 "provides *full-content* :term:`RSS` feeds, i.e., the article content is "
108 "embedded in the feed itself. For most news sources that provide news in this"
109 " fashion, with *full-content* feeds, you don't need any more effort to "
110 "convert them to e-books. Now we will look at a news source that does not "
111 "provide full content feeds. In such feeds, the full article is a webpage and"
112 " the feed only contains a link to the webpage with a short summary of the "
113 "article."
114 msgstr ""
115
116 #: ../../__w/calibre/calibre/manual/news.rst:58
117 msgid "bbc.co.uk"
118 msgstr ""
119
120 #: ../../__w/calibre/calibre/manual/news.rst:60
121 msgid "Let's try the following two feeds from *The BBC*:"
122 msgstr ""
123
124 #: ../../__w/calibre/calibre/manual/news.rst:62
125 msgid ""
126 "News Front Page: "
127 "https://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml"
128 msgstr ""
129
130 #: ../../__w/calibre/calibre/manual/news.rst:63
131 msgid ""
132 "Science/Nature: "
133 "https://newsrss.bbc.co.uk/rss/newsonline_world_edition/science/nature/rss.xml"
134 msgstr ""
135
136 #: ../../__w/calibre/calibre/manual/news.rst:65
137 msgid ""
138 "Follow the procedure outlined in :ref:`calibre_blog` above to create a "
139 "recipe for *The BBC* (using the feeds above). Looking at the downloaded "
140 "e-book, we see that calibre has done a creditable job of extracting only the"
141 " content you care about from each article's webpage. However, the extraction"
142 " process is not perfect. Sometimes it leaves in undesirable content like "
143 "menus and navigation aids or it removes content that should have been left "
144 "alone, like article headings. In order, to have perfect content extraction, "
145 "we will need to customize the fetch process, as described in the next "
146 "section."
147 msgstr ""
148
149 #: ../../__w/calibre/calibre/manual/news.rst:68
150 msgid "Customizing the fetch process"
151 msgstr ""
152
153 #: ../../__w/calibre/calibre/manual/news.rst:70
154 msgid ""
155 "When you want to perfect the download process, or download content from a "
156 "particularly complex website, you can avail yourself of all the power and "
157 "flexibility of the :term:`recipe` framework. In order to do that, in the "
158 ":guilabel:`Add custom news sources` dialog, simply click the "
159 ":guilabel:`Switch to Advanced mode` button."
160 msgstr ""
161
162 #: ../../__w/calibre/calibre/manual/news.rst:72
163 msgid ""
164 "The easiest and often most productive customization is to use the print "
165 "version of the online articles. The print version typically has much less "
166 "cruft and translates much more smoothly to an e-book. Let's try to use the "
167 "print version of the articles from *The BBC*."
168 msgstr ""
169
170 #: ../../__w/calibre/calibre/manual/news.rst:75
171 msgid "Using the print version of bbc.co.uk"
172 msgstr ""
173
174 #: ../../__w/calibre/calibre/manual/news.rst:77
175 msgid ""
176 "The first step is to look at the e-book we downloaded previously from "
177 ":ref:`bbc`. At the end of each article, in the e-book is a little blurb "
178 "telling you where the article was downloaded from. Copy and paste that URL "
179 "into a browser. Now on the article webpage look for a link that points to "
180 "the \"Printable version\". Click it to see the print version of the article."
181 " It looks much neater! Now compare the two URLs. For me they were:"
182 msgstr ""
183
184 #: ../../__w/calibre/calibre/manual/news.rst:80
185 msgid "Article URL"
186 msgstr ""
187
188 #: ../../__w/calibre/calibre/manual/news.rst:80
189 msgid "https://news.bbc.co.uk/2/hi/science/nature/7312016.stm"
190 msgstr ""
191
192 #: ../../__w/calibre/calibre/manual/news.rst:83
193 msgid "Print version URL"
194 msgstr ""
195
196 #: ../../__w/calibre/calibre/manual/news.rst:83
197 msgid ""
198 "https://newsvote.bbc.co.uk/mpapps/pagetools/print/news.bbc.co.uk/2/hi/science/nature/7312016.stm"
199 msgstr ""
200
201 #: ../../__w/calibre/calibre/manual/news.rst:85
202 msgid ""
203 "So it looks like to get the print version, we need to prefix every article "
204 "URL with:"
205 msgstr ""
206
207 #: ../../__w/calibre/calibre/manual/news.rst:87
208 msgid "newsvote.bbc.co.uk/mpapps/pagetools/print/"
209 msgstr ""
210
211 #: ../../__w/calibre/calibre/manual/news.rst:89
212 msgid ""
213 "Now in the :guilabel:`Advanced mode` of the Custom news sources dialog, you "
214 "should see something like (remember to select *The BBC* recipe before "
215 "switching to advanced mode):"
216 msgstr ""
217
218 #: ../../__w/calibre/calibre/manual/news.rst:94
219 msgid ""
220 "You can see that the fields from the :guilabel:`Basic mode` have been "
221 "translated to Python code in a straightforward manner. We need to add "
222 "instructions to this recipe to use the print version of the articles. All "
223 "that's needed is to add the following two lines:"
224 msgstr ""
225
226 #: ../../__w/calibre/calibre/manual/news.rst:101
227 msgid ""
228 "This is Python, so indentation is important. After you've added the lines, "
229 "it should look like:"
230 msgstr ""
231
232 #: ../../__w/calibre/calibre/manual/news.rst:106
233 msgid ""
234 "In the above, ``def print_version(self, url)`` defines a *method* that is "
235 "called by calibre for every article. ``url`` is the URL of the original "
236 "article. What ``print_version`` does is take that url and replace it with "
237 "the new URL that points to the print version of the article. To learn about "
238 "`Python <https://www.python.org>`_ see the `tutorial "
239 "<https://docs.python.org/tutorial/>`_."
240 msgstr ""
241
242 #: ../../__w/calibre/calibre/manual/news.rst:108
243 msgid ""
244 "Now, click the :guilabel:`Add/update recipe` button and your changes will be"
245 " saved. Re-download the e-book. You should have a much improved e-book. One "
246 "of the problems with the new version is that the fonts on the print version "
247 "webpage are too small. This is automatically fixed when converting to an "
248 "e-book, but even after the fixing process, the font size of the menus and "
249 "navigation bar become too large relative to the article text. To fix this, "
250 "we will do some more customization, in the next section."
251 msgstr ""
252
253 #: ../../__w/calibre/calibre/manual/news.rst:111
254 msgid "Replacing article styles"
255 msgstr ""
256
257 #: ../../__w/calibre/calibre/manual/news.rst:113
258 msgid ""
259 "In the previous section, we saw that the font size for articles from the "
260 "print version of *The BBC* was too small. In most websites, *The BBC* "
261 "included, this font size is set by means of :term:`CSS` stylesheets. We can "
262 "disable the fetching of such stylesheets by adding the line::"
263 msgstr ""
264
265 #: ../../__w/calibre/calibre/manual/news.rst:119
266 msgid "The recipe now looks like:"
267 msgstr ""
268
269 #: ../../__w/calibre/calibre/manual/news.rst:124
270 msgid ""
271 "The new version looks pretty good. If you're a perfectionist, you'll want to"
272 " read the next section, which deals with actually modifying the downloaded "
273 "content."
274 msgstr ""
275
276 #: ../../__w/calibre/calibre/manual/news.rst:127
277 msgid "Slicing and dicing"
278 msgstr ""
279
280 #: ../../__w/calibre/calibre/manual/news.rst:129
281 msgid ""
282 "calibre contains very powerful and flexible abilities when it comes to "
283 "manipulating downloaded content. To show off a couple of these, let's look "
284 "at our old friend the :ref:`The BBC <bbc1>` recipe again. Looking at the "
285 "source code (:term:`HTML`) of a couple of articles (print version), we see "
286 "that they have a footer that contains no useful information, contained in"
287 msgstr ""
288
289 #: ../../__w/calibre/calibre/manual/news.rst:137
290 msgid "This can be removed by adding::"
291 msgstr ""
292
293 #: ../../__w/calibre/calibre/manual/news.rst:141
294 msgid ""
295 "to the recipe. Finally, lets replace some of the :term:`CSS` that we "
296 "disabled earlier, with our own :term:`CSS` that is suitable for conversion "
297 "to an e-book::"
298 msgstr ""
299
300 #: ../../__w/calibre/calibre/manual/news.rst:145
301 msgid "With these additions, our recipe has become \"production quality\"."
302 msgstr ""
303
304 #: ../../__w/calibre/calibre/manual/news.rst:147
305 msgid ""
306 "This :term:`recipe` explores only the tip of the iceberg when it comes to "
307 "the power of calibre. To explore more of the abilities of calibre we'll "
308 "examine a more complex real life example in the next section."
309 msgstr ""
310
311 #: ../../__w/calibre/calibre/manual/news.rst:150
312 msgid "Real life example"
313 msgstr "现实的例子"
314
315 #: ../../__w/calibre/calibre/manual/news.rst:152
316 msgid ""
317 "A reasonably complex real life example that exposes more of the :term:`API` "
318 "of ``BasicNewsRecipe`` is the :term:`recipe` for *The New York Times*"
319 msgstr ""
320
321 #: ../../__w/calibre/calibre/manual/news.rst:238
322 msgid "We see several new features in this :term:`recipe`. First, we have::"
323 msgstr ""
324
325 #: ../../__w/calibre/calibre/manual/news.rst:242
326 msgid ""
327 "This sets the displayed time on the front page of the created e-book to be "
328 "in the format, ``Day, Day_Number Month, Year``. See :attr:`timefmt "
329 "<calibre.web.feeds.news.BasicNewsRecipe.timefmt>`."
330 msgstr ""
331
332 #: ../../__w/calibre/calibre/manual/news.rst:245
333 msgid ""
334 "Then we see a group of directives to cleanup the downloaded :term:`HTML`::"
335 msgstr ""
336
337 #: ../../__w/calibre/calibre/manual/news.rst:251
338 msgid ""
339 "These remove everything before the first ``<h1>`` tag and everything after "
340 "the first tag whose id is ``footer``. See :attr:`remove_tags "
341 "<calibre.web.feeds.news.BasicNewsRecipe.remove_tags>`, "
342 ":attr:`remove_tags_before "
343 "<calibre.web.feeds.news.BasicNewsRecipe.remove_tags_before>`, "
344 ":attr:`remove_tags_after "
345 "<calibre.web.feeds.news.BasicNewsRecipe.remove_tags_after>`."
346 msgstr ""
347
348 #: ../../__w/calibre/calibre/manual/news.rst:253
349 msgid "The next interesting feature is::"
350 msgstr ""
351
352 #: ../../__w/calibre/calibre/manual/news.rst:260
353 msgid ""
354 "``needs_subscription = True`` tells calibre that this recipe needs a "
355 "username and password in order to access the content. This causes, calibre "
356 "to ask for a username and password whenever you try to use this recipe. The "
357 "code in :meth:`calibre.web.feeds.news.BasicNewsRecipe.get_browser` actually "
358 "does the login into the NYT website. Once logged in, calibre will use the "
359 "same, logged in, browser instance to fetch all content. See `mechanize "
360 "<https://mechanize.readthedocs.io/en/latest/>`_ to understand the code in "
361 "``get_browser``."
362 msgstr ""
363
364 #: ../../__w/calibre/calibre/manual/news.rst:262
365 msgid ""
366 "The next new feature is the "
367 ":meth:`calibre.web.feeds.news.BasicNewsRecipe.parse_index` method. Its job "
368 "is to go to https://www.nytimes.com/pages/todayspaper/index.html and fetch "
369 "the list of articles that appear in *todays* paper. While more complex than "
370 "simply using :term:`RSS`, the recipe creates an e-book that corresponds very"
371 " closely to the days paper. ``parse_index`` makes heavy use of "
372 "`BeautifulSoup <https://www.crummy.com/software/BeautifulSoup/bs4/doc/>`_ to"
373 " parse the daily paper webpage. You can also use other, more modern parsers "
374 "if you dislike BeautifulSoup. calibre comes with `lxml <https://lxml.de/>`_ "
375 "and `html5lib <https://github.com/html5lib/html5lib-python>`_, which are the"
376 " recommended parsers. To use them, replace the call to ``index_to_soup()`` "
377 "with the following::"
378 msgstr ""
379
380 #: ../../__w/calibre/calibre/manual/news.rst:283
381 msgid ""
382 "The final new feature is the "
383 ":meth:`calibre.web.feeds.news.BasicNewsRecipe.preprocess_html` method. It "
384 "can be used to perform arbitrary transformations on every downloaded HTML "
385 "page. Here it is used to bypass the ads that the nytimes shows you before "
386 "each article."
387 msgstr ""
388
389 #: ../../__w/calibre/calibre/manual/news.rst:286
390 msgid "Tips for developing new recipes"
391 msgstr ""
392
393 #: ../../__w/calibre/calibre/manual/news.rst:288
394 msgid ""
395 "The best way to develop new recipes is to use the command line interface. "
396 "Create the recipe using your favorite Python editor and save it to a file "
397 "say :file:`myrecipe.recipe`. The `.recipe` extension is required. You can "
398 "download content using this recipe with the command::"
399 msgstr ""
400
401 #: ../../__w/calibre/calibre/manual/news.rst:292
402 msgid ""
403 "The command :command:`ebook-convert` will download all the webpages and save"
404 " them to the EPUB file :file:`myrecipe.epub`. The ``-vv`` option makes "
405 "ebook-convert spit out a lot of information about what it is doing. The "
406 ":option:`ebook-convert-recipe-input --test` option makes it download only a "
407 "couple of articles from at most two feeds. In addition, ebook-convert will "
408 "put the downloaded HTML into the ``debug/input`` folder, where ``debug`` is "
409 "the folder you specified in the :option:`ebook-convert --debug-pipeline` "
410 "option."
411 msgstr ""
412
413 #: ../../__w/calibre/calibre/manual/news.rst:300
414 msgid ""
415 "Once the download is complete, you can look at the downloaded :term:`HTML` "
416 "by opening the file :file:`debug/input/index.html` in a browser. Once you're"
417 " satisfied that the download and preprocessing is happening correctly, you "
418 "can generate e-books in different formats as shown below::"
419 msgstr ""
420
421 #: ../../__w/calibre/calibre/manual/news.rst:307
422 msgid ""
423 "If you're satisfied with your recipe, and you feel there is enough demand to"
424 " justify its inclusion into the set of built-in recipes, post your recipe in"
425 " the `calibre recipes forum "
426 "<https://www.mobileread.com/forums/forumdisplay.php?f=228>`_ to share it "
427 "with other calibre users."
428 msgstr ""
429
430 #: ../../__w/calibre/calibre/manual/news.rst:310
431 msgid ""
432 "On macOS, the command line tools are inside the calibre bundle, for example,"
433 " if you installed calibre in :file:`/Applications` the command line tools "
434 "are in :file:`/Applications/calibre.app/Contents/MacOS/`."
435 msgstr "在mac系统中,已将命令行工具植入到Calibre之中,例如,如果您将Calibre安装在:file:`/Applications`中,则命令行工具位于:file:`/Applications/calibre.app/Contents/MacOS/`.中。"
436
437 #: ../../__w/calibre/calibre/manual/news.rst:316
438 msgid ":doc:`generated/en/ebook-convert`"
439 msgstr ""
440
441 #: ../../__w/calibre/calibre/manual/news.rst:317
442 msgid "The command line interface for all e-book conversion."
443 msgstr ""
444
445 #: ../../__w/calibre/calibre/manual/news.rst:321
446 msgid "Further reading"
447 msgstr ""
448
449 #: ../../__w/calibre/calibre/manual/news.rst:323
450 msgid ""
451 "To learn more about writing advanced recipes using some of the facilities, "
452 "available in ``BasicNewsRecipe`` you should consult the following sources:"
453 msgstr ""
454
455 #: ../../__w/calibre/calibre/manual/news.rst:326
456 msgid ":ref:`API documentation <news_recipe>`"
457 msgstr ""
458
459 #: ../../__w/calibre/calibre/manual/news.rst:326
460 msgid ""
461 "Documentation of the ``BasicNewsRecipe`` class and all its important methods"
462 " and fields."
463 msgstr ""
464
465 #: ../../__w/calibre/calibre/manual/news.rst:329
466 msgid ""
467 "`BasicNewsRecipe "
468 "<https://github.com/kovidgoyal/calibre/blob/master/src/calibre/web/feeds/news.py>`_"
469 msgstr ""
470
471 #: ../../__w/calibre/calibre/manual/news.rst:329
472 msgid "The source code of ``BasicNewsRecipe``"
473 msgstr ""
474
475 #: ../../__w/calibre/calibre/manual/news.rst:332
476 msgid ""
477 "`Built-in recipes "
478 "<https://github.com/kovidgoyal/calibre/tree/master/recipes>`_"
479 msgstr ""
480
481 #: ../../__w/calibre/calibre/manual/news.rst:332
482 msgid "The source code for the built-in recipes that come with calibre"
483 msgstr ""
484
485 #: ../../__w/calibre/calibre/manual/news.rst:336
486 msgid ""
487 "`The calibre recipes forum "
488 "<https://www.mobileread.com/forums/forumdisplay.php?f=228>`_"
489 msgstr ""
490
491 #: ../../__w/calibre/calibre/manual/news.rst:335
492 msgid "Lots of knowledgeable calibre recipe writers hang out here."
493 msgstr ""
494
495 #: ../../__w/calibre/calibre/manual/news.rst:339
496 msgid "API documentation"
497 msgstr ""