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