| 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-2023,2025-2026 |
| 8 |
# Родион Р., 2020 |
| 9 |
# Родион Р., 2019 |
| 10 |
msgid "" |
| 11 |
msgstr "" |
| 12 |
"Project-Id-Version: calibre\n" |
| 13 |
"Report-Msgid-Bugs-To: \n" |
| 14 |
"POT-Creation-Date: 2026-08-26 16:50+0000\n" |
| 15 |
"PO-Revision-Date: 2014-06-17 08:34+0000\n" |
| 16 |
"Last-Translator: Andrei Stepanov, 2026\n" |
| 17 |
"Language-Team: Russian (http://app.transifex.com/calibre/calibre/language/ru/)\n" |
| 18 |
"MIME-Version: 1.0\n" |
| 19 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 20 |
"Content-Transfer-Encoding: 8bit\n" |
| 21 |
"Language: ru\n" |
| 22 |
"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" |
| 23 |
|
| 24 |
#: ../../../__w/calibre/calibre/manual/develop.rst:4 |
| 25 |
msgid "Setting up a calibre development environment" |
| 26 |
msgstr "Настройка среды разработки calibre" |
| 27 |
|
| 28 |
#: ../../../__w/calibre/calibre/manual/develop.rst:6 |
| 29 |
msgid "" |
| 30 |
"calibre is completely open source, licensed under the `GNU GPL v3 " |
| 31 |
"<https://www.gnu.org/licenses/gpl.html>`_. This means that you are free to " |
| 32 |
"download and modify the program to your heart's content. In this section, " |
| 33 |
"you will learn how to get a calibre development environment set up on the " |
| 34 |
"operating system of your choice. calibre is written primarily in `Python " |
| 35 |
"<https://www.python.org>`_ with some C/C++ code for speed and system " |
| 36 |
"interfacing. Note that calibre requires at least Python 3.8." |
| 37 |
msgstr "У calibre полностью открытый исходный код, лицензированный `GNU GPL v3 <https://www.gnu.org/licenses/gpl.html>`_. То есть вы можете загружать и изменять программу по собственному желанию. В этом разделе вы узнаете, как настроить среду разработки calibre на выбранной операционной системе. В основном calibre написана на `Python <https://www.python.org>`_ со вставками кода на C/C++ для повышения скорости и взаимодействия с системой. Обратите внимание, что calibre требует, как минимум, Python 3.8." |
| 38 |
|
| 39 |
#: ../../../__w/calibre/calibre/manual/develop.rst:14 |
| 40 |
msgid "Contents" |
| 41 |
msgstr "Содержание" |
| 42 |
|
| 43 |
#: ../../../__w/calibre/calibre/manual/develop.rst:17 |
| 44 |
msgid "Design philosophy" |
| 45 |
msgstr "Философия разработки" |
| 46 |
|
| 47 |
#: ../../../__w/calibre/calibre/manual/develop.rst:19 |
| 48 |
msgid "" |
| 49 |
"calibre has its roots in the Unix world, which means that its design is " |
| 50 |
"highly modular. The modules interact with each other via well defined " |
| 51 |
"interfaces. This makes adding new features and fixing bugs in calibre very " |
| 52 |
"easy, resulting in a frenetic pace of development. Because of its roots, " |
| 53 |
"calibre has a comprehensive command line interface for all its functions, " |
| 54 |
"documented in :doc:`generated/en/cli-index`." |
| 55 |
msgstr "Истоки calibre лежат в мире Unix, что означает высокую модульность её дизайна. Модули взаимодействуют друг с другом через чётко определённые интерфейсы. Это заметно облегчает добавление новых возможностей и исправление ошибок, вызывая бурный темп развития. Из-за своих корней calibre имеет полноценный интерфейс командной строки для всех функций, задокументированный в разделе «:doc:`generated/ru/cli-index`»." |
| 56 |
|
| 57 |
#: ../../../__w/calibre/calibre/manual/develop.rst:24 |
| 58 |
msgid "" |
| 59 |
"The modular design of calibre is expressed via ``Plugins``. There is a " |
| 60 |
":ref:`tutorial <customize>` on writing calibre plugins. For example, adding " |
| 61 |
"support for a new device to calibre typically involves writing fewer than " |
| 62 |
"100 lines of code in the form of a device driver plugin. You can browse the " |
| 63 |
"`built-in drivers " |
| 64 |
"<https://github.com/kovidgoyal/calibre/tree/master/src/calibre/devices>`_. " |
| 65 |
"Similarly, adding support for new conversion formats involves writing " |
| 66 |
"input/output format plugins. Another example of the modular design is the " |
| 67 |
":ref:`recipe system <news>` for fetching news. For more examples of plugins " |
| 68 |
"designed to add features to calibre, see the `Index of plugins " |
| 69 |
"<https://www.mobileread.com/forums/showthread.php?p=1362767#post1362767>`_." |
| 70 |
msgstr "Модульная конструкция calibre выражается через «Плагины». Существует :ref:`tutorial` по написанию плагинов calibre. Напр., добавление поддержки нового устройства в calibre обычно включает в себя написание менее 100 строк кода в виде плагина драйвера устройства. Вы можете просмотреть `встроенные драйверы <https://github.com/kovidgoyal/calibre/tree/master/src/calibre/devices>`_. Точно так же добавление поддержки новых форматов преобразования включает в себя написание плагинов формата ввода/вывода. Другим примером модульного дизайна является :ref:`recipe system` для получения новостей. Дополнительные примеры плагинов, предназначенных для добавления функций в calibre, см. В разделе «Индекс плагинов <https://www.mobileread.com/forums/showthread.php?p=1362767#post1362767>`_." |
| 71 |
|
| 72 |
#: ../../../__w/calibre/calibre/manual/develop.rst:34 |
| 73 |
msgid "Code layout" |
| 74 |
msgstr "Макет кода" |
| 75 |
|
| 76 |
#: ../../../__w/calibre/calibre/manual/develop.rst:36 |
| 77 |
msgid "" |
| 78 |
"All the calibre Python code is in the ``calibre`` package. This package " |
| 79 |
"contains the following main sub-packages" |
| 80 |
msgstr "Весь Python код calibre находится в пакете ``calibre``. Этот пакет содержит следующие основные подпакеты" |
| 81 |
|
| 82 |
#: ../../../__w/calibre/calibre/manual/develop.rst:38 |
| 83 |
msgid "" |
| 84 |
"devices - All the device drivers. Just look through some of the built-in " |
| 85 |
"drivers to get an idea for how they work." |
| 86 |
msgstr "devices — все драйверы устройств. Просто просмотрите некоторые встроенные драйверы, чтобы понять, как они работают." |
| 87 |
|
| 88 |
#: ../../../__w/calibre/calibre/manual/develop.rst:40 |
| 89 |
msgid "" |
| 90 |
"For details, see: ``devices.interface`` which defines the interface " |
| 91 |
"supported by device drivers and ``devices.usbms`` which defines a generic " |
| 92 |
"driver that connects to a USBMS device. All USBMS based drivers in calibre " |
| 93 |
"inherit from it." |
| 94 |
msgstr "Подробнее см.: ``devices.interface``, определяющий интерфейс, поддерживаемый драйверами устройств, и ``devices.usbms``, определяющий универсальный драйвер, который подключается к устройству USBMS. Все драйверы calibre на базе USBMS наследуются от него." |
| 95 |
|
| 96 |
#: ../../../__w/calibre/calibre/manual/develop.rst:43 |
| 97 |
msgid "" |
| 98 |
"e-books - All the e-book conversion/metadata code. A good starting point is" |
| 99 |
" ``calibre.ebooks.conversion.cli`` which is the module powering the " |
| 100 |
":command:`ebook-convert` command. The conversion process is controlled via " |
| 101 |
"``conversion.plumber``. The format independent code is all in ``ebooks.oeb``" |
| 102 |
" and the format dependent code is in ``ebooks.format_name``." |
| 103 |
msgstr "e-books — весь код преобразования электронных книг/метаданных. Хорошая отправная точка — ``calibre.ebooks.conversion.cli``, который является модулем, включающим команду :command:`ebook-convert`. Процесс преобразования контролируется через ``translation.plumber``. Код, не зависящий от формата, находится в ``ebooks.oeb``, а код, зависящий от формата, — в ``ebooks.format_name``." |
| 104 |
|
| 105 |
#: ../../../__w/calibre/calibre/manual/develop.rst:47 |
| 106 |
msgid "" |
| 107 |
"Metadata reading, writing, and downloading is all in ``ebooks.metadata``" |
| 108 |
msgstr "Чтение, запись и загрузка метаданных — всё это в ``ebooks.metadata``" |
| 109 |
|
| 110 |
#: ../../../__w/calibre/calibre/manual/develop.rst:48 |
| 111 |
msgid "" |
| 112 |
"Conversion happens in a pipeline, for the structure of the pipeline, see " |
| 113 |
":ref:`conversion-introduction`. The pipeline consists of an input plugin, " |
| 114 |
"various transforms and an output plugin. The code that constructs and drives" |
| 115 |
" the pipeline is in :file:`plumber.py`. The pipeline works on a " |
| 116 |
"representation of an e-book that is like an unzipped epub, with manifest, " |
| 117 |
"spine, toc, guide, html content, etc. The class that manages this " |
| 118 |
"representation is OEBBook in ``ebooks.oeb.base``. The various " |
| 119 |
"transformations that are applied to the book during conversions live in " |
| 120 |
":file:`oeb/transforms/*.py`. And the input and output plugins live in " |
| 121 |
":file:`conversion/plugins/*.py`." |
| 122 |
msgstr "Преобразование происходит в конвейере (о структуре конвейера см. :ref:`conversion-introduction`). Конвейер состоит из входного плагина, различных трансформаций и выходного плагина. Код, который создаёт и управляет конвейером, находится в :file:`plumber.py`. Конвейер работает над представлением электронной книги, похожей на разархивированный epub, с манифестом, spine, toc, guide, html-содержимым и т. д. Класс, который управляет этим представлением, — OEBBook в ``ebooks.oeb.base``, различные трансформации, применяемые к книге во время конвертации, находятся в :file:`oeb/transforms/*.py`. А входные и выходные плагины — в :file:`translation/plugins/*.py`." |
| 123 |
|
| 124 |
#: ../../../__w/calibre/calibre/manual/develop.rst:58 |
| 125 |
msgid "" |
| 126 |
"E-book editing happens using a different container object. It is documented " |
| 127 |
"in :ref:`polish_api`." |
| 128 |
msgstr "Редактирование электронной книги происходит с использованием другого объекта контейнера. Это задокументировано в :ref:`polish_api`." |
| 129 |
|
| 130 |
#: ../../../__w/calibre/calibre/manual/develop.rst:61 |
| 131 |
msgid "" |
| 132 |
"db - The database back-end. See :ref:`db_api` for the interface to the " |
| 133 |
"calibre library." |
| 134 |
msgstr "db — серверная часть базы данных. См.: :ref:`db_api` об интерфейсе библиотеки calibre." |
| 135 |
|
| 136 |
#: ../../../__w/calibre/calibre/manual/develop.rst:63 |
| 137 |
msgid "Content server: ``srv`` is the calibre Content server." |
| 138 |
msgstr "Контент-сервер: ``srv`` — это контент-сервер calibre." |
| 139 |
|
| 140 |
#: ../../../__w/calibre/calibre/manual/develop.rst:65 |
| 141 |
msgid "" |
| 142 |
"gui2 - The Graphical User Interface. GUI initialization happens in " |
| 143 |
"``gui2.main`` and ``gui2.ui``. The e-book-viewer is in ``gui2.viewer``. The " |
| 144 |
"e-book editor is in ``gui2.tweak_book``." |
| 145 |
msgstr "gui2 — графический интерфейс пользователя. Инициализация GUI происходит в ``gui2.main`` и ``gui2.ui``. Программа просмотра электронных книг находится в ``gui2.viewer``. Редактор электронных книг находится в ``gui2.tweak_book``." |
| 146 |
|
| 147 |
#: ../../../__w/calibre/calibre/manual/develop.rst:67 |
| 148 |
msgid "" |
| 149 |
"If you want to locate the entry points for all the various calibre " |
| 150 |
"executables, look at the ``entry_points`` structure in `linux.py " |
| 151 |
"<https://github.com/kovidgoyal/calibre/blob/master/src/calibre/linux.py>`_." |
| 152 |
msgstr "Если вы хотите найти точки входа для всех исполняемых файлов calibre различного уровня, посмотрите на структуру ``entry_points`` в `linux.py <https://github.com/kovidgoyal/calibre/blob/master/src/calibre/linux.py>`_." |
| 153 |
|
| 154 |
#: ../../../__w/calibre/calibre/manual/develop.rst:71 |
| 155 |
msgid "" |
| 156 |
"If you need help understanding the code, post in the `development forum " |
| 157 |
"<https://www.mobileread.com/forums/forumdisplay.php?f=240>`_ and you will " |
| 158 |
"most likely get help from one of calibre's many developers." |
| 159 |
msgstr "Если вам нужна помощь в понимании кода, отправьте сообщение на `форум разработчиков <https://www.mobileread.com/forums/forumdisplay.php?f=240>`_, и вы, скорее всего, получите помощь от одного из многих разработчиков calibre." |
| 160 |
|
| 161 |
#: ../../../__w/calibre/calibre/manual/develop.rst:75 |
| 162 |
msgid "Getting the code" |
| 163 |
msgstr "Получение кода" |
| 164 |
|
| 165 |
#: ../../../__w/calibre/calibre/manual/develop.rst:77 |
| 166 |
msgid "" |
| 167 |
"You can get the calibre source code in two ways, using a version control " |
| 168 |
"system or directly downloading a :website_base:`tarball <dist/src>`." |
| 169 |
msgstr "Получить исходный код calibre можно двумя способами: при помощи системы управления версиями или прямой загрузкой архива :website_base:`tarball <dist/src>`." |
| 170 |
|
| 171 |
#: ../../../__w/calibre/calibre/manual/develop.rst:80 |
| 172 |
msgid "" |
| 173 |
"calibre uses `Git <https://www.git-scm.com/>`_, a distributed version " |
| 174 |
"control system. Git is available on all the platforms calibre supports. " |
| 175 |
"After installing Git, you can get the calibre source code with the command::" |
| 176 |
msgstr "calibre использует `Git <https://www.git-scm.com/>`_, распределенную систему контроля версий. Git доступен на всех платформах, поддерживаемых calibre. После установки Git вы можете получить исходный код calibre с помощью команды::" |
| 177 |
|
| 178 |
#: ../../../__w/calibre/calibre/manual/develop.rst:86 |
| 179 |
msgid "" |
| 180 |
"On Windows you will need the complete path name, that will be something like" |
| 181 |
" :file:`C:\\\\Program Files\\\\Git\\\\git.exe`." |
| 182 |
msgstr "В Windows вам потребуется полный путь, который будет выглядеть примерно так :file:`C:\\\\Program Files\\\\Git\\\\git.exe`." |
| 183 |
|
| 184 |
#: ../../../__w/calibre/calibre/manual/develop.rst:88 |
| 185 |
msgid "" |
| 186 |
"calibre is a very large project with a very long source control history, so " |
| 187 |
"the above can take a while (10 mins to an hour depending on your internet " |
| 188 |
"speed)." |
| 189 |
msgstr "calibre — это очень большой проект с очень длинной историей управления исходным кодом, поэтому описанное выше может занять некоторое время (от 10 минут до часа в зависимости от скорости вашего интернета)." |
| 190 |
|
| 191 |
#: ../../../__w/calibre/calibre/manual/develop.rst:91 |
| 192 |
msgid "" |
| 193 |
"If you want to get the code faster, the source code for the latest release " |
| 194 |
"is always available as an :website_base:`archive <dist/src>`." |
| 195 |
msgstr "Хотите получить код быстрее - исходный код последней версии всегда доступен в виде :website_base:`archive <dist/src>`." |
| 196 |
|
| 197 |
#: ../../../__w/calibre/calibre/manual/develop.rst:94 |
| 198 |
msgid "To update a branch to the latest code, use the command::" |
| 199 |
msgstr "Чтобы обновить ветку до последнего кода, используйте команду::" |
| 200 |
|
| 201 |
#: ../../../__w/calibre/calibre/manual/develop.rst:98 |
| 202 |
msgid "" |
| 203 |
"You can also browse the code at `GitHub " |
| 204 |
"<https://github.com/kovidgoyal/calibre>`_." |
| 205 |
msgstr "Вы также можете просмотреть код на `GitHub <https://github.com/kovidgoyal/calibre>`_" |
| 206 |
|
| 207 |
#: ../../../__w/calibre/calibre/manual/develop.rst:101 |
| 208 |
msgid "Submitting your changes to be included" |
| 209 |
msgstr "Отправка ваших изменений для включения" |
| 210 |
|
| 211 |
#: ../../../__w/calibre/calibre/manual/develop.rst:103 |
| 212 |
msgid "" |
| 213 |
"If you only plan to make a few small changes, you can make your changes and " |
| 214 |
"create a \"merge directive\" which you can then attach to a ticket in the " |
| 215 |
"calibre `bug tracker <https://bugs.launchpad.net/calibre>`_. To do this, " |
| 216 |
"make your changes, then run::" |
| 217 |
msgstr "Если вы планируете внести только несколько небольших изменений, вы можете внести свои изменения и создать «merge directive», которую затем можете прикрепить к заявке в `calibre bug tracker <https://bugs.launchpad.net/calibre>`_. Для этого внесите свои изменения, затем запустите::" |
| 218 |
|
| 219 |
#: ../../../__w/calibre/calibre/manual/develop.rst:111 |
| 220 |
msgid "" |
| 221 |
"This will create a :file:`my-changes` file in the current folder, simply " |
| 222 |
"attach that to a ticket on the calibre `bug tracker " |
| 223 |
"<https://bugs.launchpad.net/calibre>`_. Note that this will include *all* " |
| 224 |
"the commits you have made. If you only want to send some commits, you have " |
| 225 |
"to change ``origin/master`` above. To send only the last commit, use::" |
| 226 |
msgstr "Это создаст файл :file:`my-changes` в текущей папке, просто прикрепите его к тикету на трекере ошибок calibre <https://bugs.launchpad.net/calibre>`_. Обратите внимание, что сюда будут включены *все* сделанные вами коммиты. Если вы хотите отправить только несколько коммитов, вам нужно изменить ``origin/master`` выше. Чтобы отправить только последний коммит, используйте::" |
| 227 |
|
| 228 |
#: ../../../__w/calibre/calibre/manual/develop.rst:119 |
| 229 |
msgid "" |
| 230 |
"To send the last *n* commits, replace *1* with *n*, for example, for the " |
| 231 |
"last 3 commits::" |
| 232 |
msgstr "Чтобы отправить последние *n* коммитов, замените *1* на *n*, напр., для последних 3 коммитов::" |
| 233 |
|
| 234 |
#: ../../../__w/calibre/calibre/manual/develop.rst:124 |
| 235 |
msgid "Be careful to not include merges when using ``HEAD~n``." |
| 236 |
msgstr "Будьте осторожны, чтобы не включать слияния при использовании ``HEAD~n``." |
| 237 |
|
| 238 |
#: ../../../__w/calibre/calibre/manual/develop.rst:126 |
| 239 |
msgid "" |
| 240 |
"If you plan to do a lot of development on calibre, then the best method is " |
| 241 |
"to create a `GitHub <https://github.com>`__ account. Below is a basic guide " |
| 242 |
"to setting up your own fork of calibre in a way that will allow you to " |
| 243 |
"submit pull requests for inclusion into the main calibre repository:" |
| 244 |
msgstr "Если вы планируете много заниматься разработкой, то лучше всего создать учетную запись `GitHub <https://github.com>`__. Ниже приведено основное руководство по настройке собственного форка calibre таким образом, чтобы вы могли отправлять пулл-реквесты для включения в основной репозиторий calibre:" |
| 245 |
|
| 246 |
#: ../../../__w/calibre/calibre/manual/develop.rst:131 |
| 247 |
msgid "" |
| 248 |
"Setup git on your machine as described in this article: `Setup Git " |
| 249 |
"<https://help.github.com/articles/set-up-git>`_" |
| 250 |
msgstr "Настройте git на своём компьютере, как описано в статье: `Setup Git <https://help.github.com/articles/set-up-git>`_" |
| 251 |
|
| 252 |
#: ../../../__w/calibre/calibre/manual/develop.rst:132 |
| 253 |
msgid "" |
| 254 |
"Setup ssh keys for authentication to GitHub, as described here: `Generating " |
| 255 |
"SSH keys <https://help.github.com/articles/generating-ssh-keys>`_" |
| 256 |
msgstr "Настройте ssh-ключи для аутентификации на GitHub, как описано здесь: `Генерация SSH-ключей <https://help.github.com/articles/generating-ssh-keys>`_" |
| 257 |
|
| 258 |
#: ../../../__w/calibre/calibre/manual/develop.rst:133 |
| 259 |
msgid "" |
| 260 |
"Go to https://github.com/kovidgoyal/calibre and click the :guilabel:`Fork` " |
| 261 |
"button." |
| 262 |
msgstr "Перейдите на https://github.com/kovidgoyal/calibre и нажмите кнопку :guilabel:`Fork`." |
| 263 |
|
| 264 |
#: ../../../__w/calibre/calibre/manual/develop.rst:134 |
| 265 |
msgid "In a Terminal do::" |
| 266 |
msgstr "В Терминале делай::" |
| 267 |
|
| 268 |
#: ../../../__w/calibre/calibre/manual/develop.rst:139 |
| 269 |
msgid "" |
| 270 |
"Replace <username> above with your GitHub username. That will get your fork " |
| 271 |
"checked out locally." |
| 272 |
msgstr "Замените <username> выше своим именем пользователя GitHub. Это позволит проверить ваш форк локально." |
| 273 |
|
| 274 |
#: ../../../__w/calibre/calibre/manual/develop.rst:140 |
| 275 |
msgid "" |
| 276 |
"You can make changes and commit them whenever you like. When you are ready " |
| 277 |
"to have your work merged, do a::" |
| 278 |
msgstr "Вы можете вносить изменения и коммитить их в любое время. Когда вы будете готовы объединить свою работу, сделайте::" |
| 279 |
|
| 280 |
#: ../../../__w/calibre/calibre/manual/develop.rst:144 |
| 281 |
msgid "" |
| 282 |
"and go to ``https://github.com/<username>/calibre`` and click the " |
| 283 |
":guilabel:`Pull Request` button to generate a pull request that can be " |
| 284 |
"merged." |
| 285 |
msgstr "и перейдите к ``https://github.com/<username>/calibre`` и нажмите кнопку :guilabel:`Pull Request`, чтобы сгенерировать пул-реквест, который можно объединить." |
| 286 |
|
| 287 |
#: ../../../__w/calibre/calibre/manual/develop.rst:145 |
| 288 |
msgid "" |
| 289 |
"You can update your local copy with code from the main repo at any time by " |
| 290 |
"doing::" |
| 291 |
msgstr "Вы можете в любое время обновить свою локальную копию кодом из основного репозитория, выполнив::" |
| 292 |
|
| 293 |
#: ../../../__w/calibre/calibre/manual/develop.rst:150 |
| 294 |
msgid "" |
| 295 |
"You should also keep an eye on the calibre `development forum " |
| 296 |
"<https://www.mobileread.com/forums/forumdisplay.php?f=240>`_. Before making " |
| 297 |
"major changes, you should discuss them in the forum or contact Kovid " |
| 298 |
"directly (his email address is all over the source code)." |
| 299 |
msgstr "Вам также следует следить за `форумом по разработке calibre <https://www.mobileread.com/forums/forumdisplay.php?f=240>`_. Прежде чем вносить серьезные изменения, вы должны обсудить их на форуме или напрямую связаться с Ковидом (его адрес электронной почты указан по всему исходному коду)." |
| 300 |
|
| 301 |
#: ../../../__w/calibre/calibre/manual/develop.rst:156 |
| 302 |
msgid "Windows development environment" |
| 303 |
msgstr "Среда разработки под Windows" |
| 304 |
|
| 305 |
#: ../../../__w/calibre/calibre/manual/develop.rst:158 |
| 306 |
#: ../../../__w/calibre/calibre/manual/develop.rst:192 |
| 307 |
#: ../../../__w/calibre/calibre/manual/develop.rst:229 |
| 308 |
msgid "" |
| 309 |
"You must also get the calibre source code separately as described above." |
| 310 |
msgstr "Вы также должны получить исходный код calibre отдельно, как описано выше." |
| 311 |
|
| 312 |
#: ../../../__w/calibre/calibre/manual/develop.rst:160 |
| 313 |
msgid "" |
| 314 |
"Install calibre normally, using the `Windows installer <https://calibre-" |
| 315 |
"ebook.com/download_windows>`__. Then open a Command Prompt and change to the" |
| 316 |
" previously checked out calibre code folder. For example::" |
| 317 |
msgstr "Установите calibre обычным образом, используя `Windows installer <https://calibre-ebook.com/download_windows>`__. Затем откройте командную строку и перейдите в ранее проверенную папку кода calibre. Напр.::" |
| 318 |
|
| 319 |
#: ../../../__w/calibre/calibre/manual/develop.rst:165 |
| 320 |
#: ../../../__w/calibre/calibre/manual/develop.rst:241 |
| 321 |
msgid "calibre is the folder that contains the src and resources sub-folders." |
| 322 |
msgstr "calibre - это папка, содержащая подпапки src и resources." |
| 323 |
|
| 324 |
#: ../../../__w/calibre/calibre/manual/develop.rst:167 |
| 325 |
msgid "" |
| 326 |
"The next step is to set the environment variable ``CALIBRE_DEVELOP_FROM`` to" |
| 327 |
" the absolute path of the src folder. So, following the example above, it " |
| 328 |
"would be ``C:\\Users\\kovid\\work\\calibre\\src``. `Here is a short guide " |
| 329 |
"<https://docs.python.org/using/windows.html#excursus-setting-environment-" |
| 330 |
"variables>`_ to setting environment variables on Windows." |
| 331 |
msgstr "Следующий шаг - установка переменной среды CALIBRE_DEVELOP_FROM = абсолютный путь к папке src. Итак, следуя приведенному выше примеру, это будет ``C:\\Users\\kovid\\work\\calibre\\src``. `Вот краткое руководство <https://docs.python.org/using/windows.html#excursus-setting-environment-variables>`_ по настройке переменных среды в Windows." |
| 332 |
|
| 333 |
#: ../../../__w/calibre/calibre/manual/develop.rst:172 |
| 334 |
msgid "" |
| 335 |
"Once you have set the environment variable, open a new command prompt and " |
| 336 |
"check that it was correctly set by using the command::" |
| 337 |
msgstr "После того, как вы установили переменную окружения, откройте новую командную строку и проверьте, что она была правильно установлена, используя команду::" |
| 338 |
|
| 339 |
#: ../../../__w/calibre/calibre/manual/develop.rst:177 |
| 340 |
#: ../../../__w/calibre/calibre/manual/develop.rst:260 |
| 341 |
msgid "" |
| 342 |
"Setting this environment variable means that calibre will now load all its " |
| 343 |
"Python code from the specified location." |
| 344 |
msgstr "Установка этой переменной окружения означает, что calibre теперь будет загружать весь свой код Python из указанного места." |
| 345 |
|
| 346 |
#: ../../../__w/calibre/calibre/manual/develop.rst:179 |
| 347 |
msgid "" |
| 348 |
"That's it! You are now ready to start hacking on the calibre code. For " |
| 349 |
"example, open the file :file:`src\\\\calibre\\\\__init__.py` in your " |
| 350 |
"favorite editor and add the line::" |
| 351 |
msgstr "Это всё! Теперь вы готовы взломать код calibre. Напр., откройте файл :file:`src\\\\calibre\\\\__init__.py` в вашем любимом редакторе и добавьте строку::" |
| 352 |
|
| 353 |
#: ../../../__w/calibre/calibre/manual/develop.rst:184 |
| 354 |
#: ../../../__w/calibre/calibre/manual/develop.rst:267 |
| 355 |
msgid "" |
| 356 |
"near the top of the file. Now run the command :command:`calibredb`. The very" |
| 357 |
" first line of output should be ``Hello, world!``." |
| 358 |
msgstr "в верхней части файла. Теперь запустите команду :command:`calibredb`. Самая первая строка вывода должна быть ``Hello, world!``." |
| 359 |
|
| 360 |
#: ../../../__w/calibre/calibre/manual/develop.rst:186 |
| 361 |
msgid "" |
| 362 |
"You can also setup a calibre development environment inside the free " |
| 363 |
"Microsoft Visual Studio, if you like, following the instructions `here " |
| 364 |
"<https://www.mobileread.com/forums/showthread.php?t=251201>`_." |
| 365 |
msgstr "Вы также можете настроить окужение разработки calibre в бесплатной Microsoft Visual Studio, если хотите, следуя инструкциям `здесь <https://www.mobileread.com/forums/showthread.php?t=251201>`_." |
| 366 |
|
| 367 |
#: ../../../__w/calibre/calibre/manual/develop.rst:190 |
| 368 |
msgid "macOS development environment" |
| 369 |
msgstr "Среда разработки под macOS" |
| 370 |
|
| 371 |
#: ../../../__w/calibre/calibre/manual/develop.rst:194 |
| 372 |
msgid "" |
| 373 |
"Install calibre normally using the `provided .dmg <https://calibre-" |
| 374 |
"ebook.com/download_osx>`__. Then open a Terminal and change to the " |
| 375 |
"previously checked out calibre code folder, for example::" |
| 376 |
msgstr "Установите calibre обычным образом, используя `предоставленный .dmg <https://calibre-ebook.com/download_osx>`__. Затем откройте Terminal и перейдите в ранее проверенную папку кода calibre. Напр.::" |
| 377 |
|
| 378 |
#: ../../../__w/calibre/calibre/manual/develop.rst:199 |
| 379 |
msgid "" |
| 380 |
"calibre is the folder that contains the src and resources sub-folders. The " |
| 381 |
"calibre command line tools are found inside the calibre app bundle, in " |
| 382 |
":file:`/Applications/calibre.app/Contents/MacOS` you should add this folder " |
| 383 |
"to your PATH environment variable, if you want to run the command line tools" |
| 384 |
" easily." |
| 385 |
msgstr "calibre - это папка, содержащая подпапки src и resources. Инструменты командной строки calibre находятся внутри пакета приложений calibre, в :file:`/Applications/calibre.app/Contents/MacOS`, вы должны добавить эту папку в переменную среды PATH, если вы хотите легко запускать инструменты командной строки." |
| 386 |
|
| 387 |
#: ../../../__w/calibre/calibre/manual/develop.rst:205 |
| 388 |
msgid "" |
| 389 |
"The next step is to create a bash script that will set the environment " |
| 390 |
"variable ``CALIBRE_DEVELOP_FROM`` to the absolute path of the src folder " |
| 391 |
"when running calibre in debug mode." |
| 392 |
msgstr "Следующий шаг - создание сценария bash, который установит для переменной среды ``CALIBRE_DEVELOP_FROM`` абсолютный путь к папке src при запуске calibre в режиме отладки." |
| 393 |
|
| 394 |
#: ../../../__w/calibre/calibre/manual/develop.rst:208 |
| 395 |
msgid "Create a plain text file::" |
| 396 |
msgstr "Создайте простой текстовый файл::" |
| 397 |
|
| 398 |
#: ../../../__w/calibre/calibre/manual/develop.rst:214 |
| 399 |
msgid "" |
| 400 |
"Save this file as :file:`/usr/local/bin/calibre-develop`, then set its " |
| 401 |
"permissions so that it can be executed::" |
| 402 |
msgstr "Сохраните этот файл как :file:`/usr/local/bin/calibre-develop`, затем установите ему права доступа так, чтобы он мог выполняться::" |
| 403 |
|
| 404 |
#: ../../../__w/calibre/calibre/manual/develop.rst:218 |
| 405 |
msgid "Once you have done this, run::" |
| 406 |
msgstr "Как только вы это сделали, запустите::" |
| 407 |
|
| 408 |
#: ../../../__w/calibre/calibre/manual/develop.rst:222 |
| 409 |
msgid "" |
| 410 |
"You should see some diagnostic information in the Terminal window as calibre" |
| 411 |
" starts up, and you should see an asterisk after the version number in the " |
| 412 |
"GUI window, indicating that you are running from source." |
| 413 |
msgstr "При запуске calibre вы должны увидеть диагностическую информацию в окне терминала, а в окне графического интерфейса вы увидите звездочку после номера версии, указывающую, что вы запустились из исходников." |
| 414 |
|
| 415 |
#: ../../../__w/calibre/calibre/manual/develop.rst:227 |
| 416 |
msgid "Linux development environment" |
| 417 |
msgstr "Среда разработки под Linux" |
| 418 |
|
| 419 |
#: ../../../__w/calibre/calibre/manual/develop.rst:231 |
| 420 |
msgid "" |
| 421 |
"calibre is primarily developed on Linux. You have two choices in setting up " |
| 422 |
"the development environment. You can install the calibre binary as normal " |
| 423 |
"and use that as a runtime environment to do your development. This approach " |
| 424 |
"is similar to that used in Windows and macOS. Alternatively, you can install" |
| 425 |
" calibre from source. Instructions for setting up a development environment " |
| 426 |
"from source are in the INSTALL file in the source tree. Here we will address" |
| 427 |
" using the binary as a runtime, which is the recommended method." |
| 428 |
msgstr "calibre в основном разработан на Linux. У вас есть два варианта настройки среды разработки. Вы можете установить бинарный файл calibre как обычно и использовать его в качестве среды выполнения для разработки. Этот подход аналогичен тому, который используется в Windows и macOS. Кроме того, вы можете установить calibre из исходных кодов. Инструкции по настройке среды разработки из исходного кода находятся в файле INSTALL в дереве исходного кода. Здесь мы рассмотрим использование двоичного файла в качестве среды выполнения, что является рекомендуемым методом." |
| 429 |
|
| 430 |
#: ../../../__w/calibre/calibre/manual/develop.rst:237 |
| 431 |
msgid "" |
| 432 |
"Install calibre using the `binary installer <https://calibre-" |
| 433 |
"ebook.com/download_linux>`_. Then open a terminal and change to the " |
| 434 |
"previously checked out calibre code folder, for example::" |
| 435 |
msgstr "Установите calibre обычным образом, используя `binary installer <https://calibre-ebook.com/download_linux>`_. Затем откройте терминал и перейдите в ранее проверенную папку кода calibre. Напр.::" |
| 436 |
|
| 437 |
#: ../../../__w/calibre/calibre/manual/develop.rst:243 |
| 438 |
msgid "" |
| 439 |
"The next step is to set the environment variable ``CALIBRE_DEVELOP_FROM`` to" |
| 440 |
" the absolute path of the src folder. So, following the example above, it " |
| 441 |
"would be ``/home/kovid/work/calibre/src``. How to set environment variables " |
| 442 |
"depends on your Linux distribution and what shell you are using." |
| 443 |
msgstr "Следующий шаг - установка переменной среды CALIBRE_DEVELOP_FROM = абсолютный путь к папке src. Итак, следуя приведенному выше примеру, это будет /home/kovid/work/calibre/src. Как установить переменные среды, зависит от вашего дистрибутива Linux и используемой оболочки." |
| 444 |
|
| 445 |
#: ../../../__w/calibre/calibre/manual/develop.rst:248 |
| 446 |
msgid "" |
| 447 |
"It is recommended to use the binary installer provided from upstream. Should" |
| 448 |
" you insist on using a package provided by your distribution, use the " |
| 449 |
"``CALIBRE_PYTHON_PATH`` and ``CALIBRE_RESOURCES_PATH`` variables instead. " |
| 450 |
"You can get these by running ``calibre-debug --paths``. But note that " |
| 451 |
"distribution calibre packages are often terminally broken and are completely" |
| 452 |
" unsupported." |
| 453 |
msgstr "Рекомендуется использовать бинарный установщик, предоставленный из апстрима. Если вы настаиваете на использовании пакета, предоставленного вашим дистрибутивом, используйте вместо этого переменные ``CALIBRE_PYTHON_PATH`` и ``CALIBRE_RESOURCES_PATH``. Вы можете получить их, выполнив команду ``calibre-debug --paths``. Но обратите внимание, что дистрибутивные пакеты calibre часто безнадежно ломаются и полностью не поддерживаются." |
| 454 |
|
| 455 |
#: ../../../__w/calibre/calibre/manual/develop.rst:255 |
| 456 |
msgid "" |
| 457 |
"Once you have set the environment variable, open a new terminal and check " |
| 458 |
"that it was correctly set by using the command::" |
| 459 |
msgstr "После того, как вы установили переменную окружения, откройте новый терминал и проверьте, что она была правильно установлена, используя команду::" |
| 460 |
|
| 461 |
#: ../../../__w/calibre/calibre/manual/develop.rst:262 |
| 462 |
msgid "" |
| 463 |
"That's it! You are now ready to start hacking on the calibre code. For " |
| 464 |
"example, open the file :file:`src/calibre/__init__.py` in your favorite " |
| 465 |
"editor and add the line::" |
| 466 |
msgstr "Это всё! Теперь вы готовы взломать код calibre. Напр., откройте файл :file:`src\\\\calibre\\\\__init__.py` в вашем любимом редакторе и добавьте строку::" |
| 467 |
|
| 468 |
#: ../../../__w/calibre/calibre/manual/develop.rst:270 |
| 469 |
msgid "" |
| 470 |
"Having separate \"normal\" and \"development\" calibre installs on the same " |
| 471 |
"computer" |
| 472 |
msgstr "Раздельная установка «обычной» и «разрабатываемой» версий calibre на одном компьютере" |
| 473 |
|
| 474 |
#: ../../../__w/calibre/calibre/manual/develop.rst:272 |
| 475 |
msgid "" |
| 476 |
"The calibre source tree is very stable and rarely breaks, but if you feel " |
| 477 |
"the need to run from source on a separate test library and run the released " |
| 478 |
"calibre version with your everyday library, you can achieve this easily " |
| 479 |
"using .bat files or shell scripts to launch calibre. The example below shows" |
| 480 |
" how to do this on Windows using .bat files (the instructions for other " |
| 481 |
"platforms are the same, just use a shell script instead of a .bat file)" |
| 482 |
msgstr "Исходное дерево кодов calibre очень стабильно и редко ломается, но если вы чувствуете необходимость запуска из источника в отдельной тестовой библиотеке и запускаете выпущенную версию calibre с вашей повседневной библиотекой, вы можете легко добиться этого, используя файлы .bat или сценарии оболочки для запуска calibre. В приведенном ниже примере показано, как сделать это в Windows с использованием файлов .bat (инструкции для других платформ такие же, просто используйте сценарий оболочки вместо файла .bat)" |
| 483 |
|
| 484 |
#: ../../../__w/calibre/calibre/manual/develop.rst:277 |
| 485 |
msgid "To launch the release version of calibre with your everyday library:" |
| 486 |
msgstr "Для запуска стабильной версии Calibre с вашей основной библиотекой:" |
| 487 |
|
| 488 |
#: ../../../__w/calibre/calibre/manual/develop.rst:279 |
| 489 |
msgid "calibre-normal.bat::" |
| 490 |
msgstr "calibre-normal.bat::" |
| 491 |
|
| 492 |
#: ../../../__w/calibre/calibre/manual/develop.rst:283 |
| 493 |
msgid "calibre-dev.bat::" |
| 494 |
msgstr "calibre-dev.bat::" |
| 495 |
|
| 496 |
#: ../../../__w/calibre/calibre/manual/develop.rst:290 |
| 497 |
msgid "Debugging tips" |
| 498 |
msgstr "Советы по отладке" |
| 499 |
|
| 500 |
#: ../../../__w/calibre/calibre/manual/develop.rst:292 |
| 501 |
msgid "" |
| 502 |
"Python is a dynamically typed language with excellent facilities for " |
| 503 |
"introspection. Kovid wrote the core calibre code without once using a " |
| 504 |
"debugger. There are many strategies to debug calibre code:" |
| 505 |
msgstr "Python — это динамически типизированный язык с отличными возможностями для самоанализа. Ковид написал код ядра calibre без единого использования отладчика. Существует много стратегий для отладки кода calibre:" |
| 506 |
|
| 507 |
#: ../../../__w/calibre/calibre/manual/develop.rst:297 |
| 508 |
msgid "Using print statements" |
| 509 |
msgstr "Использование print statements" |
| 510 |
|
| 511 |
#: ../../../__w/calibre/calibre/manual/develop.rst:299 |
| 512 |
msgid "" |
| 513 |
"This is Kovid's favorite way to debug. Simply insert print statements at " |
| 514 |
"points of interest and run your program in the terminal. For example, you " |
| 515 |
"can start the GUI from the terminal as::" |
| 516 |
msgstr "Это любимый способ отладки Ковида. Просто вставьте операторы печати в интересующие места и запустите вашу программу в терминале. Напр., вы можете запустить графический интерфейс из терминала как::" |
| 517 |
|
| 518 |
#: ../../../__w/calibre/calibre/manual/develop.rst:304 |
| 519 |
msgid "Similarly, you can start the E-book viewer as::" |
| 520 |
msgstr "Точно так же вы можете запустить просмотрщик электронных книг как::" |
| 521 |
|
| 522 |
#: ../../../__w/calibre/calibre/manual/develop.rst:308 |
| 523 |
msgid "The e-book editor can be started as::" |
| 524 |
msgstr "Редактор электронных книг может быть запущен так::" |
| 525 |
|
| 526 |
#: ../../../__w/calibre/calibre/manual/develop.rst:313 |
| 527 |
msgid "Using an interactive Python interpreter" |
| 528 |
msgstr "Использование интерактивного интерпретатора Python" |
| 529 |
|
| 530 |
#: ../../../__w/calibre/calibre/manual/develop.rst:315 |
| 531 |
msgid "" |
| 532 |
"You can insert the following two lines of code to start an interactive " |
| 533 |
"Python session at that point::" |
| 534 |
msgstr "Вы можете вставить следующие две строки кода, чтобы начать интерактивный сеанс Python в этой точке::" |
| 535 |
|
| 536 |
#: ../../../__w/calibre/calibre/manual/develop.rst:320 |
| 537 |
msgid "" |
| 538 |
"When running from the command line, this will start an interactive Python " |
| 539 |
"interpreter with access to all locally defined variables (variables in the " |
| 540 |
"local scope). The interactive prompt even has :kbd:`Tab` completion for " |
| 541 |
"object properties and you can use the various Python facilities for " |
| 542 |
"introspection, such as :func:`dir`, :func:`type`, :func:`repr`, etc." |
| 543 |
msgstr "При запуске из командной строки запускается интерактивный интерпретатор Python с доступом ко всем локально определенным переменным (переменным в локальной области). Интерактивная подсказка даже имеет завершение по :kbd:`Tab` для свойств объекта, и вы можете использовать различные возможности Python для интроспекции, такие как :func:`dir`, :func:`type`, :func:`repr` и т. д." |
| 544 |
|
| 545 |
#: ../../../__w/calibre/calibre/manual/develop.rst:326 |
| 546 |
msgid "Using the Python debugger as a remote debugger" |
| 547 |
msgstr "Использовать отладчик Python как удаленный отладчик" |
| 548 |
|
| 549 |
#: ../../../__w/calibre/calibre/manual/develop.rst:328 |
| 550 |
msgid "" |
| 551 |
"You can use the builtin Python debugger (pdb) as a remote debugger from the " |
| 552 |
"command line. First, start the remote debugger at the point in the calibre " |
| 553 |
"code you are interested in, like this::" |
| 554 |
msgstr "Вы можете использовать встроенный отладчик Python (pdb) в качестве удаленного отладчика из командной строки. Сначала запустите удаленный отладчик в интересующем вас месте кода calibre, напр.::" |
| 555 |
|
| 556 |
#: ../../../__w/calibre/calibre/manual/develop.rst:335 |
| 557 |
msgid "" |
| 558 |
"Then run calibre, either as normal, or using one of the calibre-debug " |
| 559 |
"commands described in the previous section. Once the above point in the code" |
| 560 |
" is reached, calibre will freeze, waiting for the debugger to connect." |
| 561 |
msgstr "Затем запустите calibre, как обычно, или с помощью одной из команд отладки calibre, описанных в предыдущем разделе. Как только вышеуказанная точка в коде будет достигнута, calibre остановится, ожидая подключения отладчика." |
| 562 |
|
| 563 |
#: ../../../__w/calibre/calibre/manual/develop.rst:339 |
| 564 |
msgid "" |
| 565 |
"Now open a terminal or command prompt and use the following command to start" |
| 566 |
" the debugging session::" |
| 567 |
msgstr "Теперь откройте терминал или командную строку и используйте следующую команду для запуска сеанса отладки::" |
| 568 |
|
| 569 |
#: ../../../__w/calibre/calibre/manual/develop.rst:344 |
| 570 |
msgid "" |
| 571 |
"You can read about how to use the Python debugger in the `Python stdlib docs" |
| 572 |
" for the pdb module <https://docs.python.org/library/pdb.html#debugger-" |
| 573 |
"commands>`_." |
| 574 |
msgstr "Прочитать о том, как использовать отладчик Python, можно в `Документации Python stdlib для модуля pdb (англ.) <https://docs.python.org/library/pdb.html#debugger-commands>`_." |
| 575 |
|
| 576 |
#: ../../../__w/calibre/calibre/manual/develop.rst:348 |
| 577 |
msgid "" |
| 578 |
"By default, the remote debugger will try to connect on port 4444. You can " |
| 579 |
"change it, by passing the port parameter to both the set_trace() and the " |
| 580 |
"cli() functions above, like this: ``set_trace(port=1234)`` and " |
| 581 |
"``cli(port=1234)``." |
| 582 |
msgstr "По умолчанию удаленный отладчик будет пытаться подключиться к порту 4444. Вы можете изменить его, передав параметр порта обеим функциям set_trace() и cli(), описанным выше, напр.: ``set_trace(port=1234)`` и ``cli(port=1234)``." |
| 583 |
|
| 584 |
#: ../../../__w/calibre/calibre/manual/develop.rst:354 |
| 585 |
msgid "" |
| 586 |
"The Python debugger cannot handle multiple threads, so you have to call " |
| 587 |
"set_trace once per thread, each time with a different port number." |
| 588 |
msgstr "Отладчик Python не может обрабатывать несколько потоков, поэтому вы должны вызывать set_trace один раз для потока, каждый раз с другим номером порта." |
| 589 |
|
| 590 |
#: ../../../__w/calibre/calibre/manual/develop.rst:358 |
| 591 |
msgid "Using the debugger in your favorite Python IDE" |
| 592 |
msgstr "Использование отладчика в вашей любимой Python IDE" |
| 593 |
|
| 594 |
#: ../../../__w/calibre/calibre/manual/develop.rst:360 |
| 595 |
msgid "" |
| 596 |
"It is possible to use the builtin debugger in your favorite Python IDE, if " |
| 597 |
"it supports remote debugging. The first step is to add the calibre src " |
| 598 |
"checkout to the ``PYTHONPATH`` in your IDE. In other words, the folder you " |
| 599 |
"set as ``CALIBRE_DEVELOP_FROM`` above, must also be in the ``PYTHONPATH`` of" |
| 600 |
" your IDE." |
| 601 |
msgstr "Можно использовать встроенный отладчик в вашей любимой среде разработки Python, если он поддерживает удаленную отладку. Первый шаг - добавить проверку calibre src в PYTHONPATH в вашей среде IDE. Другими словами, папка, которую вы установили как CALIBRE_DEVELOP_FROM выше, также должна находиться в PYTHONPATH вашей IDE." |
| 602 |
|
| 603 |
#: ../../../__w/calibre/calibre/manual/develop.rst:365 |
| 604 |
msgid "" |
| 605 |
"Then place the IDE's remote debugger module into the :file:`src` sub-folder " |
| 606 |
"of the calibre source code checkout. Add whatever code is needed to launch " |
| 607 |
"the remote debugger to calibre at the point of interest, for example in the " |
| 608 |
"main function. Then run calibre as normal. Your IDE should now be able to " |
| 609 |
"connect to the remote debugger running inside calibre." |
| 610 |
msgstr "Затем поместите модуль удаленного отладчика IDE в подпапку :file:`src` проверки исходного кода calibre. Добавьте любой код, необходимый для запуска удаленного отладчика до нужного уровня, напр., в основной функции. Затем запустите calibre как обычно. Теперь ваша IDE должна иметь возможность подключаться к удаленному отладчику, работающему внутри calibre." |
| 611 |
|
| 612 |
#: ../../../__w/calibre/calibre/manual/develop.rst:372 |
| 613 |
msgid "Executing arbitrary scripts in the calibre Python environment" |
| 614 |
msgstr "Выполнение произвольных скриптов в окружении Python calibre " |
| 615 |
|
| 616 |
#: ../../../__w/calibre/calibre/manual/develop.rst:374 |
| 617 |
msgid "" |
| 618 |
"The :command:`calibre-debug` command provides a couple of handy switches to " |
| 619 |
"execute your own code, with access to the calibre modules::" |
| 620 |
msgstr "Команда :command:`calibre-debug` предоставляет несколько удобных ключей для выполнения собственного кода с доступом к модулям calibre::" |
| 621 |
|
| 622 |
#: ../../../__w/calibre/calibre/manual/develop.rst:379 |
| 623 |
msgid "" |
| 624 |
"is great for testing a little snippet of code on the command line. It works " |
| 625 |
"in the same way as the -c switch to the Python interpreter::" |
| 626 |
msgstr "отлично подходит для тестирования небольшого фрагмента кода в командной строке. Он работает так же, как ключ -c для интерпретатора Python::" |
| 627 |
|
| 628 |
#: ../../../__w/calibre/calibre/manual/develop.rst:383 |
| 629 |
msgid "" |
| 630 |
"can be used to execute your own Python script. It works in the same way as " |
| 631 |
"passing the script to the Python interpreter, except that the calibre " |
| 632 |
"environment is fully initialized, so you can use all the calibre code in " |
| 633 |
"your script. To use command line arguments with your script, use the form::" |
| 634 |
msgstr "может быть использован для выполнения вашего собственного скрипта Python. Он работает так же, как и передача скрипта интерпретатору Python, за исключением того, что окружение calibre полностью инициализировано, поэтому вы можете использовать весь код calibre в своем скрипте. Чтобы использовать аргументы командной строки с вашим скриптом, используйте форму::" |
| 635 |
|
| 636 |
#: ../../../__w/calibre/calibre/manual/develop.rst:388 |
| 637 |
msgid "" |
| 638 |
"The ``--`` causes all subsequent arguments to be passed to your script." |
| 639 |
msgstr "``--`` заставляет все последующие аргументы быть переданными в ваш скрипт." |
| 640 |
|
| 641 |
#: ../../../__w/calibre/calibre/manual/develop.rst:392 |
| 642 |
msgid "Running the calibre test suite" |
| 643 |
msgstr "Запуск набора тестов Calibre" |
| 644 |
|
| 645 |
#: ../../../__w/calibre/calibre/manual/develop.rst:394 |
| 646 |
msgid "The calibre test suite can be run by::" |
| 647 |
msgstr "Набор тестов Calibre можно запустить с помощью:" |
| 648 |
|
| 649 |
#: ../../../__w/calibre/calibre/manual/develop.rst:400 |
| 650 |
msgid "Using calibre in your projects" |
| 651 |
msgstr "Использование calibre в собственных проектах" |
| 652 |
|
| 653 |
#: ../../../__w/calibre/calibre/manual/develop.rst:402 |
| 654 |
msgid "" |
| 655 |
"It is possible to directly use calibre functions/code in your Python " |
| 656 |
"project. Two ways exist to do this:" |
| 657 |
msgstr "Можно напрямую использовать функции/код calibre в вашем проекте Python. Существует два способа сделать это:" |
| 658 |
|
| 659 |
#: ../../../__w/calibre/calibre/manual/develop.rst:405 |
| 660 |
msgid "Binary install of calibre" |
| 661 |
msgstr "Установка исполняемого файла calibre" |
| 662 |
|
| 663 |
#: ../../../__w/calibre/calibre/manual/develop.rst:407 |
| 664 |
msgid "" |
| 665 |
"If you have a binary install of calibre, you can use the Python interpreter " |
| 666 |
"bundled with calibre, like this::" |
| 667 |
msgstr "Если у вас есть бинарная установка calibre, вы можете использовать интерпретатор Python в комплекте с calibre, напр.::" |
| 668 |
|
| 669 |
#: ../../../__w/calibre/calibre/manual/develop.rst:412 |
| 670 |
msgid "Source install on Linux" |
| 671 |
msgstr "Установка из исходного кода в Linux" |
| 672 |
|
| 673 |
#: ../../../__w/calibre/calibre/manual/develop.rst:414 |
| 674 |
msgid "" |
| 675 |
"In addition to using the above technique, if you do a source install on " |
| 676 |
"Linux, you can also directly import calibre, as follows::" |
| 677 |
msgstr "Помимо использования описанной выше техники, если вы выполняете установку из исходного кода в Linux, вы также можете напрямую импортировать calibre, как показано ниже::" |
| 678 |
|
| 679 |
#: ../../../__w/calibre/calibre/manual/develop.rst:422 |
| 680 |
msgid "" |
| 681 |
"It is essential that you import the init_calibre module before any other " |
| 682 |
"calibre modules/packages as it sets up the interpreter to run calibre code." |
| 683 |
msgstr "Важно, чтобы вы импортировали модуль init_calibre перед любыми другими модулями/пакетами calibre, поскольку он настраивает интерпретатор для запуска кода calibre." |
| 684 |
|
| 685 |
#: ../../../__w/calibre/calibre/manual/develop.rst:426 |
| 686 |
msgid "API documentation for various parts of calibre" |
| 687 |
msgstr "Документация API различных частей calibre" |