Oldstyle PDF ToC
Install
pip install oldstyle-pdf-toc
Usage
1. Create the toc.txt
The file must be named toc.txt.
# Lines that begin with # are ignored, empty lines are also ignored.
# Set page number to Uppercase roman number (I, II, III, ...)
\pageLabel{1}{1}{UppercaseRomanNumerals}
# Copy origin ToC of the book
Schrifttum 11
# Change page number from to decimal arabic number, reset it to 1 but physical page numer is now 13
\pageLabel{13}{1}{DecimalArabicNumerals}
# Copy other parts of the ToC of the Book
I. Abbildungsverfahren 1
1. Aufgabe der Darstellenden Geometrie 1
2. Zentralprojektion 4
3. Parallelprojektion 6
II. Parallelprojektion und perspektive Affinität 8
4. Invarianten der Parallelprojektion 8
5. Der Satz von DESARGUES 11
6. Perspektive Affinität 12
7. Analytische Darstellung einer ebenen perspektiven Affinität 14
8. Das Rechtwinkelpaar einer ebenen perspektiven Affinität 17
9. Die Ellipse als affines Bild des Kreises 19
10. Affine Eigenschaften der Ellipse 21
11. Ellipsenkonstruktionen 23
# .... others entries
Namen- und Sachverzeichnis 339
The complete example toc.txt can be found in this project repository.
An instruction to write a toc file is here.
2. Call the python script
# for old schema like above
oldstyle-pdf-toc > pdftk.toc.txt
# for schema 1.2.3.
modern-pdf-toc > pdftk.toc.txt
3. Call the pdftk
pdftk Strubecker.pdf update_info_utf8 pdftk.toc.txt output Strubecker-toc.pdf
That's it!
Development
This Project uses uv to manage dependencies and tasks during development and deployment
uv python install # Install a copy of python to this directory
uv venv # Create a virtual python environment
source .venv/bin/activate # Activate venv
uv pip install -e . # Install this project as a python package into the virtual environment
uv build
Deploy in PyPi
Principal:
rm -rf dist/* ; uv build
twine upload dist/*
Metadata
Release files for oldstyle-pdf-toc 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| oldstyle_pdf_toc-0.4.0.tar.gz | 3.8 kB | Without provenance | Details for oldstyle_pdf_toc-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| oldstyle_pdf_toc-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for oldstyle_pdf_toc-0.4.0-py3-none-any.whl |
Total release size: 8.7 kB
Release files / oldstyle_pdf_toc-0.4.0.tar.gz
| Download URL | oldstyle_pdf_toc-0.4.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a02373f05cb7f2c750567ab43f9f08774417354434c5e21c162c3e215b5aedfe
|
|
BLAKE2b-256 checksum How to use checksums |
8da8e279a5cd6a12bc9a5b3c605b174853b1d6ef16b83ac495718199d0e48b57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / oldstyle_pdf_toc-0.4.0-py3-none-any.whl
| Download URL | oldstyle_pdf_toc-0.4.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4f76a2a564032c48dfd020399222a3706ddb9d7ef61e058bba18efef6ed84e93
|
|
BLAKE2b-256 checksum How to use checksums |
14f1c0c1a68c0a5a823c0bd1da6e49fe6aa98ad344eb1e94f088feee017aea51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for oldstyle-pdf-toc 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.