pdfly 0.2.14__tar.gz → 0.3.0__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.
Files changed (60) hide show
  1. pdfly-0.3.0/.github/dependabot.yml +9 -0
  2. pdfly-0.3.0/.github/workflows/github-ci.yaml +98 -0
  3. {pdfly-0.2.14 → pdfly-0.3.0}/.github/workflows/release.yaml +9 -6
  4. {pdfly-0.2.14 → pdfly-0.3.0}/.gitignore +4 -0
  5. pdfly-0.3.0/.gitmodules +3 -0
  6. {pdfly-0.2.14 → pdfly-0.3.0}/.pre-commit-config.yaml +16 -12
  7. pdfly-0.3.0/.readthedocs.yaml +24 -0
  8. pdfly-0.3.0/CHANGELOG.md +40 -0
  9. pdfly-0.3.0/CONTRIBUTORS.md +41 -0
  10. {pdfly-0.2.14 → pdfly-0.3.0}/Makefile +1 -0
  11. {pdfly-0.2.14 → pdfly-0.3.0}/PKG-INFO +5 -1
  12. {pdfly-0.2.14 → pdfly-0.3.0}/README.md +3 -0
  13. pdfly-0.3.0/docs/Makefile +20 -0
  14. pdfly-0.3.0/docs/conf.py +125 -0
  15. pdfly-0.3.0/docs/index.rst +34 -0
  16. pdfly-0.3.0/docs/make.bat +35 -0
  17. pdfly-0.3.0/docs/meta/project-governance.md +131 -0
  18. pdfly-0.3.0/docs/user/installation.md +52 -0
  19. pdfly-0.3.0/docs/user/subcommand-cat.md +92 -0
  20. pdfly-0.3.0/docs/user/subcommand-meta.md +68 -0
  21. pdfly-0.3.0/docs/user/subcommand-x2pdf.md +58 -0
  22. pdfly-0.3.0/pdfly/_version.py +1 -0
  23. {pdfly-0.2.14 → pdfly-0.3.0}/pdfly/cat.py +43 -19
  24. {pdfly-0.2.14 → pdfly-0.3.0}/pdfly/cli.py +38 -6
  25. {pdfly-0.2.14 → pdfly-0.3.0}/pdfly/compress.py +5 -4
  26. {pdfly-0.2.14 → pdfly-0.3.0}/pdfly/pagemeta.py +4 -4
  27. pdfly-0.3.0/pdfly/x2pdf.py +54 -0
  28. {pdfly-0.2.14 → pdfly-0.3.0}/pyproject.toml +18 -1
  29. {pdfly-0.2.14 → pdfly-0.3.0}/requirements/ci.in +1 -0
  30. {pdfly-0.2.14 → pdfly-0.3.0}/requirements/ci.txt +38 -31
  31. pdfly-0.3.0/requirements/dev.in +9 -0
  32. pdfly-0.3.0/requirements/dev.txt +176 -0
  33. pdfly-0.3.0/requirements/docs.in +4 -0
  34. pdfly-0.3.0/requirements/docs.txt +81 -0
  35. pdfly-0.3.0/resources/GeoBase_NHNC1_Data_Model_UML_EN.pdf +0 -0
  36. pdfly-0.3.0/resources/baleines.jpg +0 -0
  37. pdfly-0.3.0/resources/box.pdf +0 -0
  38. pdfly-0.3.0/resources/jpeg.pdf +0 -0
  39. pdfly-0.3.0/resources/pythonknight.png +0 -0
  40. pdfly-0.3.0/tests/__init__.py +1 -0
  41. pdfly-0.3.0/tests/conftest.py +78 -0
  42. pdfly-0.3.0/tests/test_cat.py +234 -0
  43. pdfly-0.3.0/tests/test_cli.py +25 -0
  44. pdfly-0.3.0/tests/test_extract_images.py +25 -0
  45. pdfly-0.3.0/tests/test_x2pdf.py +31 -0
  46. pdfly-0.2.14/.github/workflows/github-ci.yaml +0 -48
  47. pdfly-0.2.14/pdfly/_version.py +0 -1
  48. pdfly-0.2.14/requirements/dev.in +0 -6
  49. pdfly-0.2.14/requirements/dev.txt +0 -136
  50. {pdfly-0.2.14 → pdfly-0.3.0}/.isort.cfg +0 -0
  51. {pdfly-0.2.14 → pdfly-0.3.0}/LICENSE +0 -0
  52. {pdfly-0.2.14 → pdfly-0.3.0}/mypy.ini +0 -0
  53. {pdfly-0.2.14 → pdfly-0.3.0}/pdfly/__init__.py +0 -0
  54. {pdfly-0.2.14 → pdfly-0.3.0}/pdfly/__main__.py +0 -0
  55. {pdfly-0.2.14 → pdfly-0.3.0}/pdfly/_utils.py +0 -0
  56. {pdfly-0.2.14 → pdfly-0.3.0}/pdfly/extract_images.py +0 -0
  57. {pdfly-0.2.14 → pdfly-0.3.0}/pdfly/metadata.py +0 -0
  58. {pdfly-0.2.14 → pdfly-0.3.0}/pdfly/up2.py +0 -0
  59. {pdfly-0.2.14 → pdfly-0.3.0}/setup.cfg +0 -0
  60. {pdfly-0.2.14 → pdfly-0.3.0}/setup.py +0 -0
@@ -0,0 +1,9 @@
1
+ # Set update schedule for GitHub Actions
2
+
3
+ version: 2
4
+ updates:
5
+
6
+ - package-ecosystem: "github-actions"
7
+ directory: "/"
8
+ schedule:
9
+ interval: "daily"
@@ -0,0 +1,98 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
+
4
+ name: CI
5
+
6
+ on:
7
+ push:
8
+ branches: [ main ]
9
+ paths-ignore:
10
+ - '**/*.md'
11
+ - '**/*.rst'
12
+ pull_request:
13
+ branches: [ main ]
14
+ paths-ignore:
15
+ - '**/*.md'
16
+ - '**/*.rst'
17
+ workflow_dispatch:
18
+
19
+ jobs:
20
+ tests:
21
+ name: pytest on ${{ matrix.python-version }}
22
+ runs-on: ubuntu-20.04
23
+ strategy:
24
+ matrix:
25
+ python-version: ["3.8", "3.9", "3.10", "3.11"]
26
+
27
+ steps:
28
+ - name: Checkout Code
29
+ uses: actions/checkout@v4
30
+ with:
31
+ submodules: 'recursive'
32
+ - name: Setup Python ${{ matrix.python-version }}
33
+ uses: actions/setup-python@v5
34
+ with:
35
+ python-version: ${{ matrix.python-version }}
36
+
37
+ - name: Upgrade pip
38
+ run: python -m pip install --upgrade pip
39
+ - name: Install requirements (Python 3)
40
+ run: pip install -r requirements/ci.txt -r requirements/dev.txt
41
+ - name: Install pdfly
42
+ run: pip install .
43
+
44
+ - name: Run tests
45
+ run: pytest -vv
46
+
47
+ codestyle:
48
+ name: Check code style issues
49
+ runs-on: ubuntu-20.04
50
+ steps:
51
+ - name: Checkout Code
52
+ uses: actions/checkout@v4
53
+ with:
54
+ submodules: 'recursive'
55
+ - name: Cache Downloaded Files
56
+ id: cache-downloaded-files
57
+ uses: actions/cache@v3
58
+ with:
59
+ path: '**/tests/pdf_cache/*'
60
+ key: cache-downloaded-files
61
+
62
+ - name: Upgrade pip
63
+ run: python -m pip install --upgrade pip
64
+ - name: Install requirements
65
+ run: pip install -r requirements/ci.txt
66
+ - name: Install pdfly
67
+ run: pip install .
68
+
69
+ - name: Lint with black
70
+ run: black --check --extend-exclude sample-files .
71
+ - name: Lint with mypy
72
+ run: mypy . --ignore-missing-imports --exclude build
73
+ - name: Test with ruff
74
+ run: |
75
+ echo `ruff --version`
76
+ ruff pdfly/
77
+
78
+ package:
79
+ name: Build & verify package
80
+ runs-on: ubuntu-latest
81
+
82
+ steps:
83
+ - uses: actions/checkout@v4
84
+ - uses: actions/setup-python@v5
85
+ with:
86
+ python-version: ${{env.PYTHON_LATEST}}
87
+
88
+ - run: python -m pip install flit check-wheel-contents
89
+ - run: flit build
90
+ - run: ls -l dist
91
+ - run: check-wheel-contents dist/*.whl
92
+
93
+ - name: Test installing package
94
+ run: python -m pip install .
95
+
96
+ - name: Test running installed package
97
+ working-directory: /tmp
98
+ run: python -c "import pdfly;print(pdfly.__version__)"
@@ -17,10 +17,10 @@ jobs:
17
17
  steps:
18
18
  # Ensure it's on PyPI
19
19
  - name: Checkout Repository
20
- uses: actions/checkout@v3
20
+ uses: actions/checkout@v4
21
21
 
22
22
  - name: Set up Python
23
- uses: actions/setup-python@v4
23
+ uses: actions/setup-python@v5
24
24
  with:
25
25
  python-version: 3.x
26
26
 
@@ -41,15 +41,18 @@ jobs:
41
41
  id: prepare_variables
42
42
  run: |
43
43
  git fetch --tags --force
44
+ latest_tag=$(git describe --tags --abbrev=0)
45
+ echo "latest_tag=$(git describe --tags --abbrev=0)" >> "$GITHUB_ENV"
44
46
  echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_ENV"
47
+ EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
45
48
  echo "tag_body<<$EOF" >> "$GITHUB_ENV"
46
- git tag -l "${GITHUB_REF_NAME}" --format='%(contents:body)' >> "$GITHUB_ENV"
49
+ git --no-pager tag -l "${latest_tag}" --format='%(contents:body)' >> "$GITHUB_ENV"
47
50
  echo "$EOF" >> "$GITHUB_ENV"
48
51
  - name: Create GitHub Release 🚀
49
52
  uses: softprops/action-gh-release@v1
50
53
  with:
51
- tag_name: ${{ github.ref }}
52
- name: Version ${{ env.GITHUB_REF_NAME }}, ${{ env.date }}
54
+ tag_name: ${{ env.latest_tag }}
55
+ name: Version ${{ env.latest_tag }}, ${{ env.date }}
53
56
  draft: false
54
57
  prerelease: false
55
- body: Body is ${{ env.tag_body }}
58
+ body: ${{ env.tag_body }}
@@ -130,3 +130,7 @@ dmypy.json
130
130
 
131
131
  *.pdf
132
132
  .envrc
133
+
134
+ # Documentation files copied when building:
135
+ docs/meta/CHANGELOG.md
136
+ docs/meta/CONTRIBUTORS.md
@@ -0,0 +1,3 @@
1
+ [submodule "sample-files"]
2
+ path = sample-files
3
+ url = git@github.com:py-pdf/sample-files.git
@@ -1,7 +1,7 @@
1
1
  # pre-commit run --all-files
2
2
  repos:
3
3
  - repo: https://github.com/pre-commit/pre-commit-hooks
4
- rev: v4.4.0
4
+ rev: v4.5.0
5
5
  hooks:
6
6
  - id: check-ast
7
7
  - id: check-byte-order-marker
@@ -17,32 +17,36 @@ repos:
17
17
  exclude: "docs/make.bat"
18
18
  - id: check-added-large-files
19
19
  args: ['--maxkb=1000']
20
- # - repo: https://github.com/pre-commit/mirrors-mypy
21
- # rev: v0.942
22
- # hooks:
23
- # - id: mypy
24
20
  - repo: https://github.com/psf/black
25
- rev: 23.1.0
21
+ rev: 23.12.0
26
22
  hooks:
27
23
  - id: black
28
24
  args: [--target-version, py36]
29
25
  - repo: https://github.com/asottile/blacken-docs
30
- rev: 1.13.0
26
+ rev: 1.16.0
31
27
  hooks:
32
28
  - id: blacken-docs
33
29
  additional_dependencies: [black==22.1.0]
34
- - repo: https://github.com/charliermarsh/ruff-pre-commit
35
- rev: 'v0.0.254'
30
+ - repo: https://github.com/astral-sh/ruff-pre-commit
31
+ rev: v0.1.8
36
32
  hooks:
37
33
  - id: ruff
38
- args: [--fix]
34
+ args: ['--fix']
35
+ exclude: "tests/"
39
36
  - repo: https://github.com/asottile/pyupgrade
40
- rev: v3.3.1
37
+ rev: v3.15.0
41
38
  hooks:
42
39
  - id: pyupgrade
43
40
  args: [--py36-plus]
44
41
  - repo: https://github.com/pycqa/flake8
45
- rev: 6.0.0
42
+ rev: 6.1.0
46
43
  hooks:
47
44
  - id: flake8
48
45
  args: ["--ignore", "E,W,F"]
46
+
47
+ - repo: https://github.com/pre-commit/mirrors-mypy
48
+ rev: 'v1.7.1'
49
+ hooks:
50
+ - id: mypy
51
+ files: ^pypdf/.*
52
+ args: [--ignore-missing-imports]
@@ -0,0 +1,24 @@
1
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
2
+ version: 2
3
+
4
+
5
+ build:
6
+ os: ubuntu-22.04
7
+ tools:
8
+ python: "3.11"
9
+
10
+ # Build documentation in the docs/ directory with Sphinx
11
+ sphinx:
12
+ configuration: docs/conf.py
13
+
14
+ # If using Sphinx, optionally build your docs in additional formats such as PDF
15
+ formats: all
16
+
17
+ # Optionally declare the Python requirements required to build your docs
18
+ python:
19
+ install:
20
+ - requirements: requirements/docs.txt
21
+ - method: pip
22
+ path: .
23
+ extra_requirements:
24
+ - full
@@ -0,0 +1,40 @@
1
+ # CHANGELOG
2
+
3
+ ## Version 0.3.0, 2023-12-17
4
+
5
+ ### New Features (ENH)
6
+ - Add x2pdf command (#25)
7
+
8
+ ### Bug Fixes (BUG)
9
+ - boxes are floats, not int
10
+ - Add missing fpdf2 dependency (#29)
11
+
12
+ ### Documentation (DOC)
13
+ - cat command
14
+ - More examples for the cat subcommand
15
+ - Add cat subcommand
16
+ - Link to readthedocs
17
+ - Add project governance file
18
+ - Move readthedocs config file to root
19
+ - Add docs (#24)
20
+
21
+ ### Developer Experience (DEV)
22
+ - Checkout sample-files in CI (#30)
23
+ - Let dependabot update Github Actions
24
+ - Add action for automatic releases
25
+
26
+ ### Maintenance (MAINT)
27
+ - Update dependencies (#42)
28
+ - In the cat subcommand, replace the usage of the deprecated PdfMerger by PdfWriter (#34)
29
+ - Update .pre-commit-config.yaml
30
+ - Adjust x2pdf syntax
31
+
32
+ ### Testing (TST)
33
+ - cat with two files (#41)
34
+ - Test cat command with more parameters + validate result (#40)
35
+ - Adding unit tests (#28)
36
+
37
+ ### Other
38
+ - : [{'msg': 'Bump actions/setup-python from 4 to 5 (#39)', 'author': 'dependabot[bot]'}, {'msg': 'test_extract_images_monochrome() is now passing', 'author': 'CimonLucas(LCM)'}, {'msg': 'Bump actions/setup-python from 3 to 4 (#27)', 'author': 'dependabot[bot]'}, {'msg': 'Bump actions/checkout from 3 to 4 (#26)', 'author': 'dependabot[bot]'}, {'msg': 'Ensure input PDF exists for cat subcommand', 'author': 'MartinThoma'}]
39
+
40
+ [Full Changelog](https://github.com/py-pdf/pdfly/compare/0.2.14...0.3.0)
@@ -0,0 +1,41 @@
1
+ # Contributors
2
+
3
+ pdfly is a free software project without any company affiliation. We cannot pay
4
+ contributors, but we do value their contributions 🤗
5
+
6
+ The list might not be complete. You can find more contributors via the git
7
+ history and [GitHubs 'Contributors' feature](https://github.com/py-pdf/pdfly/graphs/contributors).
8
+
9
+ ## Contributors to the pdfly project
10
+
11
+ * [Thoma, Martin](https://github.com/MartinThoma): Creator of pdfly. [LinkedIn](https://www.linkedin.com/in/martin-thoma/) | [StackOverflow](https://stackoverflow.com/users/562769/martin-thoma) | [Blog](https://martin-thoma.com/)
12
+
13
+ ## Adding a new contributor
14
+
15
+ Contributors are:
16
+
17
+ * Anybody who has an commit in main - no matter how big/small or how many. Also if it's via co-authored-by.
18
+ * People who opened helpful issues:
19
+ (1) Bugs: with complete MCVE
20
+ (2) Well-described feature requests
21
+ (3) Potentially some more.
22
+ The maintainers of pdfly have the last call on that one.
23
+ * Community work: This is exceptional. If the maintainers of pdfly see people
24
+ being super helpful in answering issues / discussions or being very active on
25
+ Stackoverflow, we also consider them being contributors to pdfly.
26
+
27
+ Contributors can add themselves or ask via an Github Issue to be added.
28
+
29
+ Please use the following format:
30
+
31
+ ```
32
+ * Last name, First name: 140-characters of text; links to linkedin / github / other profiles and personal pages are ok
33
+
34
+ OR
35
+
36
+ * GitHub Username: 140-characters of text; links to linkedin / github / other profiles and personal pages are ok
37
+ ```
38
+
39
+ and add the entry in the alphabetical order. People who . The 140 characters are everything visible after the `Name:`.
40
+
41
+ Please don't use images.
@@ -2,6 +2,7 @@ maint:
2
2
  pre-commit autoupdate
3
3
  pip-compile -U requirements/ci.in
4
4
  pip-compile -U requirements/dev.in
5
+ pip-compile -U requirements/docs.in
5
6
 
6
7
  upload:
7
8
  make clean
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pdfly
3
- Version: 0.2.14
3
+ Version: 0.3.0
4
4
  Summary: A pure-python CLI application to manipulate PDF files
5
5
  Author-email: Martin Thoma <info@martin-thoma.de>
6
6
  Maintainer-email: Martin Thoma <info@martin-thoma.de>
@@ -23,12 +23,15 @@ Requires-Dist: typer>=0.9.0
23
23
  Requires-Dist: pillow
24
24
  Requires-Dist: pydantic
25
25
  Requires-Dist: rich
26
+ Requires-Dist: fpdf2
26
27
  Project-URL: Source, https://github.com/py-pdf/pdfly
27
28
 
28
29
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
29
30
  [![PyPI version](https://badge.fury.io/py/pdfly.svg)](https://pypi.org/project/pdfly/)
30
31
  [![GitHub last commit](https://img.shields.io/github/last-commit/py-pdf/pdfly)](https://github.com/py-pdf/pdfly)
31
32
  [![Python Support](https://img.shields.io/pypi/pyversions/pdfly.svg)](https://pypi.org/project/pdfly/)
33
+ [![Documentation Status](https://readthedocs.org/projects/pdfly/badge/?version=latest)](https://pdfly.readthedocs.io/en/latest/?badge=latest)
34
+ [![](https://img.shields.io/badge/-documentation-green)](https://pdfly.readthedocs.io/en/latest/)
32
35
 
33
36
  # pdfly
34
37
 
@@ -63,6 +66,7 @@ $ pdfly --help
63
66
  │ extract-text Extract text from a PDF file. │
64
67
  │ meta Show metadata of a PDF file │
65
68
  │ pagemeta Give details about a single page. │
69
+ │ x2pdf Convert one or more files to PDF. Each file is a page. │
66
70
  ╰─────────────────────────────────────────────────────────────────────────────╯
67
71
  ```
68
72
 
@@ -2,6 +2,8 @@
2
2
  [![PyPI version](https://badge.fury.io/py/pdfly.svg)](https://pypi.org/project/pdfly/)
3
3
  [![GitHub last commit](https://img.shields.io/github/last-commit/py-pdf/pdfly)](https://github.com/py-pdf/pdfly)
4
4
  [![Python Support](https://img.shields.io/pypi/pyversions/pdfly.svg)](https://pypi.org/project/pdfly/)
5
+ [![Documentation Status](https://readthedocs.org/projects/pdfly/badge/?version=latest)](https://pdfly.readthedocs.io/en/latest/?badge=latest)
6
+ [![](https://img.shields.io/badge/-documentation-green)](https://pdfly.readthedocs.io/en/latest/)
5
7
 
6
8
  # pdfly
7
9
 
@@ -36,6 +38,7 @@ $ pdfly --help
36
38
  │ extract-text Extract text from a PDF file. │
37
39
  │ meta Show metadata of a PDF file │
38
40
  │ pagemeta Give details about a single page. │
41
+ │ x2pdf Convert one or more files to PDF. Each file is a page. │
39
42
  ╰─────────────────────────────────────────────────────────────────────────────╯
40
43
  ```
41
44
 
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,125 @@
1
+ """
2
+ Configuration file for the Sphinx documentation builder.
3
+
4
+ This file only contains a selection of the most common options.
5
+ For a full list see the documentation:
6
+ https://www.sphinx-doc.org/en/master/usage/configuration.html
7
+ """
8
+ # -- Path setup --------------------------------------------------------------
9
+
10
+ # If extensions (or modules to document with autodoc) are in another directory,
11
+ # add these directories to sys.path here. If the directory is relative to the
12
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
13
+ import os
14
+ import shutil
15
+ import sys
16
+
17
+ import pdfly as py_pkg
18
+
19
+ sys.path.insert(0, os.path.abspath(".")) # noqa
20
+ sys.path.insert(0, os.path.abspath("../")) # noqa
21
+
22
+ shutil.copyfile("../CHANGELOG.md", "meta/CHANGELOG.md")
23
+ shutil.copyfile("../CONTRIBUTORS.md", "meta/CONTRIBUTORS.md")
24
+
25
+ # -- Project information -----------------------------------------------------
26
+
27
+ project = py_pkg.__name__
28
+ copyright = "2023, pdfly contributors"
29
+ author = "pdfly contributors"
30
+
31
+ # The version info for the project you're documenting, acts as replacement for
32
+ # |version| and |release|, also used in various other places throughout the
33
+ # built documents.
34
+ #
35
+ # The short X.Y version.
36
+ version = py_pkg.__version__
37
+ # The full version, including alpha/beta/rc tags.
38
+ release = py_pkg.__version__
39
+
40
+ # -- General configuration ---------------------------------------------------
41
+ # If your documentation needs a minimal Sphinx version, state it here.
42
+ needs_sphinx = "4.0.0"
43
+
44
+ myst_all_links_external = True
45
+ # Add any Sphinx extension module names here, as strings. They can be
46
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
47
+ # ones.
48
+ extensions = [
49
+ "sphinx.ext.autodoc",
50
+ "sphinx.ext.intersphinx",
51
+ "sphinx.ext.autosummary",
52
+ "sphinx.ext.coverage",
53
+ "sphinx.ext.mathjax",
54
+ "sphinx.ext.viewcode",
55
+ "sphinx.ext.napoleon",
56
+ # External
57
+ "myst_parser",
58
+ ]
59
+
60
+ intersphinx_mapping = {
61
+ "python": ("https://docs.python.org/3.8", None),
62
+ }
63
+
64
+ nitpick_ignore_regex = [
65
+ # For reasons unclear at this stage the io module prefixes everything with _io
66
+ # and this confuses sphinx
67
+ (r"py:class", r"_io.(FileIO|BytesIO|Buffered(Reader|Writer))"),
68
+ ]
69
+
70
+ autodoc_default_options = {
71
+ "member-order": "bysource",
72
+ "members": True,
73
+ "show-inheritance": True,
74
+ "undoc-members": True,
75
+ }
76
+ autodoc_inherit_docstrings = False
77
+ autodoc_typehints_format = "short"
78
+ python_use_unqualified_type_names = True
79
+
80
+ # Add any paths that contain templates here, relative to this directory.
81
+ templates_path = ["_templates"]
82
+
83
+ # List of patterns, relative to source directory, that match files and
84
+ # directories to ignore when looking for source files.
85
+ # This pattern also affects html_static_path and html_extra_path.
86
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
87
+
88
+
89
+ # -- Options for HTML output -------------------------------------------------
90
+
91
+ # The theme to use for HTML and HTML Help pages. See the documentation for
92
+ # a list of builtin themes.
93
+ #
94
+ html_theme = "sphinx_rtd_theme"
95
+ # Theme options are theme-specific and customize the look and feel of a theme
96
+ # further. For a list of options available for each theme, see the
97
+ # documentation.
98
+ html_theme_options = {
99
+ "canonical_url": "",
100
+ "analytics_id": "",
101
+ "logo_only": True,
102
+ "display_version": True,
103
+ "prev_next_buttons_location": "bottom",
104
+ "style_external_links": False,
105
+ # Toc options
106
+ "collapse_navigation": True,
107
+ "sticky_navigation": True,
108
+ "navigation_depth": 4,
109
+ "includehidden": True,
110
+ "titles_only": False,
111
+ }
112
+
113
+ # Add any paths that contain custom static files (such as style sheets) here,
114
+ # relative to this directory. They are copied after the builtin static files,
115
+ # so a file named "default.css" will overwrite the builtin "default.css".
116
+ html_static_path = ["_static"]
117
+
118
+ # -- Options for Napoleon -----------------------------------------------------
119
+
120
+ napoleon_google_docstring = True
121
+ napoleon_numpy_docstring = False # Explicitly prefer Google style docstring
122
+ napoleon_use_param = True # for type hint support
123
+ napoleon_use_rtype = (
124
+ False # False so the return type is inline with the description.
125
+ )
@@ -0,0 +1,34 @@
1
+ .. pdfly documentation main file, created by
2
+ sphinx-quickstart on Sat Sep 9 11:39:00 2023.
3
+ You can adapt this file completely to your liking, but it should at least
4
+ contain the root `toctree` directive.
5
+
6
+ Welcome to pdfly
7
+ ================
8
+
9
+ pdfly is a command line tool to get informaiton about PDF documents and to manipulate them.
10
+
11
+ .. toctree::
12
+ :caption: User Guide
13
+ :maxdepth: 1
14
+
15
+ user/installation
16
+ user/subcommand-meta
17
+ user/subcommand-cat
18
+ user/subcommand-x2pdf
19
+
20
+
21
+ .. toctree::
22
+ :caption: About pypdf
23
+ :maxdepth: 1
24
+
25
+ meta/CHANGELOG
26
+ meta/CONTRIBUTORS
27
+ meta/project-governance
28
+
29
+ Indices and tables
30
+ ==================
31
+
32
+ * :ref:`genindex`
33
+ * :ref:`modindex`
34
+ * :ref:`search`
@@ -0,0 +1,35 @@
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=sphinx-build
9
+ )
10
+ set SOURCEDIR=.
11
+ set BUILDDIR=_build
12
+
13
+ %SPHINXBUILD% >NUL 2>NUL
14
+ if errorlevel 9009 (
15
+ echo.
16
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17
+ echo.installed, then set the SPHINXBUILD environment variable to point
18
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
19
+ echo.may add the Sphinx directory to PATH.
20
+ echo.
21
+ echo.If you don't have Sphinx installed, grab it from
22
+ echo.https://www.sphinx-doc.org/
23
+ exit /b 1
24
+ )
25
+
26
+ if "%1" == "" goto help
27
+
28
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29
+ goto end
30
+
31
+ :help
32
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33
+
34
+ :end
35
+ popd