Debian Codegraph @

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