Find and replace
replace_textFind and replace words in a whole presentation you may edit, in one step: the texts of text, shape and button blocks (in every language by default, or only "langs"), the slide names, and with "in_code": true the code of code blocks. Formatting stays (the words are replaced inside it; a phrase split by formatting, like half of it bold, is not found). The number of an automatic slide reference ({{slide:N}}) is not text and is not found: it changes by itself when slides move; to point a reference to another slide, write the block's html with a new {{slide:N}}. "regex": true makes "find" a Python regular expression ("replace" may use \1). "dry_run": true only counts. Returns how many were replaced on which slides.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| find | Yes | What to find (at most 500 characters). | |
| slug | Yes | The presentation's slug (its address: /movie/<slug>/). | |
| langs | No | Only these languages of the texts (default: all). | |
| regex | No | "find" is a regular expression (default: plain text). | |
| dry_run | No | Only count, change nothing. | |
| in_code | No | The code of code blocks too (default: false). | |
| replace | Yes | What to put instead (may be empty). | |
| in_names | No | The names of the slides too (default: true). | |
| slide_ids | No | Only these slides (ids). | |
| to_number | No | Only the slides up to this number (inclusive). | |
| match_case | No | Case matters (default: true). | |
| from_number | No | Only the slides from this number on (1-based). | |
| base_version | No | Optional: the "version" of the presentation as you read it; refused when it changed meanwhile. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slides | Yes | ||
| dry_run | No | ||
| version | No | Stamp of the content as it is now: give it back as "base_version" to change it only if nobody else did meanwhile. | |
| replaced | Yes | How many places were (or, with dry_run, would be) changed. | |
| layout_warnings | No | How the changed slides will probably look: texts too long for their blocks, blocks outside the slide, texts over each other (estimated -- look at them). |