Debian Codegraph @

translations/manual/cs/function_mode.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 # Michal Várady <[email protected]>, 2026
7 # Trottel <[email protected]>, 2016-2017,2020-2021,2023,2025
8 msgid ""
9 msgstr ""
10 "Project-Id-Version: calibre\n"
11 "Report-Msgid-Bugs-To: \n"
12 "POT-Creation-Date: 2026-06-12 19:09+0000\n"
13 "PO-Revision-Date: 2014-11-21 02:54+0000\n"
14 "Last-Translator: Michal Várady <[email protected]>, 2026\n"
15 "Language-Team: Czech (http://app.transifex.com/calibre/calibre/language/cs/)\n"
16 "MIME-Version: 1.0\n"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
19 "Language: cs\n"
20 "Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
21
22 #: ../../../__w/calibre/calibre/manual/function_mode.rst:2
23 msgid "Function mode for Search & replace in the Editor"
24 msgstr "Režim funkcí pro Hledat a nahradit v editoru"
25
26 #: ../../../__w/calibre/calibre/manual/function_mode.rst:4
27 msgid ""
28 "The :guilabel:`Search & replace` tool in the editor supports a *function "
29 "mode*. In this mode, you can combine regular expressions (see :doc:`regexp`)"
30 " with arbitrarily powerful Python functions to do all sorts of advanced text"
31 " processing."
32 msgstr "Nástroj :guilabel:`Hledat a nahradit` v editoru podporuje *režim funkcí*. V tomto režimu můžete kombinovat regulární výrazy (viz :doc:`regexp`) s libovolně výkonnými funkcemi Pythonu a provádět nejrůznější pokročilé zpracování textu."
33
34 #: ../../../__w/calibre/calibre/manual/function_mode.rst:9
35 msgid ""
36 "In the standard *regexp* mode for search and replace, you specify both a "
37 "regular expression to search for as well as a template that is used to "
38 "replace all found matches. In function mode, instead of using a fixed "
39 "template, you specify an arbitrary function, in the `Python programming "
40 "language <https://docs.python.org>`_. This allows you to do lots of things "
41 "that are not possible with simple templates."
42 msgstr "Ve standardním režimu *regulární výraz* pro hledání a nahrazení zadáváte jak regulární výraz pro hledání, tak šablonu, která je použita pro nahrazení všech nalezených shod. V režimu funkcí, namísto použití pevné šablony, zadáte libovolnou funkci v `programovacím jazyce Python <https://docs.python.org/>`_. Umožní vám to udělat spoustu věcí, které nejsou možné u jednoduchých šablon."
43
44 #: ../../../__w/calibre/calibre/manual/function_mode.rst:16
45 msgid ""
46 "Techniques for using function mode and the syntax will be described by means"
47 " of examples, showing you how to create functions to perform progressively "
48 "more complex tasks."
49 msgstr "Techniky pro použití režimu funkcí a syntaxe budou popsány pomocí příkladů, které vám ukáží, jak vytvořit funkce pro provádění postupně složitějších úloh."
50
51 #: ../../../__w/calibre/calibre/manual/function_mode.rst:21
52 msgid "The Function mode"
53 msgstr "Režim funkcí"
54
55 #: ../../../__w/calibre/calibre/manual/function_mode.rst:26
56 msgid "Automatically fixing the case of headings in the document"
57 msgstr "Automatická oprava velikosti písmen nadpisů v dokumentu"
58
59 #: ../../../__w/calibre/calibre/manual/function_mode.rst:28
60 msgid ""
61 "Here, we will leverage one of the builtin functions in the editor to "
62 "automatically change the case of all text inside heading tags to title "
63 "case::"
64 msgstr "Zde budeme využívat jednu z vestavěných funkcí v editoru pro automatickou změnu velikosti písmen celého textu uvnitř značek nadpisů, aby byla všechna první písmena velká::"
65
66 #: ../../../__w/calibre/calibre/manual/function_mode.rst:33
67 msgid ""
68 "For the function, simply choose the :guilabel:`Title-case text (ignore "
69 "tags)` builtin function. This will change titles that look like: ``<h1>some "
70 "titLE</h1>`` to ``<h1>Some Title</h1>``. It will work even if there are "
71 "other HTML tags inside the heading tags."
72 msgstr "Jako funkci jednoduše vyberte vestavěnou funkci :guilabel:`Text s velkými počátečními písmeny (ignorovat značky)`. Ta změní nadpisy vypadající jako ``<h1>some titLE</h1>`` na ``<h1>Some Title</h1>``. Bude fungovat i tehdy, když jsou uvnitř značek nadpisu další HTML značky."
73
74 #: ../../../__w/calibre/calibre/manual/function_mode.rst:40
75 msgid "Your first custom function - smartening hyphens"
76 msgstr "Vaše první vlastní funkce – vylepšení pomlček"
77
78 #: ../../../__w/calibre/calibre/manual/function_mode.rst:42
79 msgid ""
80 "The real power of function mode comes from being able to create your own "
81 "functions to process text in arbitrary ways. The Smarten Punctuation tool in"
82 " the editor leaves individual hyphens alone, so you can use this function to"
83 " replace them with em-dashes."
84 msgstr "Skutečná síla režimu funkcí spočívá v možnosti vytvářet vlastní funkce pro libovolné zpracování textu. Nástroj editoru pro chytrou interpunkci ponechává jednotlivé spojovníky beze změny, takže tuto funkci můžete použít k jejich nahrazení dlouhými pomlčkami."
85
86 #: ../../../__w/calibre/calibre/manual/function_mode.rst:47
87 msgid ""
88 "To create a new function, simply click the :guilabel:`Create/edit` button to"
89 " create a new function and copy the Python code from below."
90 msgstr "Pro vytvoření nové funkce jednoduše klikněte na tlačítko :guilabel:`Vytvořit nebo upravit` pro vytvoření nové funkce a zkopírujte níže uvedený kód Pythonu."
91
92 #: ../../../__w/calibre/calibre/manual/function_mode.rst:55
93 msgid ""
94 "Every :guilabel:`Search & replace` custom function must have a unique name "
95 "and consist of a Python function named replace, that accepts all the "
96 "arguments shown above. For the moment, we won't worry about all the "
97 "different arguments to ``replace()`` function. Just focus on the ``match`` "
98 "argument. It represents a match when running a search and replace. Its full "
99 "documentation in available `here "
100 "<https://docs.python.org/library/re.html#match-objects>`_. ``match.group()``"
101 " simply returns all the matched text and all we do is replace hyphens in "
102 "that text with em-dashes, first replacing double hyphens and then single "
103 "hyphens."
104 msgstr "Každá vlastní funkce :guilabel:`Najít a nahradit` musí mít jedinečný název a skládat se z funkce Pythonu s názvem replace, která přijímá všechny výše uvedené parametry. Pro tuto chvíli se nebudeme starat o všechny různé parametry funkce ``replace()``. Soustředíme se pouze na parametr ``match``. Zastupuje shodu při spuštění hledat a nahradit. Jeho úplná dokumentace je dostupná `zde <https://docs.python.org/library/re.html#match-objects>`_. ``match.group()`` jednoduše vrátí všechny odpovídající texty a vše, co uděláme je, že nahradíme pomlčky v tomto textu dlouhými pomlčkami, nejdříve se dvojité pomlčky a potom jednotlivé pomlčky."
105
106 #: ../../../__w/calibre/calibre/manual/function_mode.rst:65
107 msgid "Use this function with the find regular expression::"
108 msgstr "Použijte tuto funkci s hledáním regulárního výrazu::"
109
110 #: ../../../__w/calibre/calibre/manual/function_mode.rst:69
111 msgid ""
112 "And it will replace all hyphens with em-dashes, but only in actual text and "
113 "not inside HTML tag definitions."
114 msgstr "A nahradí to všechny pomlčky dlouhými pomlčkami, ale pouze ve skutečném textu a ne uvnitř definicí značek HTML."
115
116 #: ../../../__w/calibre/calibre/manual/function_mode.rst:74
117 msgid ""
118 "The power of function mode - using a spelling dictionary to fix mis-"
119 "hyphenated words"
120 msgstr "Síla režimu funkcí – používání pravopisného slovníku pro opravu chybně rozdělených slov spojovníkem"
121
122 #: ../../../__w/calibre/calibre/manual/function_mode.rst:76
123 msgid ""
124 "Often, e-books created from scans of printed books contain mis-hyphenated "
125 "words -- words that were split at the end of the line on the printed page. "
126 "We will write a simple function to automatically find and fix such words."
127 msgstr "E-knihy vytvořené naskenováním tištěných knih často obsahují chybně rozdělená slova spojovníkem -- slova, která byla rozdělena na konci řádku na vytištěné stránce. Napíšeme si jednoduchou funkci pro automatické nalezení a opravení takových slov."
128
129 #: ../../../__w/calibre/calibre/manual/function_mode.rst:101
130 msgid "Use this function with the same find expression as before, namely::"
131 msgstr "Použijte tuto funkci se stejným vyhledávacím výrazem jako předtím, a to::"
132
133 #: ../../../__w/calibre/calibre/manual/function_mode.rst:105
134 msgid ""
135 "And it will magically fix all mis-hyphenated words in the text of the book. "
136 "The main trick is to use one of the useful extra arguments to the replace "
137 "function, ``dictionaries``. This refers to the dictionaries the editor "
138 "itself uses to spell check text in the book. What this function does is look"
139 " for words separated by a hyphen, remove the hyphen and check if the "
140 "dictionary recognizes the composite word, if it does, the original words are"
141 " replaced by the hyphen free composite word."
142 msgstr "A jako kouzlem to opraví všechna chybně rozdělená slova v textu knihy. Hlavní trik je použít jeden z užitečných dodatečných parametrů pro funkci nahrazení, ``dictionaries``. Ten odkazuje na slovníky, které samotný editor používá pro kontrolu pravopisu textu v knize. Tato funkce hledá slova oddělená spojovníkem, odebere spojovník a zkontrolujte, zda slovník rozpozná složené slovo. Pokud ano, původní slova jsou nahrazena složeným slovem bez spojovníku."
143
144 #: ../../../__w/calibre/calibre/manual/function_mode.rst:113
145 msgid ""
146 "Note that one limitation of this technique is it will only work for mono-"
147 "lingual books, because, by default, ``dictionaries.recognized()`` uses the "
148 "main language of the book."
149 msgstr "Pamatujte, že jediné omezení této techniky je, že to bude fungovat pouze pro jednojazyčné knihy, protože ``dictionaries.recognized()`` ve výchozím nastavení používá hlavní jazyk knihy."
150
151 #: ../../../__w/calibre/calibre/manual/function_mode.rst:119
152 msgid "Auto numbering sections"
153 msgstr "Automatické číslování oddílů"
154
155 #: ../../../__w/calibre/calibre/manual/function_mode.rst:121
156 msgid ""
157 "Now we will see something a little different. Suppose your HTML file has "
158 "many sections, each with a heading in an :code:`<h2>` tag that looks like "
159 ":code:`<h2>Some text</h2>`. You can create a custom function that will "
160 "automatically number these headings with consecutive section numbers, so "
161 "that they look like :code:`<h2>1. Some text</h2>`."
162 msgstr "Nyní uvidíme něco trochu jiného. Předpokládejme, že váš soubor HTML má mnoho oddílů, každý s nadpisem ve značce :code:`<h2>`, která vypadají takto :code:`<h2>Nějaký text</h2>`. Můžete si vytvořit vlastní funkci, která automaticky očísluje tyto nadpisy za sebou následujícími čísly oddílů, takže budou vypadat takto :code:`<h2>1. Nějaký text</h2>`."
163
164 #: ../../../__w/calibre/calibre/manual/function_mode.rst:137
165 msgid "Use it with the find expression::"
166 msgstr "Použijte vyhledávací výraz::"
167
168 #: ../../../__w/calibre/calibre/manual/function_mode.rst:141
169 msgid ""
170 "Place the cursor at the top of the file and click :guilabel:`Replace all`."
171 msgstr "Umístěte kurzor na začátek souboru a klikněte na :guilabel:`Nahradit vše`."
172
173 #: ../../../__w/calibre/calibre/manual/function_mode.rst:143
174 msgid ""
175 "This function uses another of the useful extra arguments to ``replace()``: "
176 "the ``number`` argument. When doing a :guilabel:`Replace All` number is "
177 "automatically incremented for every successive match."
178 msgstr "Tato funkce využívá další z užitečných dodatečných parametrů pro ``replace()``: parametr ``number``. Při provádění :guilabel:`Nahradit vše` je číslo automaticky zvýšeno pro každou následující shodu."
179
180 #: ../../../__w/calibre/calibre/manual/function_mode.rst:147
181 msgid ""
182 "Another new feature is the use of ``replace.file_order`` -- setting that to "
183 "``'spine'`` means that if this search is run on multiple HTML files, the "
184 "files are processed in the order in which they appear in the book. See "
185 ":ref:`file_order_replace_all` for details."
186 msgstr "Další novinkou je použití ``replace.file_order`` -- nastavení, které pro ``'páteř'`` znamená, že pokud je toto hledání spuštěno na více souborech HTML, soubory jsou zpracovávány v pořadí, v jakém se objevují v knize. Pro podrobnosti viz :ref:`file_order_replace_all`."
187
188 #: ../../../__w/calibre/calibre/manual/function_mode.rst:154
189 msgid "Auto create a Table of Contents"
190 msgstr "Automatické vytvoření obsahu"
191
192 #: ../../../__w/calibre/calibre/manual/function_mode.rst:156
193 msgid ""
194 "Finally, let's try something a little more ambitious. Suppose your book has "
195 "headings in ``h1`` and ``h2`` tags that look like ``<h1 id=\"someid\">Some "
196 "Text</h1>``. We will auto-generate an HTML Table of Contents based on these "
197 "headings. Create the custom function below:"
198 msgstr "Nakonec zkusme něco trochu ambicióznějšího. Předpokládejme, že vaše kniha má nadpisy ve značkách ``h1`` a ``h2``, které vypadají jako ``<h1 id=\"someid\">Some Text</h1>``. Na základě těchto nadpisů automaticky vygenerujeme HTML obsah. Vytvořte následující vlastní funkci:"
199
200 #: ../../../__w/calibre/calibre/manual/function_mode.rst:199
201 msgid "And use it with the find expression::"
202 msgstr "A použijte ji s vyhledávacím výrazem::"
203
204 #: ../../../__w/calibre/calibre/manual/function_mode.rst:203
205 msgid ""
206 "Run the search on :guilabel:`All text files` and at the end of the search, a"
207 " window will popup with \"Debug output from your function\" which will have "
208 "the HTML Table of Contents, ready to be pasted into :file:`toc.html`."
209 msgstr "Spusťte hledání nad :guilabel:`Všechny textové soubory` a na konci vyhledávání se otevře okno s \"Výstup ladění z vaší funkce\", které bude mít HTML obsah připravený k vložení do :file:`toc.html`."
210
211 #: ../../../__w/calibre/calibre/manual/function_mode.rst:207
212 msgid ""
213 "The function above is heavily commented, so it should be easy to follow. The"
214 " key new feature is the use of another useful extra argument to the "
215 "``replace()`` function, the ``data`` object. The ``data`` object is a Python"
216 " *dictionary* that persists between all successive invocations of "
217 "``replace()`` during a single :guilabel:`Replace All` operation."
218 msgstr "Výše uvedená funkce je silně okomentovaná, takže by měla být snadno pochopitelná. Klíčovou novinkou je použití dalšího užitečného dodatečného parametru funkce ``replace()``, objektu ``data``. Objekt ``data`` je *slovník* Pythonu, který přetrvává mezi všemi po sobě následujícími voláními funkce ``replace()`` během jedné operace :guilabel:`Nahradit vše``."
219
220 #: ../../../__w/calibre/calibre/manual/function_mode.rst:213
221 msgid ""
222 "Another new feature is the use of ``call_after_last_match`` -- setting that "
223 "to ``True`` on the ``replace()`` function means that the editor will call "
224 "``replace()`` one extra time after all matches have been found. For this "
225 "extra call, the match object will be ``None``."
226 msgstr "Další novinkou je použití ``call_after_last_match`` -- nastavení, které pro ``True`` nad funkcí ``replace()`` znamená, že editor vyvolá ``replace()`` ještě jednou poté, co byly nalezeny všechny shody. Pro toto dodatečné vyvolání bude shoda objektu ``None``."
227
228 #: ../../../__w/calibre/calibre/manual/function_mode.rst:218
229 msgid ""
230 "This was just a demonstration to show you the power of function mode, if you"
231 " really needed to generate a Table of Contents from headings in your book, "
232 "you would be better off using the dedicated Table of Contents tool in "
233 ":guilabel:`Tools->Table of Contents`."
234 msgstr "To byla jen ukázka, která vám předvedla sílu režimu funkcí, pokud opravdu potřebujete vygenerovat obsah z nadpisů ve vaší knize, měli byste raději použít vyhrazený nástroj pro obsah v :guilabel:`Nástroje->Obsah`."
235
236 #: ../../../__w/calibre/calibre/manual/function_mode.rst:224
237 msgid "The API for the function mode"
238 msgstr "API pro režim funkcí"
239
240 #: ../../../__w/calibre/calibre/manual/function_mode.rst:226
241 msgid ""
242 "All function mode functions must be Python functions named replace, with the"
243 " following signature::"
244 msgstr "Všechny funkce režimu funkcí musí být funkce Pythonu pojmenované replace s následujícím podpisem::"
245
246 #: ../../../__w/calibre/calibre/manual/function_mode.rst:232
247 msgid ""
248 "When a find/replace is run, for every match that is found, the ``replace()``"
249 " function will be called, it must return the replacement string for that "
250 "match. If no replacements are to be done, it should return ``match.group()``"
251 " which is the original string. The various arguments to the ``replace()`` "
252 "function are documented below."
253 msgstr "Když je spuštěno najít a nahradit, pro každou shodu, která je nalezena, bude vyvolána funkce ``replace()``, která musí vrátit nahrazovací řetězec pro tuto shodu. Pokud není třeba provést žádná nahrazení, mělo by se vrátit ``match.group()``, což je původní řetězec. Jednotlivé parametry pro funkci ``replace()`` jsou zdokumentovány níže."
254
255 #: ../../../__w/calibre/calibre/manual/function_mode.rst:239
256 msgid "The ``match`` argument"
257 msgstr "Parametr ``match``"
258
259 #: ../../../__w/calibre/calibre/manual/function_mode.rst:241
260 msgid ""
261 "The ``match`` argument represents the currently found match. It is a `Python"
262 " Match object <https://docs.python.org/library/re.html#match-objects>`_. Its"
263 " most useful method is ``group()`` which can be used to get the matched text"
264 " corresponding to individual capture groups in the search regular "
265 "expression."
266 msgstr "Parametr ``match`` představuje aktuálně nalezenou shodu. Je to `objekt Match Pythonu <https://docs.python.org/library/re.html#match-objects>`_. Jeho nejužitečnější metoda je ``group()``, která může být použita k získání textu odpovídajícího jednotlivým skupin zachycování v hledání regulárního výrazu."
267
268 #: ../../../__w/calibre/calibre/manual/function_mode.rst:248
269 msgid "The ``number`` argument"
270 msgstr "Parametr ``number``"
271
272 #: ../../../__w/calibre/calibre/manual/function_mode.rst:250
273 msgid ""
274 "The ``number`` argument is the number of the current match. When you run "
275 ":guilabel:`Replace All`, every successive match will cause ``replace()`` to "
276 "be called with an increasing number. The first match has number 1."
277 msgstr "Parametr ``number`` je číslo aktuální shody. Když spustíte :guilabel:`Nahradit vše`, každá po sobě jdoucí shoda způsobí, že bude vyvoláno``replace()`` se zvyšujícím se číslem. První shoda má číslo 1."
278
279 #: ../../../__w/calibre/calibre/manual/function_mode.rst:255
280 msgid "The ``file_name`` argument"
281 msgstr "Parametr ``file_name``"
282
283 #: ../../../__w/calibre/calibre/manual/function_mode.rst:257
284 msgid ""
285 "This is the filename of the file in which the current match was found. When "
286 "searching inside marked text, the ``file_name`` is empty. The ``file_name`` "
287 "is in canonical form, a path relative to the root of the book, using ``/`` "
288 "as the path separator."
289 msgstr "Toto je název souboru, ve kterém byla nalezena aktuální shoda. Při hledání uvnitř označeného textu je ``file_name`` prázdný. ``file_name`` je v kanonické podobě, cesta relativní ke kořenu knihy, s ``/`` jako oddělovačem cesty."
290
291 #: ../../../__w/calibre/calibre/manual/function_mode.rst:263
292 msgid "The ``metadata`` argument"
293 msgstr "Parametr ``metadata``"
294
295 #: ../../../__w/calibre/calibre/manual/function_mode.rst:265
296 msgid ""
297 "This represents the metadata of the current book, such as title, authors, "
298 "language, etc. It is an object of class "
299 ":class:`calibre.ebooks.metadata.book.base.Metadata`. Useful attributes "
300 "include, ``title``, ``authors`` (a list of authors) and ``language`` (the "
301 "language code)."
302 msgstr "Toto představuje metadata aktuální knihy, jako je název, autoři, jazyk atd. Je to objekt třídy: :class:`calibre.ebooks.metadata.book.base.Metadata`. Užitečné atributy zahrnují ``title``, ``authors`` (seznam autorů) a ``language`` (kód jazyka)."
303
304 #: ../../../__w/calibre/calibre/manual/function_mode.rst:271
305 msgid "The ``dictionaries`` argument"
306 msgstr "Parametr ``dictionaries``"
307
308 #: ../../../__w/calibre/calibre/manual/function_mode.rst:273
309 msgid ""
310 "This represents the collection of dictionaries used for spell checking the "
311 "current book. Its most useful method is ``dictionaries.recognized(word)`` "
312 "which will return ``True`` if the passed in word is recognized by the "
313 "dictionary for the current book's language."
314 msgstr "Toto představuje sbírku slovníků používaných ke kontrole pravopisu aktuální knihy. Jeho nejužitečnější metoda je ``dictionaries.recognized(word)``, která vrátí ``True``, pokud je předané slovo rozpoznáno slovníkem pro aktuální jazyk knihy."
315
316 #: ../../../__w/calibre/calibre/manual/function_mode.rst:279
317 msgid "The ``data`` argument"
318 msgstr "Parametr ``data``"
319
320 #: ../../../__w/calibre/calibre/manual/function_mode.rst:281
321 msgid ""
322 "This a simple Python ``dictionary``. When you run :guilabel:`Replace all`, "
323 "every successive match will cause ``replace()`` to be called with the same "
324 "``dictionary`` as data. You can thus use it to store arbitrary data between "
325 "invocations of ``replace()`` during a :guilabel:`Replace all` operation."
326 msgstr "Jedná se o jednoduchý ``slovník`` Pythonu. Když spustíte :guilabel:`Nahradit vše``, každá následná shoda způsobí, že se zavolá ``replace()`` se stejným ``slovníkem`` jako data. Můžete jej tedy použít k uložení libovolných dat mezi voláními ``replace()`` během operace :guilabel:`Nahradit vše``."
327
328 #: ../../../__w/calibre/calibre/manual/function_mode.rst:288
329 msgid "The ``functions`` argument"
330 msgstr "Parametr ``functions``"
331
332 #: ../../../__w/calibre/calibre/manual/function_mode.rst:290
333 msgid ""
334 "The ``functions`` argument gives you access to all other user defined "
335 "functions. This is useful for code re-use. You can define utility functions "
336 "in one place and re-use them in all your other functions. For example, "
337 "suppose you create a function named ``My Function`` like this:"
338 msgstr "Argument ``functions`` vám poskytuje přístup ke všem ostatním uživatelem definovaným funkcím. To je užitečné pro opětovné použití kódu. Pomocné funkce můžete definovat na jednom místě a znovu je používat ve všech svých ostatních funkcích. Předpokládejme například, že vytvoříte funkci s názvem ``My Function`` takto:"
339
340 #: ../../../__w/calibre/calibre/manual/function_mode.rst:303
341 msgid ""
342 "Then, in another function, you can access the ``utility()`` function like "
343 "this:"
344 msgstr "Potom v jiné funkci můžete přistupovat k funkci ``utility()`` takto:"
345
346 #: ../../../__w/calibre/calibre/manual/function_mode.rst:311
347 msgid ""
348 "You can also use the functions object to store persistent data, that can be "
349 "re-used by other functions. For example, you could have one function that "
350 "when run with :guilabel:`Replace All` collects some data and another "
351 "function that uses it when it is run afterwards. Consider the following two "
352 "functions:"
353 msgstr "Můžete také použít objekt funkce pro ukládání trvalých dat, která mohou být znovu použita jinými funkcemi. Například byste mohli mít jednu funkci, která při spuštění s :guilabel:`Nahradit vše` shromažďuje některá data, a další funkci, která je používá, když je spuštěna později. Vezměme si následující dvě funkce:"
354
355 #: ../../../__w/calibre/calibre/manual/function_mode.rst:331
356 msgid "Debugging your functions"
357 msgstr "Ladění vašich funkcí"
358
359 #: ../../../__w/calibre/calibre/manual/function_mode.rst:333
360 msgid ""
361 "You can debug the functions you create by using the standard ``print()`` "
362 "function from Python. The output of print will be displayed in a popup "
363 "window after the Find/replace has completed. You saw an example of using "
364 "``print()`` to output an entire table of contents above."
365 msgstr "Funkce, které vytvoříte, můžete ladit pomocí standardní funkce ``print()`` z Pythonu. Výstup tisku se zobrazí v automaticky otevíraném okně po dokončení Najít a nahradit. Příklad použití ``print()`` pro výstup celého obsahu jste viděli výše."
366
367 #: ../../../__w/calibre/calibre/manual/function_mode.rst:341
368 msgid "Choose file order when running on multiple HTML files"
369 msgstr "Volba pořadí souborů při spuštění na více souborech HTML"
370
371 #: ../../../__w/calibre/calibre/manual/function_mode.rst:343
372 msgid ""
373 "When you run a :guilabel:`Replace all` on multiple HTML files, the order in "
374 "which the files are processed depends on what files you have open for "
375 "editing. You can force the search to process files in the order in which "
376 "they appear by setting the ``file_order`` attribute on your function, like "
377 "this:"
378 msgstr "Když spustíte :guilabel:`Nahradit vše` ve více souborech HTML, pořadí zpracování souborů závisí na tom, které soubory máte otevřené pro úpravy. Nastavením atributu ``file_order`` ve své funkci můžete vynutit, aby hledání zpracovávalo soubory v pořadí, v jakém se objevují v knize, například takto:"
379
380 #: ../../../__w/calibre/calibre/manual/function_mode.rst:355
381 msgid ""
382 "``file_order`` accepts two values, ``spine`` and ``spine-reverse`` which "
383 "cause the search to process multiple files in the order they appear in the "
384 "book, either forwards or backwards, respectively."
385 msgstr "``file_order`` přijímá dvě hodnoty, ``spine`` a ``spine-reverse``, které způsobují, že hledání zpracuje více souborů v pořadí, v jakém jsou uvedeny v knize, a to buď vpřed nebo zpět v uvedeném pořadí."
386
387 #: ../../../__w/calibre/calibre/manual/function_mode.rst:360
388 msgid ""
389 "Having your function called an extra time after the last match is found"
390 msgstr "Vyvolání vaší funkce ještě jednou poté, co je nalezena poslední shoda"
391
392 #: ../../../__w/calibre/calibre/manual/function_mode.rst:362
393 msgid ""
394 "Sometimes, as in the auto generate table of contents example above, it is "
395 "useful to have your function called an extra time after the last match is "
396 "found. You can do this by setting the ``call_after_last_match`` attribute on"
397 " your function, like this:"
398 msgstr "Někdy, jako ve výše uvedeném příkladu automatického generování obsahu, je užitečné vyvolat vaši funkci ještě jednou poté, co je nalezena poslední shoda. To můžete provést nastavením parametru ``call_after_last_match` ve vaší funkci takto:"
399
400 #: ../../../__w/calibre/calibre/manual/function_mode.rst:376
401 msgid "Appending the output from the function to marked text"
402 msgstr "Připojování výstupu z funkce pro označený text"
403
404 #: ../../../__w/calibre/calibre/manual/function_mode.rst:378
405 msgid ""
406 "When running search and replace on marked text, it is sometimes useful to "
407 "append some text to the end of the marked text. You can do that by setting "
408 "the ``append_final_output_to_marked`` attribute on your function (note that "
409 "you also need to set ``call_after_last_match``), like this:"
410 msgstr "Při spuštění hledání a nahrazení nad označeným textem je někdy užitečné připojit na konec označeného textu další text. Můžete to udělat nastavením atributu ``append_final_output_to_marked`` ve své funkci (všimněte si, že je také potřeba nastavit ``call_after_last_match``), například takto:"
411
412 #: ../../../__w/calibre/calibre/manual/function_mode.rst:393
413 msgid "Suppressing the result dialog when performing searches on marked text"
414 msgstr "Potlačení dialogového okna výsledku při provádění vyhledávání na označeném textu"
415
416 #: ../../../__w/calibre/calibre/manual/function_mode.rst:395
417 msgid ""
418 "You can also suppress the result dialog (which can slow down the repeated "
419 "application of a search/replace on many blocks of text) by setting the "
420 "``suppress_result_dialog`` attribute on your function, like this:"
421 msgstr "Můžete také potlačit dialogové okno výsledku (což může zpomalit opakovanou aplikaci hledání a nahrazení na mnoha blocích textu) nastavením atributu ``suppress_result_dialog`` na vaší funkci takto:"
422
423 #: ../../../__w/calibre/calibre/manual/function_mode.rst:408
424 msgid "More examples"
425 msgstr "Další příklady"
426
427 #: ../../../__w/calibre/calibre/manual/function_mode.rst:410
428 msgid ""
429 "More useful examples, contributed by calibre users, can be found in the "
430 "`calibre E-book editor forum "
431 "<https://www.mobileread.com/forums/showthread.php?t=237181>`_."
432 msgstr "Další užitečné příklady, které vytvořili uživatelé Calibre, můžete nalézt ve `fóru Editoru e-knih Calibre <https://www.mobileread.com/forums/showthread.php?t=237181>`_."