Debian Codegraph @

translations/manual/mr/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 # sabretou <[email protected]>, 2024-2025
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: calibre\n"
10 "Report-Msgid-Bugs-To: \n"
11 "POT-Creation-Date: 2025-02-20 13:44+0000\n"
12 "PO-Revision-Date: 2014-11-21 02:54+0000\n"
13 "Last-Translator: sabretou <[email protected]>, 2024-2025\n"
14 "Language-Team: Marathi (http://app.transifex.com/calibre/calibre/language/mr/)\n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18 "Language: mr\n"
19 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20
21 #: ../../__w/calibre/calibre/manual/function_mode.rst:2
22 msgid "Function mode for Search & replace in the Editor"
23 msgstr "संपादकात शोध आणि फेरबदल करण्यासाठी कार्य मोड"
24
25 #: ../../__w/calibre/calibre/manual/function_mode.rst:4
26 msgid ""
27 "The :guilabel:`Search & replace` tool in the editor support a *function "
28 "mode*. In this mode, you can combine regular expressions (see :doc:`regexp`)"
29 " with arbitrarily powerful Python functions to do all sorts of advanced text"
30 " processing."
31 msgstr ""
32
33 #: ../../__w/calibre/calibre/manual/function_mode.rst:9
34 msgid ""
35 "In the standard *regexp* mode for search and replace, you specify both a "
36 "regular expression to search for as well as a template that is used to "
37 "replace all found matches. In function mode, instead of using a fixed "
38 "template, you specify an arbitrary function, in the `Python programming "
39 "language <https://docs.python.org>`_. This allows you to do lots of things "
40 "that are not possible with simple templates."
41 msgstr ""
42
43 #: ../../__w/calibre/calibre/manual/function_mode.rst:16
44 msgid ""
45 "Techniques for using function mode and the syntax will be described by means"
46 " of examples, showing you how to create functions to perform progressively "
47 "more complex tasks."
48 msgstr ""
49
50 #: ../../__w/calibre/calibre/manual/function_mode.rst:21
51 msgid "The Function mode"
52 msgstr "कार्य मोड"
53
54 #: ../../__w/calibre/calibre/manual/function_mode.rst:26
55 msgid "Automatically fixing the case of headings in the document"
56 msgstr ""
57
58 #: ../../__w/calibre/calibre/manual/function_mode.rst:28
59 msgid ""
60 "Here, we will leverage one of the builtin functions in the editor to "
61 "automatically change the case of all text inside heading tags to title "
62 "case::"
63 msgstr ""
64
65 #: ../../__w/calibre/calibre/manual/function_mode.rst:33
66 msgid ""
67 "For the function, simply choose the :guilabel:`Title-case text (ignore "
68 "tags)` builtin function. The will change titles that look like: ``<h1>some "
69 "titLE</h1>`` to ``<h1>Some Title</h1>``. It will work even if there are "
70 "other HTML tags inside the heading tags."
71 msgstr ""
72
73 #: ../../__w/calibre/calibre/manual/function_mode.rst:40
74 msgid "Your first custom function - smartening hyphens"
75 msgstr ""
76
77 #: ../../__w/calibre/calibre/manual/function_mode.rst:42
78 msgid ""
79 "The real power of function mode comes from being able to create your own "
80 "functions to process text in arbitrary ways. The Smarten Punctuation tool in"
81 " the editor leaves individual hyphens alone, so you can use the this "
82 "function to replace them with em-dashes."
83 msgstr ""
84
85 #: ../../__w/calibre/calibre/manual/function_mode.rst:47
86 msgid ""
87 "To create a new function, simply click the :guilabel:`Create/edit` button to"
88 " create a new function and copy the Python code from below."
89 msgstr ""
90
91 #: ../../__w/calibre/calibre/manual/function_mode.rst:55
92 msgid ""
93 "Every :guilabel:`Search & replace` custom function must have a unique name "
94 "and consist of a Python function named replace, that accepts all the "
95 "arguments shown above. For the moment, we won't worry about all the "
96 "different arguments to ``replace()`` function. Just focus on the ``match`` "
97 "argument. It represents a match when running a search and replace. Its full "
98 "documentation in available `here "
99 "<https://docs.python.org/library/re.html#match-objects>`_. ``match.group()``"
100 " simply returns all the matched text and all we do is replace hyphens in "
101 "that text with em-dashes, first replacing double hyphens and then single "
102 "hyphens."
103 msgstr ""
104
105 #: ../../__w/calibre/calibre/manual/function_mode.rst:65
106 msgid "Use this function with the find regular expression::"
107 msgstr "रेग्युलर एक्सप्रेशनचा शोध घेण्यासाठी हे कार्य वापरा::"
108
109 #: ../../__w/calibre/calibre/manual/function_mode.rst:69
110 msgid ""
111 "And it will replace all hyphens with em-dashes, but only in actual text and "
112 "not inside HTML tag definitions."
113 msgstr ""
114
115 #: ../../__w/calibre/calibre/manual/function_mode.rst:74
116 msgid ""
117 "The power of function mode - using a spelling dictionary to fix mis-"
118 "hyphenated words"
119 msgstr ""
120
121 #: ../../__w/calibre/calibre/manual/function_mode.rst:76
122 msgid ""
123 "Often, e-books created from scans of printed books contain mis-hyphenated "
124 "words -- words that were split at the end of the line on the printed page. "
125 "We will write a simple function to automatically find and fix such words."
126 msgstr ""
127
128 #: ../../__w/calibre/calibre/manual/function_mode.rst:101
129 msgid "Use this function with the same find expression as before, namely::"
130 msgstr ""
131
132 #: ../../__w/calibre/calibre/manual/function_mode.rst:105
133 msgid ""
134 "And it will magically fix all mis-hyphenated words in the text of the book. "
135 "The main trick is to use one of the useful extra arguments to the replace "
136 "function, ``dictionaries``. This refers to the dictionaries the editor "
137 "itself uses to spell check text in the book. What this function does is look"
138 " for words separated by a hyphen, remove the hyphen and check if the "
139 "dictionary recognizes the composite word, if it does, the original words are"
140 " replaced by the hyphen free composite word."
141 msgstr ""
142
143 #: ../../__w/calibre/calibre/manual/function_mode.rst:113
144 msgid ""
145 "Note that one limitation of this technique is it will only work for mono-"
146 "lingual books, because, by default, ``dictionaries.recognized()`` uses the "
147 "main language of the book."
148 msgstr ""
149
150 #: ../../__w/calibre/calibre/manual/function_mode.rst:119
151 msgid "Auto numbering sections"
152 msgstr ""
153
154 #: ../../__w/calibre/calibre/manual/function_mode.rst:121
155 msgid ""
156 "Now we will see something a little different. Suppose your HTML file has "
157 "many sections, each with a heading in an :code:`<h2>` tag that looks like "
158 ":code:`<h2>Some text</h2>`. You can create a custom function that will "
159 "automatically number these headings with consecutive section numbers, so "
160 "that they look like :code:`<h2>1. Some text</h2>`."
161 msgstr ""
162
163 #: ../../__w/calibre/calibre/manual/function_mode.rst:137
164 msgid "Use it with the find expression::"
165 msgstr ""
166
167 #: ../../__w/calibre/calibre/manual/function_mode.rst:141
168 msgid ""
169 "Place the cursor at the top of the file and click :guilabel:`Replace all`."
170 msgstr ""
171
172 #: ../../__w/calibre/calibre/manual/function_mode.rst:143
173 msgid ""
174 "This function uses another of the useful extra arguments to ``replace()``: "
175 "the ``number`` argument. When doing a :guilabel:`Replace All` number is "
176 "automatically incremented for every successive match."
177 msgstr ""
178
179 #: ../../__w/calibre/calibre/manual/function_mode.rst:147
180 msgid ""
181 "Another new feature is the use of ``replace.file_order`` -- setting that to "
182 "``'spine'`` means that if this search is run on multiple HTML files, the "
183 "files are processed in the order in which they appear in the book. See "
184 ":ref:`file_order_replace_all` for details."
185 msgstr ""
186
187 #: ../../__w/calibre/calibre/manual/function_mode.rst:154
188 msgid "Auto create a Table of Contents"
189 msgstr "आपोआप अनुक्रमणिका बनवा"
190
191 #: ../../__w/calibre/calibre/manual/function_mode.rst:156
192 msgid ""
193 "Finally, lets try something a little more ambitious. Suppose your book has "
194 "headings in ``h1`` and ``h2`` tags that look like ``<h1 id=\"someid\">Some "
195 "Text</h1>``. We will auto-generate an HTML Table of Contents based on these "
196 "headings. Create the custom function below:"
197 msgstr ""
198
199 #: ../../__w/calibre/calibre/manual/function_mode.rst:199
200 msgid "And use it with the find expression::"
201 msgstr ""
202
203 #: ../../__w/calibre/calibre/manual/function_mode.rst:203
204 msgid ""
205 "Run the search on :guilabel:`All text files` and at the end of the search, a"
206 " window will popup with \"Debug output from your function\" which will have "
207 "the HTML Table of Contents, ready to be pasted into :file:`toc.html`."
208 msgstr ""
209
210 #: ../../__w/calibre/calibre/manual/function_mode.rst:207
211 msgid ""
212 "The function above is heavily commented, so it should be easy to follow. The"
213 " key new feature is the use of another useful extra argument to the "
214 "``replace()`` function, the ``data`` object. The ``data`` object is a Python"
215 " *dictionary* that persists between all successive invocations of "
216 "``replace()`` during a single :guilabel:`Replace All` operation."
217 msgstr ""
218
219 #: ../../__w/calibre/calibre/manual/function_mode.rst:213
220 msgid ""
221 "Another new feature is the use of ``call_after_last_match`` -- setting that "
222 "to ``True`` on the ``replace()`` function means that the editor will call "
223 "``replace()`` one extra time after all matches have been found. For this "
224 "extra call, the match object will be ``None``."
225 msgstr ""
226
227 #: ../../__w/calibre/calibre/manual/function_mode.rst:218
228 msgid ""
229 "This was just a demonstration to show you the power of function mode, if you"
230 " really needed to generate a Table of Contents from headings in your book, "
231 "you would be better off using the dedicated Table of Contents tool in "
232 ":guilabel:`Tools->Table of Contents`."
233 msgstr ""
234
235 #: ../../__w/calibre/calibre/manual/function_mode.rst:224
236 msgid "The API for the function mode"
237 msgstr "कार्य मोडसाठीचा API"
238
239 #: ../../__w/calibre/calibre/manual/function_mode.rst:226
240 msgid ""
241 "All function mode functions must be Python functions named replace, with the"
242 " following signature::"
243 msgstr ""
244
245 #: ../../__w/calibre/calibre/manual/function_mode.rst:232
246 msgid ""
247 "When a find/replace is run, for every match that is found, the ``replace()``"
248 " function will be called, it must return the replacement string for that "
249 "match. If no replacements are to be done, it should return ``match.group()``"
250 " which is the original string. The various arguments to the ``replace()`` "
251 "function are documented below."
252 msgstr ""
253
254 #: ../../__w/calibre/calibre/manual/function_mode.rst:239
255 msgid "The ``match`` argument"
256 msgstr "``match`` आर्ग्युमेंट"
257
258 #: ../../__w/calibre/calibre/manual/function_mode.rst:241
259 msgid ""
260 "The ``match`` argument represents the currently found match. It is a `Python"
261 " Match object <https://docs.python.org/library/re.html#match-objects>`_. Its"
262 " most useful method is ``group()`` which can be used to get the matched text"
263 " corresponding to individual capture groups in the search regular "
264 "expression."
265 msgstr ""
266
267 #: ../../__w/calibre/calibre/manual/function_mode.rst:248
268 msgid "The ``number`` argument"
269 msgstr "``number`` आर्ग्युमेंट"
270
271 #: ../../__w/calibre/calibre/manual/function_mode.rst:250
272 msgid ""
273 "The ``number`` argument is the number of the current match. When you run "
274 ":guilabel:`Replace All`, every successive match will cause ``replace()`` to "
275 "be called with an increasing number. The first match has number 1."
276 msgstr ""
277
278 #: ../../__w/calibre/calibre/manual/function_mode.rst:255
279 msgid "The ``file_name`` argument"
280 msgstr "``file_name`` आर्ग्युमेंट"
281
282 #: ../../__w/calibre/calibre/manual/function_mode.rst:257
283 msgid ""
284 "This is the filename of the file in which the current match was found. When "
285 "searching inside marked text, the ``file_name`` is empty. The ``file_name`` "
286 "is in canonical form, a path relative to the root of the book, using ``/`` "
287 "as the path separator."
288 msgstr ""
289
290 #: ../../__w/calibre/calibre/manual/function_mode.rst:263
291 msgid "The ``metadata`` argument"
292 msgstr "``metadata`` आर्ग्युमेंट"
293
294 #: ../../__w/calibre/calibre/manual/function_mode.rst:265
295 msgid ""
296 "This represents the metadata of the current book, such as title, authors, "
297 "language, etc. It is an object of class "
298 ":class:`calibre.ebooks.metadata.book.base.Metadata`. Useful attributes "
299 "include, ``title``, ``authors`` (a list of authors) and ``language`` (the "
300 "language code)."
301 msgstr ""
302
303 #: ../../__w/calibre/calibre/manual/function_mode.rst:271
304 msgid "The ``dictionaries`` argument"
305 msgstr "``dictionaries`` आर्ग्युमेंट"
306
307 #: ../../__w/calibre/calibre/manual/function_mode.rst:273
308 msgid ""
309 "This represents the collection of dictionaries used for spell checking the "
310 "current book. Its most useful method is ``dictionaries.recognized(word)`` "
311 "which will return ``True`` if the passed in word is recognized by the "
312 "dictionary for the current book's language."
313 msgstr ""
314
315 #: ../../__w/calibre/calibre/manual/function_mode.rst:279
316 msgid "The ``data`` argument"
317 msgstr "``data`` आर्ग्युमेंट"
318
319 #: ../../__w/calibre/calibre/manual/function_mode.rst:281
320 msgid ""
321 "This a simple Python ``dictionary``. When you run :guilabel:`Replace all`, "
322 "every successive match will cause ``replace()`` to be called with the same "
323 "``dictionary`` as data. You can thus use it to store arbitrary data between "
324 "invocations of ``replace()`` during a :guilabel:`Replace all` operation."
325 msgstr ""
326
327 #: ../../__w/calibre/calibre/manual/function_mode.rst:288
328 msgid "The ``functions`` argument"
329 msgstr "``functions`` आर्ग्युमेंट"
330
331 #: ../../__w/calibre/calibre/manual/function_mode.rst:290
332 msgid ""
333 "The ``functions`` argument gives you access to all other user defined "
334 "functions. This is useful for code re-use. You can define utility functions "
335 "in one place and re-use them in all your other functions. For example, "
336 "suppose you create a function name ``My Function`` like this:"
337 msgstr ""
338
339 #: ../../__w/calibre/calibre/manual/function_mode.rst:303
340 msgid ""
341 "Then, in another function, you can access the ``utility()`` function like "
342 "this:"
343 msgstr ""
344
345 #: ../../__w/calibre/calibre/manual/function_mode.rst:311
346 msgid ""
347 "You can also use the functions object to store persistent data, that can be "
348 "re-used by other functions. For example, you could have one function that "
349 "when run with :guilabel:`Replace All` collects some data and another "
350 "function that uses it when it is run afterwards. Consider the following two "
351 "functions:"
352 msgstr ""
353
354 #: ../../__w/calibre/calibre/manual/function_mode.rst:331
355 msgid "Debugging your functions"
356 msgstr "आपली कार्ये डीबग करणे"
357
358 #: ../../__w/calibre/calibre/manual/function_mode.rst:333
359 msgid ""
360 "You can debug the functions you create by using the standard ``print()`` "
361 "function from Python. The output of print will be displayed in a popup "
362 "window after the Find/replace has completed. You saw an example of using "
363 "``print()`` to output an entire table of contents above."
364 msgstr ""
365
366 #: ../../__w/calibre/calibre/manual/function_mode.rst:341
367 msgid "Choose file order when running on multiple HTML files"
368 msgstr ""
369
370 #: ../../__w/calibre/calibre/manual/function_mode.rst:343
371 msgid ""
372 "When you run a :guilabel:`Replace all` on multiple HTML files, the order in "
373 "which the files are processes depends on what files you have open for "
374 "editing. You can force the search to process files in the order in which the"
375 " appear by setting the ``file_order`` attribute on your function, like this:"
376 msgstr ""
377
378 #: ../../__w/calibre/calibre/manual/function_mode.rst:355
379 msgid ""
380 "``file_order`` accepts two values, ``spine`` and ``spine-reverse`` which "
381 "cause the search to process multiple files in the order they appear in the "
382 "book, either forwards or backwards, respectively."
383 msgstr ""
384
385 #: ../../__w/calibre/calibre/manual/function_mode.rst:360
386 msgid ""
387 "Having your function called an extra time after the last match is found"
388 msgstr ""
389
390 #: ../../__w/calibre/calibre/manual/function_mode.rst:362
391 msgid ""
392 "Sometimes, as in the auto generate table of contents example above, it is "
393 "useful to have your function called an extra time after the last match is "
394 "found. You can do this by setting the ``call_after_last_match`` attribute on"
395 " your function, like this:"
396 msgstr ""
397
398 #: ../../__w/calibre/calibre/manual/function_mode.rst:376
399 msgid "Appending the output from the function to marked text"
400 msgstr ""
401
402 #: ../../__w/calibre/calibre/manual/function_mode.rst:378
403 msgid ""
404 "When running search and replace on marked text, it is sometimes useful to "
405 "append so text to the end of the marked text. You can do that by setting the"
406 " ``append_final_output_to_marked`` attribute on your function (note that you"
407 " also need to set ``call_after_last_match``), like this:"
408 msgstr ""
409
410 #: ../../__w/calibre/calibre/manual/function_mode.rst:393
411 msgid "Suppressing the result dialog when performing searches on marked text"
412 msgstr ""
413
414 #: ../../__w/calibre/calibre/manual/function_mode.rst:395
415 msgid ""
416 "You can also suppress the result dialog (which can slow down the repeated "
417 "application of a search/replace on many blocks of text) by setting the "
418 "``suppress_result_dialog`` attribute on your function, like this:"
419 msgstr ""
420
421 #: ../../__w/calibre/calibre/manual/function_mode.rst:408
422 msgid "More examples"
423 msgstr "अधिक उदाहरणे"
424
425 #: ../../__w/calibre/calibre/manual/function_mode.rst:410
426 msgid ""
427 "More useful examples, contributed by calibre users, can be found in the "
428 "`calibre E-book editor forum "
429 "<https://www.mobileread.com/forums/showthread.php?t=237181>`_."
430 msgstr ""