pdfmd-cli 3.18.0__tar.gz → 3.19.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pdfmd_cli-3.18.0/pdfmd_cli.egg-info → pdfmd_cli-3.19.8}/PKG-INFO +70 -1
- {pdfmd_cli-3.18.0 → pdfmd_cli-3.19.8}/README.md +69 -0
- {pdfmd_cli-3.18.0 → pdfmd_cli-3.19.8}/pdfmd.py +1777 -58
- {pdfmd_cli-3.18.0 → pdfmd_cli-3.19.8/pdfmd_cli.egg-info}/PKG-INFO +70 -1
- {pdfmd_cli-3.18.0 → pdfmd_cli-3.19.8}/LICENSE +0 -0
- {pdfmd_cli-3.18.0 → pdfmd_cli-3.19.8}/pdfmd_cli.egg-info/SOURCES.txt +0 -0
- {pdfmd_cli-3.18.0 → pdfmd_cli-3.19.8}/pdfmd_cli.egg-info/dependency_links.txt +0 -0
- {pdfmd_cli-3.18.0 → pdfmd_cli-3.19.8}/pdfmd_cli.egg-info/entry_points.txt +0 -0
- {pdfmd_cli-3.18.0 → pdfmd_cli-3.19.8}/pdfmd_cli.egg-info/requires.txt +0 -0
- {pdfmd_cli-3.18.0 → pdfmd_cli-3.19.8}/pdfmd_cli.egg-info/top_level.txt +0 -0
- {pdfmd_cli-3.18.0 → pdfmd_cli-3.19.8}/pyproject.toml +0 -0
- {pdfmd_cli-3.18.0 → pdfmd_cli-3.19.8}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pdfmd-cli
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.19.8
|
|
4
4
|
Summary: One command from Markdown to a good-looking PDF: a Pandoc wrapper with smart defaults, project-file discovery and a multi-engine fallback chain
|
|
5
5
|
Author: Ali Perdekhan
|
|
6
6
|
License-Expression: MIT
|
|
@@ -172,6 +172,75 @@ pdfmd lecture --to typst -o lecture.typ
|
|
|
172
172
|
pdfmd lecture -o lecture.tex # a complete, compilable .tex, not a fragment
|
|
173
173
|
```
|
|
174
174
|
|
|
175
|
+
### Stopping part-way
|
|
176
|
+
|
|
177
|
+
`--stop-at` ends the build after a stage; everything before it runs as normal:
|
|
178
|
+
|
|
179
|
+
```sh
|
|
180
|
+
pdfmd report --stop-at markdown # report.assembled.md: the parts joined into one file
|
|
181
|
+
pdfmd report --assemble-only # the same, shorter
|
|
182
|
+
pdfmd report --stop-at tex # the standalone .tex a LaTeX engine would get (= --to latex)
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
The assembled file holds just the document text (and is marked
|
|
186
|
+
`pdfmd-assembled: true`), so pdfmd never joins its parts a second time.
|
|
187
|
+
|
|
188
|
+
By default it holds just the text. `--embed-metadata` also folds in what pdfmd
|
|
189
|
+
finds beside the document (metadata, preamble, Lua filters, and the
|
|
190
|
+
bibliography and CSL files the metadata names), so the file no longer needs
|
|
191
|
+
them beside it. What the text points at otherwise (images, files a preamble
|
|
192
|
+
`\input`s) is not embedded: keep it where the document finds it, relative to
|
|
193
|
+
the assembled file.
|
|
194
|
+
|
|
195
|
+
```sh
|
|
196
|
+
pdfmd report --assemble-only --embed-metadata # metadata.yaml, preamble.tex, Lua filters, .bib/.csl
|
|
197
|
+
pdfmd report --assemble-only --embed-metadata metadata preamble # only those
|
|
198
|
+
pdfmd report --assemble-only --embed-metadata --lua-mode ref # name the filter instead of copying it
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
An embedded Lua filter sits in a `{=pdfmd}` block at the end of the file. A
|
|
202
|
+
Lua filter can run any command, so one only runs if this machine's pdfmd
|
|
203
|
+
embedded it (otherwise it is skipped with a warning, unless you pass
|
|
204
|
+
`--trust-embedded`).
|
|
205
|
+
|
|
206
|
+
`--lua-mode apply` runs the filters at assembly time instead, so the text
|
|
207
|
+
already has their effect (approximate: Pandoc re-writes the text, and a filter
|
|
208
|
+
that looks at `FORMAT` is embedded instead). `--unpack` goes the other way:
|
|
209
|
+
|
|
210
|
+
```sh
|
|
211
|
+
pdfmd report.assembled.md --unpack # filters, preamble and metadata back into report.assembled.unpacked/
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
`pdfmd` finds `report.assembled.unpacked/` beside `report.assembled.md` by
|
|
215
|
+
itself (its metadata, preambles and Lua filters), and `--unpack --slim` strips
|
|
216
|
+
the unpacked parts out of the assembled file, leaving the lean document plus
|
|
217
|
+
that folder.
|
|
218
|
+
|
|
219
|
+
A document can name its own files and set what to embed, in `pdfmd-options`:
|
|
220
|
+
|
|
221
|
+
```yaml
|
|
222
|
+
pdfmd-options:
|
|
223
|
+
yaml: [base.yaml] # metadata files (like -y); also `metadata:`, or grouped:
|
|
224
|
+
metadata:
|
|
225
|
+
preamble: my-preamble.tex
|
|
226
|
+
lua-filter: my.lua
|
|
227
|
+
embed: {lua: ref} # what --assemble-only embeds without the flag
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Plain HTML output is a fragment. For a finished page, or one file with
|
|
231
|
+
everything (images, CSS) inlined, ask for it, on the command line or in the
|
|
232
|
+
document:
|
|
233
|
+
|
|
234
|
+
```sh
|
|
235
|
+
pdfmd lecture -o lecture.html --self-contained
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
```yaml
|
|
239
|
+
pdfmd-options:
|
|
240
|
+
default-output: html # build to HTML when no format is given
|
|
241
|
+
html: {self-contained: true, css: style.css}
|
|
242
|
+
```
|
|
243
|
+
|
|
175
244
|
### Slides
|
|
176
245
|
|
|
177
246
|
```sh
|
|
@@ -152,6 +152,75 @@ pdfmd lecture --to typst -o lecture.typ
|
|
|
152
152
|
pdfmd lecture -o lecture.tex # a complete, compilable .tex, not a fragment
|
|
153
153
|
```
|
|
154
154
|
|
|
155
|
+
### Stopping part-way
|
|
156
|
+
|
|
157
|
+
`--stop-at` ends the build after a stage; everything before it runs as normal:
|
|
158
|
+
|
|
159
|
+
```sh
|
|
160
|
+
pdfmd report --stop-at markdown # report.assembled.md: the parts joined into one file
|
|
161
|
+
pdfmd report --assemble-only # the same, shorter
|
|
162
|
+
pdfmd report --stop-at tex # the standalone .tex a LaTeX engine would get (= --to latex)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The assembled file holds just the document text (and is marked
|
|
166
|
+
`pdfmd-assembled: true`), so pdfmd never joins its parts a second time.
|
|
167
|
+
|
|
168
|
+
By default it holds just the text. `--embed-metadata` also folds in what pdfmd
|
|
169
|
+
finds beside the document (metadata, preamble, Lua filters, and the
|
|
170
|
+
bibliography and CSL files the metadata names), so the file no longer needs
|
|
171
|
+
them beside it. What the text points at otherwise (images, files a preamble
|
|
172
|
+
`\input`s) is not embedded: keep it where the document finds it, relative to
|
|
173
|
+
the assembled file.
|
|
174
|
+
|
|
175
|
+
```sh
|
|
176
|
+
pdfmd report --assemble-only --embed-metadata # metadata.yaml, preamble.tex, Lua filters, .bib/.csl
|
|
177
|
+
pdfmd report --assemble-only --embed-metadata metadata preamble # only those
|
|
178
|
+
pdfmd report --assemble-only --embed-metadata --lua-mode ref # name the filter instead of copying it
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
An embedded Lua filter sits in a `{=pdfmd}` block at the end of the file. A
|
|
182
|
+
Lua filter can run any command, so one only runs if this machine's pdfmd
|
|
183
|
+
embedded it (otherwise it is skipped with a warning, unless you pass
|
|
184
|
+
`--trust-embedded`).
|
|
185
|
+
|
|
186
|
+
`--lua-mode apply` runs the filters at assembly time instead, so the text
|
|
187
|
+
already has their effect (approximate: Pandoc re-writes the text, and a filter
|
|
188
|
+
that looks at `FORMAT` is embedded instead). `--unpack` goes the other way:
|
|
189
|
+
|
|
190
|
+
```sh
|
|
191
|
+
pdfmd report.assembled.md --unpack # filters, preamble and metadata back into report.assembled.unpacked/
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
`pdfmd` finds `report.assembled.unpacked/` beside `report.assembled.md` by
|
|
195
|
+
itself (its metadata, preambles and Lua filters), and `--unpack --slim` strips
|
|
196
|
+
the unpacked parts out of the assembled file, leaving the lean document plus
|
|
197
|
+
that folder.
|
|
198
|
+
|
|
199
|
+
A document can name its own files and set what to embed, in `pdfmd-options`:
|
|
200
|
+
|
|
201
|
+
```yaml
|
|
202
|
+
pdfmd-options:
|
|
203
|
+
yaml: [base.yaml] # metadata files (like -y); also `metadata:`, or grouped:
|
|
204
|
+
metadata:
|
|
205
|
+
preamble: my-preamble.tex
|
|
206
|
+
lua-filter: my.lua
|
|
207
|
+
embed: {lua: ref} # what --assemble-only embeds without the flag
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Plain HTML output is a fragment. For a finished page, or one file with
|
|
211
|
+
everything (images, CSS) inlined, ask for it, on the command line or in the
|
|
212
|
+
document:
|
|
213
|
+
|
|
214
|
+
```sh
|
|
215
|
+
pdfmd lecture -o lecture.html --self-contained
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
```yaml
|
|
219
|
+
pdfmd-options:
|
|
220
|
+
default-output: html # build to HTML when no format is given
|
|
221
|
+
html: {self-contained: true, css: style.css}
|
|
222
|
+
```
|
|
223
|
+
|
|
155
224
|
### Slides
|
|
156
225
|
|
|
157
226
|
```sh
|