pdfmd-cli 3.11.1__tar.gz → 3.11.2__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.11.1/pdfmd_cli.egg-info → pdfmd_cli-3.11.2}/PKG-INFO +13 -1
- {pdfmd_cli-3.11.1 → pdfmd_cli-3.11.2}/README.md +12 -0
- {pdfmd_cli-3.11.1 → pdfmd_cli-3.11.2}/pdfmd.py +17 -4
- {pdfmd_cli-3.11.1 → pdfmd_cli-3.11.2/pdfmd_cli.egg-info}/PKG-INFO +13 -1
- {pdfmd_cli-3.11.1 → pdfmd_cli-3.11.2}/LICENSE +0 -0
- {pdfmd_cli-3.11.1 → pdfmd_cli-3.11.2}/pdfmd_cli.egg-info/SOURCES.txt +0 -0
- {pdfmd_cli-3.11.1 → pdfmd_cli-3.11.2}/pdfmd_cli.egg-info/dependency_links.txt +0 -0
- {pdfmd_cli-3.11.1 → pdfmd_cli-3.11.2}/pdfmd_cli.egg-info/entry_points.txt +0 -0
- {pdfmd_cli-3.11.1 → pdfmd_cli-3.11.2}/pdfmd_cli.egg-info/requires.txt +0 -0
- {pdfmd_cli-3.11.1 → pdfmd_cli-3.11.2}/pdfmd_cli.egg-info/top_level.txt +0 -0
- {pdfmd_cli-3.11.1 → pdfmd_cli-3.11.2}/pyproject.toml +0 -0
- {pdfmd_cli-3.11.1 → pdfmd_cli-3.11.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pdfmd-cli
|
|
3
|
-
Version: 3.11.
|
|
3
|
+
Version: 3.11.2
|
|
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
|
|
@@ -20,6 +20,8 @@ Dynamic: license-file
|
|
|
20
20
|
|
|
21
21
|
# pdfmd
|
|
22
22
|
|
|
23
|
+
[](https://github.com/aliperdehan/pdfmd/actions/workflows/test.yml) [](https://pypi.org/project/pdfmd-cli/)
|
|
24
|
+
|
|
23
25
|
**One command from Markdown to a good-looking PDF.** `pdfmd` wraps
|
|
24
26
|
[Pandoc](https://pandoc.org) and fills in everything you would otherwise
|
|
25
27
|
have to remember: sensible fonts and margins, the right Markdown dialect,
|
|
@@ -92,6 +94,16 @@ brew install --cask mactex-no-gui # optional: full LaTeX (large)
|
|
|
92
94
|
sudo apt install pipx pandoc texlive-xetex # Debian/Ubuntu
|
|
93
95
|
```
|
|
94
96
|
|
|
97
|
+
```powershell
|
|
98
|
+
py -m pip install --user pipx; py -m pipx ensurepath # Windows
|
|
99
|
+
winget install --id JohnMacFarlane.Pandoc; winget install --id Typst.Typst
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Every push is tested on Windows, macOS and Linux (Pandoc + Typst: single
|
|
103
|
+
files, CSV tables, a book, HTML output); see the
|
|
104
|
+
[Test workflow](https://github.com/aliperdehan/pdfmd/actions/workflows/test.yml).
|
|
105
|
+
LaTeX engines aren't part of that automated test on Windows yet.
|
|
106
|
+
|
|
95
107
|
Optional extras: [Quarto](https://quarto.org) for `.qmd` files,
|
|
96
108
|
`pandoc-crossref` for `@fig:`/`@tbl:` references, and LibreOffice for
|
|
97
109
|
Office files.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# pdfmd
|
|
2
2
|
|
|
3
|
+
[](https://github.com/aliperdehan/pdfmd/actions/workflows/test.yml) [](https://pypi.org/project/pdfmd-cli/)
|
|
4
|
+
|
|
3
5
|
**One command from Markdown to a good-looking PDF.** `pdfmd` wraps
|
|
4
6
|
[Pandoc](https://pandoc.org) and fills in everything you would otherwise
|
|
5
7
|
have to remember: sensible fonts and margins, the right Markdown dialect,
|
|
@@ -72,6 +74,16 @@ brew install --cask mactex-no-gui # optional: full LaTeX (large)
|
|
|
72
74
|
sudo apt install pipx pandoc texlive-xetex # Debian/Ubuntu
|
|
73
75
|
```
|
|
74
76
|
|
|
77
|
+
```powershell
|
|
78
|
+
py -m pip install --user pipx; py -m pipx ensurepath # Windows
|
|
79
|
+
winget install --id JohnMacFarlane.Pandoc; winget install --id Typst.Typst
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Every push is tested on Windows, macOS and Linux (Pandoc + Typst: single
|
|
83
|
+
files, CSV tables, a book, HTML output); see the
|
|
84
|
+
[Test workflow](https://github.com/aliperdehan/pdfmd/actions/workflows/test.yml).
|
|
85
|
+
LaTeX engines aren't part of that automated test on Windows yet.
|
|
86
|
+
|
|
75
87
|
Optional extras: [Quarto](https://quarto.org) for `.qmd` files,
|
|
76
88
|
`pandoc-crossref` for `@fig:`/`@tbl:` references, and LibreOffice for
|
|
77
89
|
Office files.
|
|
@@ -449,7 +449,7 @@ Automatic source backups (--backup, v3.8.0; formats v3.9.0):
|
|
|
449
449
|
# unreliable 1.x history from those gaps, versioning restarts at 2.0.0 here
|
|
450
450
|
# (2026-09-16, the author's call) as an honest baseline: this is where real
|
|
451
451
|
# changelog tracking begins, not a claim about how many changes preceded it.
|
|
452
|
-
PDFMD_VERSION = "3.11.
|
|
452
|
+
PDFMD_VERSION = "3.11.2"
|
|
453
453
|
import argparse
|
|
454
454
|
import filecmp
|
|
455
455
|
from fnmatch import fnmatchcase
|
|
@@ -1301,7 +1301,8 @@ def resolve_soffice() -> str | None:
|
|
|
1301
1301
|
fine for the user every day at a terminal prompt. Checked, in order:
|
|
1302
1302
|
`soffice` on PATH, `libreoffice` on PATH (the usual Linux package
|
|
1303
1303
|
name -- often a symlink to the same binary), then the standard macOS
|
|
1304
|
-
app-bundle path directly
|
|
1304
|
+
app-bundle path directly, or on Windows the default install folders
|
|
1305
|
+
under %ProgramFiles% / %ProgramFiles(x86)%.
|
|
1305
1306
|
"""
|
|
1306
1307
|
for name in ("soffice", "libreoffice"):
|
|
1307
1308
|
found = which(name)
|
|
@@ -1311,6 +1312,12 @@ def resolve_soffice() -> str | None:
|
|
|
1311
1312
|
mac_path = Path("/Applications/LibreOffice.app/Contents/MacOS/soffice")
|
|
1312
1313
|
if mac_path.exists():
|
|
1313
1314
|
return str(mac_path)
|
|
1315
|
+
if sys.platform == "win32":
|
|
1316
|
+
# The Windows installer doesn't add LibreOffice to PATH.
|
|
1317
|
+
for variable in ("ProgramFiles", "ProgramFiles(x86)"):
|
|
1318
|
+
base = os.environ.get(variable)
|
|
1319
|
+
if base and (Path(base) / "LibreOffice" / "program" / "soffice.exe").exists():
|
|
1320
|
+
return str(Path(base) / "LibreOffice" / "program" / "soffice.exe")
|
|
1314
1321
|
return None
|
|
1315
1322
|
|
|
1316
1323
|
|
|
@@ -3446,6 +3453,12 @@ def default_output_path(path: Path, target_format: str) -> Path:
|
|
|
3446
3453
|
|
|
3447
3454
|
def open_file(path: Path) -> None:
|
|
3448
3455
|
"""Open a finished file with the platform's default viewer, for --open."""
|
|
3456
|
+
if sys.platform == "win32":
|
|
3457
|
+
try:
|
|
3458
|
+
os.startfile(path) # Windows' own "open with default app"
|
|
3459
|
+
except OSError as error:
|
|
3460
|
+
print(f"WARN --open: could not open {path}: {error}", file=sys.stderr)
|
|
3461
|
+
return
|
|
3449
3462
|
opener = "open" if sys.platform == "darwin" else "xdg-open" if sys.platform.startswith("linux") else None
|
|
3450
3463
|
if opener is None or not which(opener):
|
|
3451
3464
|
print(f"WARN --open: no '{opener or 'file opener'}' found for this platform; "
|
|
@@ -3697,7 +3710,7 @@ def run_tex_engine(engine: str, tex_path: Path, output_dir: Path,
|
|
|
3697
3710
|
# points bibtex back at the source directory to find the .bib
|
|
3698
3711
|
# file, since it has no --input-directory flag of its own.
|
|
3699
3712
|
bib_env = os.environ.copy()
|
|
3700
|
-
bib_env["BIBINPUTS"] = f"{tex_path.parent}
|
|
3713
|
+
bib_env["BIBINPUTS"] = f"{tex_path.parent}{os.pathsep}{bib_env.get('BIBINPUTS', '')}"
|
|
3701
3714
|
bib_cmd = (["biber", f"--input-directory={tex_path.parent}", tex_path.stem] if bib_tool == "biber"
|
|
3702
3715
|
else ["bibtex", tex_path.stem])
|
|
3703
3716
|
bib_result = run(bib_cmd, output_dir, env=bib_env)
|
|
@@ -4618,7 +4631,7 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
4618
4631
|
"with --engine when a document's rendered output doesn't match what the "
|
|
4619
4632
|
"Markdown predicts and the short reason alone isn't enough to tell why")
|
|
4620
4633
|
parser.add_argument("--open", action="store_true",
|
|
4621
|
-
help="open the finished file (via macOS 'open'
|
|
4634
|
+
help="open the finished file (via macOS 'open', Linux 'xdg-open' or Windows' default app) once "
|
|
4622
4635
|
"conversion succeeds. Applies to single-file and report/book mode, "
|
|
4623
4636
|
"each of which produce exactly one output; ignored in batch mode "
|
|
4624
4637
|
"(-b), which would otherwise pop open every file in the directory")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pdfmd-cli
|
|
3
|
-
Version: 3.11.
|
|
3
|
+
Version: 3.11.2
|
|
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
|
|
@@ -20,6 +20,8 @@ Dynamic: license-file
|
|
|
20
20
|
|
|
21
21
|
# pdfmd
|
|
22
22
|
|
|
23
|
+
[](https://github.com/aliperdehan/pdfmd/actions/workflows/test.yml) [](https://pypi.org/project/pdfmd-cli/)
|
|
24
|
+
|
|
23
25
|
**One command from Markdown to a good-looking PDF.** `pdfmd` wraps
|
|
24
26
|
[Pandoc](https://pandoc.org) and fills in everything you would otherwise
|
|
25
27
|
have to remember: sensible fonts and margins, the right Markdown dialect,
|
|
@@ -92,6 +94,16 @@ brew install --cask mactex-no-gui # optional: full LaTeX (large)
|
|
|
92
94
|
sudo apt install pipx pandoc texlive-xetex # Debian/Ubuntu
|
|
93
95
|
```
|
|
94
96
|
|
|
97
|
+
```powershell
|
|
98
|
+
py -m pip install --user pipx; py -m pipx ensurepath # Windows
|
|
99
|
+
winget install --id JohnMacFarlane.Pandoc; winget install --id Typst.Typst
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Every push is tested on Windows, macOS and Linux (Pandoc + Typst: single
|
|
103
|
+
files, CSV tables, a book, HTML output); see the
|
|
104
|
+
[Test workflow](https://github.com/aliperdehan/pdfmd/actions/workflows/test.yml).
|
|
105
|
+
LaTeX engines aren't part of that automated test on Windows yet.
|
|
106
|
+
|
|
95
107
|
Optional extras: [Quarto](https://quarto.org) for `.qmd` files,
|
|
96
108
|
`pandoc-crossref` for `@fig:`/`@tbl:` references, and LibreOffice for
|
|
97
109
|
Office files.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|