pdflinkcheck 1.1.73__py3-none-any.whl → 1.2.29__py3-none-any.whl

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 (186) hide show
  1. pdflinkcheck/__init__.py +88 -21
  2. pdflinkcheck/__main__.py +6 -0
  3. pdflinkcheck/analysis_pdfium.py +131 -0
  4. pdflinkcheck/{analyze_pymupdf.py → analysis_pymupdf.py} +109 -145
  5. pdflinkcheck/{analyze_pypdf.py → analysis_pypdf.py} +67 -37
  6. pdflinkcheck/cli.py +111 -116
  7. pdflinkcheck/data/I Have Questions.md +51 -0
  8. pdflinkcheck/data/LICENSE +20 -654
  9. pdflinkcheck/data/README.md +65 -67
  10. pdflinkcheck/data/icons/BoxArt-1080x1080.png +0 -0
  11. pdflinkcheck/data/icons/Logo-150x150.png +0 -0
  12. pdflinkcheck/data/icons/Logo-300x300.png +0 -0
  13. pdflinkcheck/data/icons/Logo-71x71.png +0 -0
  14. pdflinkcheck/data/icons/PosterArt-720x1080.png +0 -0
  15. pdflinkcheck/data/icons/SmallLogo-44x44.png +0 -0
  16. pdflinkcheck/data/icons/SplashScreen-620x300.png +0 -0
  17. pdflinkcheck/data/icons/StoreLogo-50x50.png +0 -0
  18. pdflinkcheck/data/icons/WideLogo-310x150.png +0 -0
  19. pdflinkcheck/data/icons/red_pdf_512px.ico +0 -0
  20. pdflinkcheck/data/pyproject.toml +25 -37
  21. pdflinkcheck/data/themes/forest/forest-dark/border-accent-hover.png +0 -0
  22. pdflinkcheck/data/themes/forest/forest-dark/border-accent.png +0 -0
  23. pdflinkcheck/data/themes/forest/forest-dark/border-basic.png +0 -0
  24. pdflinkcheck/data/themes/forest/forest-dark/border-hover.png +0 -0
  25. pdflinkcheck/data/themes/forest/forest-dark/border-invalid.png +0 -0
  26. pdflinkcheck/data/themes/forest/forest-dark/card.png +0 -0
  27. pdflinkcheck/data/themes/forest/forest-dark/check-accent.png +0 -0
  28. pdflinkcheck/data/themes/forest/forest-dark/check-basic.png +0 -0
  29. pdflinkcheck/data/themes/forest/forest-dark/check-hover.png +0 -0
  30. pdflinkcheck/data/themes/forest/forest-dark/check-tri-accent.png +0 -0
  31. pdflinkcheck/data/themes/forest/forest-dark/check-tri-basic.png +0 -0
  32. pdflinkcheck/data/themes/forest/forest-dark/check-tri-hover.png +0 -0
  33. pdflinkcheck/data/themes/forest/forest-dark/check-unsel-accent.png +0 -0
  34. pdflinkcheck/data/themes/forest/forest-dark/check-unsel-basic.png +0 -0
  35. pdflinkcheck/data/themes/forest/forest-dark/check-unsel-hover.png +0 -0
  36. pdflinkcheck/data/themes/forest/forest-dark/check-unsel-pressed.png +0 -0
  37. pdflinkcheck/data/themes/forest/forest-dark/combo-button-basic.png +0 -0
  38. pdflinkcheck/data/themes/forest/forest-dark/combo-button-focus.png +0 -0
  39. pdflinkcheck/data/themes/forest/forest-dark/combo-button-hover.png +0 -0
  40. pdflinkcheck/data/themes/forest/forest-dark/down.png +0 -0
  41. pdflinkcheck/data/themes/forest/forest-dark/empty.png +0 -0
  42. pdflinkcheck/data/themes/forest/forest-dark/hor-accent.png +0 -0
  43. pdflinkcheck/data/themes/forest/forest-dark/hor-basic.png +0 -0
  44. pdflinkcheck/data/themes/forest/forest-dark/hor-hover.png +0 -0
  45. pdflinkcheck/data/themes/forest/forest-dark/notebook.png +0 -0
  46. pdflinkcheck/data/themes/forest/forest-dark/off-accent.png +0 -0
  47. pdflinkcheck/data/themes/forest/forest-dark/off-basic.png +0 -0
  48. pdflinkcheck/data/themes/forest/forest-dark/off-hover.png +0 -0
  49. pdflinkcheck/data/themes/forest/forest-dark/on-accent.png +0 -0
  50. pdflinkcheck/data/themes/forest/forest-dark/on-basic.png +0 -0
  51. pdflinkcheck/data/themes/forest/forest-dark/on-hover.png +0 -0
  52. pdflinkcheck/data/themes/forest/forest-dark/radio-accent.png +0 -0
  53. pdflinkcheck/data/themes/forest/forest-dark/radio-basic.png +0 -0
  54. pdflinkcheck/data/themes/forest/forest-dark/radio-hover.png +0 -0
  55. pdflinkcheck/data/themes/forest/forest-dark/radio-tri-accent.png +0 -0
  56. pdflinkcheck/data/themes/forest/forest-dark/radio-tri-basic.png +0 -0
  57. pdflinkcheck/data/themes/forest/forest-dark/radio-tri-hover.png +0 -0
  58. pdflinkcheck/data/themes/forest/forest-dark/radio-unsel-accent.png +0 -0
  59. pdflinkcheck/data/themes/forest/forest-dark/radio-unsel-basic.png +0 -0
  60. pdflinkcheck/data/themes/forest/forest-dark/radio-unsel-hover.png +0 -0
  61. pdflinkcheck/data/themes/forest/forest-dark/radio-unsel-pressed.png +0 -0
  62. pdflinkcheck/data/themes/forest/forest-dark/rect-accent-hover.png +0 -0
  63. pdflinkcheck/data/themes/forest/forest-dark/rect-accent.png +0 -0
  64. pdflinkcheck/data/themes/forest/forest-dark/rect-basic.png +0 -0
  65. pdflinkcheck/data/themes/forest/forest-dark/rect-hover.png +0 -0
  66. pdflinkcheck/data/themes/forest/forest-dark/right.png +0 -0
  67. pdflinkcheck/data/themes/forest/forest-dark/scale-hor.png +0 -0
  68. pdflinkcheck/data/themes/forest/forest-dark/scale-vert.png +0 -0
  69. pdflinkcheck/data/themes/forest/forest-dark/separator.png +0 -0
  70. pdflinkcheck/data/themes/forest/forest-dark/sizegrip.png +0 -0
  71. pdflinkcheck/data/themes/forest/forest-dark/spin-button-down-basic.png +0 -0
  72. pdflinkcheck/data/themes/forest/forest-dark/spin-button-down-focus.png +0 -0
  73. pdflinkcheck/data/themes/forest/forest-dark/spin-button-up.png +0 -0
  74. pdflinkcheck/data/themes/forest/forest-dark/tab-accent.png +0 -0
  75. pdflinkcheck/data/themes/forest/forest-dark/tab-basic.png +0 -0
  76. pdflinkcheck/data/themes/forest/forest-dark/tab-hover.png +0 -0
  77. pdflinkcheck/data/themes/forest/forest-dark/thumb-hor-accent.png +0 -0
  78. pdflinkcheck/data/themes/forest/forest-dark/thumb-hor-basic.png +0 -0
  79. pdflinkcheck/data/themes/forest/forest-dark/thumb-hor-hover.png +0 -0
  80. pdflinkcheck/data/themes/forest/forest-dark/thumb-vert-accent.png +0 -0
  81. pdflinkcheck/data/themes/forest/forest-dark/thumb-vert-basic.png +0 -0
  82. pdflinkcheck/data/themes/forest/forest-dark/thumb-vert-hover.png +0 -0
  83. pdflinkcheck/data/themes/forest/forest-dark/tree-basic.png +0 -0
  84. pdflinkcheck/data/themes/forest/forest-dark/tree-pressed.png +0 -0
  85. pdflinkcheck/data/themes/forest/forest-dark/up.png +0 -0
  86. pdflinkcheck/data/themes/forest/forest-dark/vert-accent.png +0 -0
  87. pdflinkcheck/data/themes/forest/forest-dark/vert-basic.png +0 -0
  88. pdflinkcheck/data/themes/forest/forest-dark/vert-hover.png +0 -0
  89. pdflinkcheck/data/themes/forest/forest-dark.tcl +536 -0
  90. pdflinkcheck/data/themes/forest/forest-light/border-accent-hover.png +0 -0
  91. pdflinkcheck/data/themes/forest/forest-light/border-accent.png +0 -0
  92. pdflinkcheck/data/themes/forest/forest-light/border-basic.png +0 -0
  93. pdflinkcheck/data/themes/forest/forest-light/border-hover.png +0 -0
  94. pdflinkcheck/data/themes/forest/forest-light/border-invalid.png +0 -0
  95. pdflinkcheck/data/themes/forest/forest-light/card.png +0 -0
  96. pdflinkcheck/data/themes/forest/forest-light/check-accent.png +0 -0
  97. pdflinkcheck/data/themes/forest/forest-light/check-basic.png +0 -0
  98. pdflinkcheck/data/themes/forest/forest-light/check-hover.png +0 -0
  99. pdflinkcheck/data/themes/forest/forest-light/check-tri-accent.png +0 -0
  100. pdflinkcheck/data/themes/forest/forest-light/check-tri-basic.png +0 -0
  101. pdflinkcheck/data/themes/forest/forest-light/check-tri-hover.png +0 -0
  102. pdflinkcheck/data/themes/forest/forest-light/check-unsel-accent.png +0 -0
  103. pdflinkcheck/data/themes/forest/forest-light/check-unsel-basic.png +0 -0
  104. pdflinkcheck/data/themes/forest/forest-light/check-unsel-hover.png +0 -0
  105. pdflinkcheck/data/themes/forest/forest-light/check-unsel-pressed.png +0 -0
  106. pdflinkcheck/data/themes/forest/forest-light/combo-button-basic.png +0 -0
  107. pdflinkcheck/data/themes/forest/forest-light/combo-button-focus.png +0 -0
  108. pdflinkcheck/data/themes/forest/forest-light/combo-button-hover.png +0 -0
  109. pdflinkcheck/data/themes/forest/forest-light/down-focus.png +0 -0
  110. pdflinkcheck/data/themes/forest/forest-light/down.png +0 -0
  111. pdflinkcheck/data/themes/forest/forest-light/empty.png +0 -0
  112. pdflinkcheck/data/themes/forest/forest-light/hor-accent.png +0 -0
  113. pdflinkcheck/data/themes/forest/forest-light/hor-basic.png +0 -0
  114. pdflinkcheck/data/themes/forest/forest-light/hor-hover.png +0 -0
  115. pdflinkcheck/data/themes/forest/forest-light/notebook.png +0 -0
  116. pdflinkcheck/data/themes/forest/forest-light/off-accent.png +0 -0
  117. pdflinkcheck/data/themes/forest/forest-light/off-basic.png +0 -0
  118. pdflinkcheck/data/themes/forest/forest-light/off-hover.png +0 -0
  119. pdflinkcheck/data/themes/forest/forest-light/on-accent.png +0 -0
  120. pdflinkcheck/data/themes/forest/forest-light/on-basic.png +0 -0
  121. pdflinkcheck/data/themes/forest/forest-light/on-hover.png +0 -0
  122. pdflinkcheck/data/themes/forest/forest-light/radio-accent.png +0 -0
  123. pdflinkcheck/data/themes/forest/forest-light/radio-basic.png +0 -0
  124. pdflinkcheck/data/themes/forest/forest-light/radio-hover.png +0 -0
  125. pdflinkcheck/data/themes/forest/forest-light/radio-tri-accent.png +0 -0
  126. pdflinkcheck/data/themes/forest/forest-light/radio-tri-basic.png +0 -0
  127. pdflinkcheck/data/themes/forest/forest-light/radio-tri-hover.png +0 -0
  128. pdflinkcheck/data/themes/forest/forest-light/radio-unsel-accent.png +0 -0
  129. pdflinkcheck/data/themes/forest/forest-light/radio-unsel-basic.png +0 -0
  130. pdflinkcheck/data/themes/forest/forest-light/radio-unsel-hover.png +0 -0
  131. pdflinkcheck/data/themes/forest/forest-light/radio-unsel-pressed.png +0 -0
  132. pdflinkcheck/data/themes/forest/forest-light/rect-accent-hover.png +0 -0
  133. pdflinkcheck/data/themes/forest/forest-light/rect-accent.png +0 -0
  134. pdflinkcheck/data/themes/forest/forest-light/rect-basic.png +0 -0
  135. pdflinkcheck/data/themes/forest/forest-light/rect-hover.png +0 -0
  136. pdflinkcheck/data/themes/forest/forest-light/right-focus.png +0 -0
  137. pdflinkcheck/data/themes/forest/forest-light/right.png +0 -0
  138. pdflinkcheck/data/themes/forest/forest-light/scale-hor.png +0 -0
  139. pdflinkcheck/data/themes/forest/forest-light/scale-vert.png +0 -0
  140. pdflinkcheck/data/themes/forest/forest-light/separator.png +0 -0
  141. pdflinkcheck/data/themes/forest/forest-light/sizegrip.png +0 -0
  142. pdflinkcheck/data/themes/forest/forest-light/spin-button-down-basic.png +0 -0
  143. pdflinkcheck/data/themes/forest/forest-light/spin-button-down-focus.png +0 -0
  144. pdflinkcheck/data/themes/forest/forest-light/spin-button-up.png +0 -0
  145. pdflinkcheck/data/themes/forest/forest-light/tab-accent.png +0 -0
  146. pdflinkcheck/data/themes/forest/forest-light/tab-basic.png +0 -0
  147. pdflinkcheck/data/themes/forest/forest-light/tab-hover.png +0 -0
  148. pdflinkcheck/data/themes/forest/forest-light/thumb-hor-accent.png +0 -0
  149. pdflinkcheck/data/themes/forest/forest-light/thumb-hor-basic.png +0 -0
  150. pdflinkcheck/data/themes/forest/forest-light/thumb-hor-hover.png +0 -0
  151. pdflinkcheck/data/themes/forest/forest-light/thumb-vert-accent.png +0 -0
  152. pdflinkcheck/data/themes/forest/forest-light/thumb-vert-basic.png +0 -0
  153. pdflinkcheck/data/themes/forest/forest-light/thumb-vert-hover.png +0 -0
  154. pdflinkcheck/data/themes/forest/forest-light/tree-basic.png +0 -0
  155. pdflinkcheck/data/themes/forest/forest-light/tree-pressed.png +0 -0
  156. pdflinkcheck/data/themes/forest/forest-light/up.png +0 -0
  157. pdflinkcheck/data/themes/forest/forest-light/vert-accent.png +0 -0
  158. pdflinkcheck/data/themes/forest/forest-light/vert-basic.png +0 -0
  159. pdflinkcheck/data/themes/forest/forest-light/vert-hover.png +0 -0
  160. pdflinkcheck/data/themes/forest/forest-light.tcl +544 -0
  161. pdflinkcheck/datacopy.py +18 -1
  162. pdflinkcheck/dev.py +12 -25
  163. pdflinkcheck/environment.py +76 -0
  164. pdflinkcheck/gui.py +366 -457
  165. pdflinkcheck/helpers.py +88 -0
  166. pdflinkcheck/io.py +27 -23
  167. pdflinkcheck/report.py +692 -121
  168. pdflinkcheck/security.py +189 -0
  169. pdflinkcheck/splash.py +38 -0
  170. pdflinkcheck/stdlib_server.py +14 -20
  171. pdflinkcheck/stdlib_server_alt.py +571 -0
  172. pdflinkcheck/tk_utils.py +188 -0
  173. pdflinkcheck/update_msix_version.py +49 -0
  174. pdflinkcheck/validate.py +129 -218
  175. pdflinkcheck/version_info.py +6 -3
  176. {pdflinkcheck-1.1.73.dist-info → pdflinkcheck-1.2.29.dist-info}/METADATA +84 -81
  177. pdflinkcheck-1.2.29.dist-info/RECORD +183 -0
  178. pdflinkcheck-1.2.29.dist-info/WHEEL +5 -0
  179. {pdflinkcheck-1.1.73.dist-info → pdflinkcheck-1.2.29.dist-info}/entry_points.txt +0 -1
  180. pdflinkcheck-1.2.29.dist-info/licenses/LICENSE +27 -0
  181. pdflinkcheck-1.2.29.dist-info/licenses/LICENSE-MIT +9 -0
  182. pdflinkcheck-1.2.29.dist-info/top_level.txt +1 -0
  183. pdflinkcheck/analyze_pypdf_v2.py +0 -218
  184. pdflinkcheck-1.1.73.dist-info/RECORD +0 -21
  185. pdflinkcheck-1.1.73.dist-info/WHEEL +0 -4
  186. /pdflinkcheck-1.1.73.dist-info/licenses/LICENSE → /pdflinkcheck-1.2.29.dist-info/licenses/LICENSE-AGPL3 +0 -0
@@ -4,7 +4,7 @@ A purpose-built tool for comprehensive analysis of hyperlinks and GoTo links wit
4
4
 
5
5
  -----
6
6
 
7
- ![Screenshot of the pdflinkcheck GUI](https://raw.githubusercontent.com/City-of-Memphis-Wastewater/pdflinkcheck/main/assets/pdflinkcheck_gui_v1.1.58.png)
7
+ ![Screenshot of the pdflinkcheck GUI](https://raw.githubusercontent.com/City-of-Memphis-Wastewater/pdflinkcheck/main/assets/pdflinkcheck_gui_v1.1.97.png)
8
8
 
9
9
  -----
10
10
 
@@ -19,7 +19,7 @@ For the most user-typical experience, download the single-file binary matching y
19
19
  | **File Type** | **Primary Use Case** | **Recommended Launch Method** |
20
20
  | :--- | :--- | :--- |
21
21
  | **Executable (.exe, .elf)** | **GUI** | Double-click the file. |
22
- | **PYZ (Python Zip App)** | **CLI** or **GUI** | Run using your system's `python` command: `python pdflinkcheck-VERSION.pyz --help` |
22
+ | **PYZ (Python Zip App)** | **CLI** or **GUI** | Run using your system's `python` command: `python pdflinkcheck-VERSION.pyz --help` |
23
23
 
24
24
  ### Installation via pipx
25
25
 
@@ -42,20 +42,9 @@ The tool can be run as simple cross-platform graphical interface (Tkinter).
42
42
 
43
43
  ### Launching the GUI
44
44
 
45
- There are three ways to launch the GUI interface:
46
-
47
- 1. **Implicit Launch:** Run the main command with no arguments, subcommands, or flags (`pdflinkcheck`).
45
+ Ways to launch the GUI interface:
46
+ 1. **Implicit Launch:** Run the tool or file with no arguments, subcommands, or flags. (Note: PyInstaller builds use the --windowed (or -noconsole) flag, except for on Termux.)
48
47
  2. **Explicit Command:** Use the dedicated GUI subcommand (`pdflinkcheck gui`).
49
- 3. **Binary Double-Click:**
50
- * **Windows:** Double-click the `pdflinkcheck-VERSION-gui.bat` file.
51
- * **macOS/Linux:** Double-click the downloaded `.pyz` or `.elf` file.
52
-
53
- ### Planned GUI Updates
54
-
55
- We are actively working on the following enhancements:
56
-
57
- * **Report Export:** Functionality to export the full analysis report to a plain text file.
58
- * **License Visibility:** A dedicated "License Info" button within the GUI to display the terms of the AGPLv3+ license.
59
48
 
60
49
  -----
61
50
 
@@ -63,20 +52,30 @@ We are actively working on the following enhancements:
63
52
 
64
53
  The core functionality is accessed via the `analyze` command.
65
54
 
66
- `DEV_TYPER_HELP_TREE=1 pdflinkcheck help-tree`:
67
- ![Screenshot of the pdflinkcheck CLI Tree Help](https://raw.githubusercontent.com/City-of-Memphis-Wastewater/pdflinkcheck/main/assets/pdflinkcheck_cli_v1.1.58_tree_help.png)
68
-
69
55
  `pdflinkcheck --help`:
70
- ![Screenshot of the pdflinkcheck CLI Tree Help](https://raw.githubusercontent.com/City-of-Memphis-Wastewater/pdflinkcheck/main/assets/pdflinkcheck_cli_v1.1.58.png)
56
+ ![Screenshot of the pdflinkcheck CLI Tree Help](https://raw.githubusercontent.com/City-of-Memphis-Wastewater/pdflinkcheck/main/assets/pdflinkcheck_cli_v1.1.97.png)
57
+
58
+
59
+ See the Help Tree by unlocking the help-tree CLI command, using the DEV_TYPER_HELP_TREE env var.
60
+
61
+ ```
62
+ DEV_TYPER_HELP_TREE=1 pdflinkcheck help-tree` # bash
63
+ $env:DEV_TYPER_HELP_TREE = "1"; pdflinkcheck help-tree` # PowerShell
64
+ ```
65
+
66
+ ![Screenshot of the pdflinkcheck CLI Tree Help](https://raw.githubusercontent.com/City-of-Memphis-Wastewater/pdflinkcheck/main/assets/pdflinkcheck_cli_v1.1.97_tree_help.png)
67
+
71
68
 
72
69
 
73
70
  ### Available Commands
74
71
 
75
72
  |**Command**|**Description**|
76
73
  |---|---|
77
- |`pdflinkcheck analyze`|Analyzes a PDF file for links |
74
+ |`pdflinkcheck analyze`|Analyzes a PDF file for links and validates their reasonableness.|
78
75
  |`pdflinkcheck gui`|Explicitly launch the Graphical User Interface.|
79
76
  |`pdflinkcheck docs`|Access documentation, including the README and AGPLv3+ license.|
77
+ |`pdflinkcheck serve`|Serve a basic local web app which uses only the Python standard library.|
78
+ |`pdflinkcheck tools`|Access additional tools, like `--clear-cache`.|
80
79
 
81
80
  ### `analyze` Command Options
82
81
 
@@ -85,7 +84,6 @@ The core functionality is accessed via the `analyze` command.
85
84
  |`<PDF_PATH>`|**Required.** The path to the PDF file to analyze.|N/A|
86
85
  |`--pdf-library / -p`|Select engine: `pymupdf` or `pypdf`.|`pypdf`|
87
86
  |`--export-format / -e`|Export to `JSON`, `TXT`, or `None` to suppress file output.|`JSON`|
88
- |`--max-links / -m`|Maximum links to display per section. Use `0` for all.|`0`|
89
87
 
90
88
  ### `gui` Command Options
91
89
 
@@ -99,9 +97,6 @@ The core functionality is accessed via the `analyze` command.
99
97
  # Analyze a document, show all links, and save the report as JSON and TXT
100
98
  pdflinkcheck analyze "TE Maxson WWTF O&M Manual.pdf" --export-format JSON,TXT
101
99
 
102
- # Analyze a document but keep the print block short, showing only the first 10 links for each type
103
- pdflinkcheck analyze "TE Maxson WWTF O&M Manual.pdf" --max-links 10
104
-
105
100
  # Show the GUI for only a moment, like in a build check
106
101
  pdflinkcheck gui --auto-close 3000
107
102
 
@@ -113,22 +108,23 @@ pdflinkcheck docs --license --readme
113
108
 
114
109
  ## 📦 Library Access (Advanced)
115
110
 
116
- For developers importing `pdflinkcheck` into other Python projects, the core analysis functions are exposed directly in the root namespace:
111
+ For developers importing `pdflinkcheck` into other Python projects, the core analysis functions are exposed directly in the root namespace. The various `analysis_pdf_*` functions each use a different library to extract the target PDF's internal TOC, external links, and metadata.
117
112
 
118
- |**Function**|**Description**|
119
- |---|---|
120
- |`run_report()`|**(Primary function)** Performs the full analysis, prints to console, and handles file export.|
121
- |`extract_links_pynupdf()`|Function to retrieve all explicit links (URIs, GoTo, etc.) from a PDF path.|
122
- |`extract_toc_pymupdf()`|Function to extract the PDF's internal Table of Contents (bookmarks/outline).|
123
- |`extract_links_pynupdf()`|Function to retrieve all explicit links (URIs, GoTo, etc.) from a PDF path, using the pypdf library.|
124
- |`extract_toc_pymupdf()`|Function to extract the PDF's internal Table of Contents (bookmarks/outline), using the pypdf library.|
113
+ |**Function**|**Library**|**Description**|
114
+ |---|---|---|
115
+ |`run_report()`|pdflinkcheck | **(Primary function)** Performs the full analysis, prints to console, and handles file export.|
116
+ |`analyze_pdf_pdfium()`| pypdfium2 | Fast, ~10 mb, Permissively licensed |
117
+ |`analyze_pdf_pymupdf()`| PyMuPDF | Fast, ~30 mb, AGPL3+ licensed |
118
+ |`analyze_pdf_pypdf()`| pypdf library | Slow, ~2 mb, Permissively licensed |
125
119
 
126
120
  Exanple:
127
121
 
128
122
  ```python
129
- from pdflinkcheck.report import run_report
130
- from pdflinkcheck.analysis_pymupdf import extract_links_pymupdf, extract_toc_pymupdf 130 from pdflinkcheck.analysis_pymupdf import extract_links_pynupdf, extract_toc_pymupdf
131
- from pdflinkcheck.analysis_pypdf import extract_links_pypdf, extract_toc_pypdf
123
+ from pdflinkcheck import ( run_report,
124
+ analyze_pdf_pymupdf,
125
+ analyze_pdf_pypdf,
126
+ analyze_pdf_pdfium,
127
+ )
132
128
 
133
129
  file = "document1.pdf"
134
130
  report_data = run_report(file)
@@ -188,22 +184,34 @@ This `help-tree` feature has not yet been submitted for inclusion into Typer.
188
184
 
189
185
  ## ⚠️ Compatibility Notes
190
186
 
191
- #### Termux Compatibility as a Key Goal
187
+ ### Termux Compatibility as a Key Goal
192
188
  A key goal of City-of-Memphis-Wastewater is to release all software as Termux-compatible.
193
189
 
194
- Termux compatibility is important in the modern age as Android devices are common among technicians, field engineers, and maintenace staff.
190
+ Termux compatibility is important in the modern age, because Android devices are common among technicians, field engineers, and maintenace staff.
195
191
  Android is the most common operating system in the Global South.
196
192
  We aim to produce stable software that can do the most possible good.
197
193
 
198
- While using `PyMuPDF` in Python dependency resolution on Termux simply isn't possible, we are proud to have achieved a work-around by implementing a parallel solution in `pypdf`!
199
- Now, there is PDF Engine selection in both the CLI and the GUI.
200
- `pypdf` is the default in pdflinkcheck.report.run_report(); PyMuPDF can be explicitly requested in the CLI and is the default in the TKinter GUI.
194
+ Now `pdflinkcheck` can run on Termux by using the `pypdf` engine and the `pdfium` engine.
195
+ Benefits:
196
+ - `pypdf`-only artifacts, to reduce size to about 6% compared to artifacts that include `PyMuPDF`.
197
+ - Web-stack GUI as an alternative to the Tkinter GUI, which can be run locally on Termux or as a web app.
198
+
201
199
 
202
- Now that `pdflinkcheck` can run on Termux, we may find a work-around and be able to drop the PyMuPDF dependency.
203
- - Build `pypdf`-only artifacts, to reduce size.
204
- - Build a web-stack GUI as an alternative to the Tkinter GUI, to be compatible with Termux.
200
+ ### PDF Library Selection
201
+ At long last, `PyMuPDF` is an optional dependency. All testing comparing `pypdf` and `PyMuPDF` has shown identical validation performance. However `PyMuPDF` is much faster. The benfit of `pypdf` is small size of packages and cross-platform compatibility. We have recently added a PDFium option, which circumvents the AGPL3+.
205
202
 
206
- Because it works, we plan to keep the `PyMuPDF` portion of the codebase.
203
+ Expecte that all binaries and artifacts contain PyMuPDF, unlss they are built on Android. The GUI and CLI interfaces both allow selection of the library; if PyMuPDF is selected but is not available, the user will be warned.
204
+
205
+ To install the complete version use one of these options:
206
+
207
+ ```bash
208
+ pip install "pdflinkcheck[mupdf]"
209
+ pipx install "pdflinkcheck[pdfium]"
210
+ uv tool install "pdflinkcheck[pdfium]"
211
+ uv add "pdflinkcheck[pdfium]"
212
+ ```
213
+
214
+ ---
207
215
 
208
216
  ### Document Compatibility:
209
217
  Not all PDF files can be processed successfully. This tool is designed primarily for digitally generated (vector-based) PDFs.
@@ -215,22 +223,6 @@ Processing may fail or yield incomplete results for:
215
223
 
216
224
  -----
217
225
 
218
- ## PDF Library Selection
219
- At long last, `PyMuPDF` is an optional dependency. The default is `pypdf`. All testing has shown identical performance, though the `analyze_pymupdf.py` is faster and more direct and robust than `analyze_pypdf.py`, which requires a lot of intentional parsing.
220
-
221
- Binaries and artifacts are expected to contain PyMuPDF, unless they are build on Android. The GUI and CLI interfaces both allow selection of the library; if PyMuPDF is selected but is not available, the user will be warned.
222
-
223
- To install the complete version use one of these options:
224
-
225
- ```bash
226
- pip install "pdflinkcheck[full]"
227
- pipx install "pdflinkcheck[full]"
228
- uv tool install "pdflinkcheck[full]"
229
- uv add "pdflinkcheck[full]"
230
- ```
231
-
232
- -----
233
-
234
226
  ## Run from Source (Developers)
235
227
 
236
228
  ```bash
@@ -257,22 +249,28 @@ uv run python -m pdflinkcheck.stdlib_server
257
249
 
258
250
  ## 📜 License Implications (AGPLv3+)
259
251
 
260
- **`pdflinkcheck` is licensed under the `GNU Affero General Public License` version 3 or later (`AGPLv3+`).**
261
252
 
262
- The `AGPL3+` is required for portions of this codebase because `pdflinkcheck` uses `PyMuPDF`, which is licensed under the `AGPL3`.
253
+ The `AGPL3-or-later` is required for binaries of `pdflinkcheck` which include `PyMuPDF`, which is licensed under the `AGPL3`.
254
+ The source code itself for `pdflinkcheck` is licensed under the `MIT`.
263
255
 
264
- To stay in compliance, the AGPL3 license text is readily available in the CLI and the GUI, and it is included in the build artifacts.
265
- The `AGPL3` appears as the primary license file in the source code. While this infers that the entire project is AGPL3-licensed, this is not true - portions of the codebase are MIT-licensed.
266
-
267
- This license has significant implications for **distribution and network use**, particularly for organizations:
256
+ The AGPL3-or-later license has significant implications for **distribution and network use**, particularly for organizations:
268
257
 
269
258
  * **Source Code Provision:** If you distribute this tool (modified or unmodified) to anyone, you **must** provide the full source code under the same license.
270
259
  * **Network Interaction (Affero Clause):** If you modify this tool and make the modified version available to users over a computer network (e.g., as a web service or backend), you **must** also offer the source code to those network users.
271
260
 
272
261
  > **Before deploying or modifying this tool for organizational use, especially for internal web services or distribution, please ensure compliance with the AGPLv3+ terms.**
273
262
 
263
+ Because the AGPLv3 is a strong copyleft license, any version of `pdflinkcheck` that includes AGPL‑licensed components (such as `PyMuPDF`) must be distributed as a whole under AGPLv3+. This means that for those versions, anyone who distributes the application — or makes a modified version available over a network — must also provide the complete corresponding source code under the same terms.
264
+
265
+ The source code of pdflinkcheck itself remains licensed under the **MIT License**; only the distributed binary becomes AGPL‑licensed when PyMuPDF is included.
266
+
267
+
274
268
  Links:
275
269
  - Source code: https://github.com/City-of-Memphis-Wastewater/pdflinkcheck/
276
- - Official AGPLv3 Text (FSF): https://www.gnu.org/licenses/agpl-3.0.html
270
+ - PyMuPDF source code: https://github.com/pymupdf/PyMuPDF/
271
+ - pypdfium2 source code: https://github.com/pypdfium2-team/pypdfium2
272
+ - pypdf source code: https://github.com/py-pdf/pypdf/
273
+ - AGPLv3 text (FSF): https://www.gnu.org/licenses/agpl-3.0.html
274
+ - MIT License text: https://opensource.org/license/mit
277
275
 
278
276
  Copyright © 2025 George Clayton Bennett
Binary file
Binary file
Binary file
@@ -1,25 +1,28 @@
1
1
  [project]
2
2
  name = "pdflinkcheck"
3
- version = "1.1.73"
3
+ version = "1.2.29"
4
4
  description = "A purpose-built PDF link analysis and reporting tool with GUI and CLI."
5
5
  readme = "README.md"
6
- requires-python = ">=3.10"
6
+ requires-python = ">=3.9"
7
7
  dependencies = [
8
- "pyhabitat>=1.0.53",
8
+ "pyhabitat>=1.1.5",
9
9
  "pypdf>=6.4.2",
10
10
  "rich>=14.2.0",
11
11
  "typer>=0.20.0",
12
12
  ]
13
- license-files = ["LICENSE"]
13
+
14
+ license = "MIT AND AGPL-3.0-or-later"
15
+ license-files = ["LICENSE", "LICENSE-MIT", "LICENSE-AGPL3"]
16
+
14
17
  classifiers=[
15
18
  "Programming Language :: Python :: 3",
16
19
  "Programming Language :: Python :: 3 :: Only",
20
+ "Programming Language :: Python :: 3.9",
17
21
  "Programming Language :: Python :: 3.10",
18
22
  "Programming Language :: Python :: 3.11",
19
23
  "Programming Language :: Python :: 3.12",
20
24
  "Programming Language :: Python :: 3.13",
21
25
  "Programming Language :: Python :: 3.14",
22
- "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
23
26
  "Operating System :: OS Independent",
24
27
  "Intended Audience :: End Users/Desktop",
25
28
  "Intended Audience :: Developers", # library and documentation
@@ -50,49 +53,34 @@ Repository = "https://github.com/city-of-memphis-wastewater/pdflinkcheck"
50
53
  [project.scripts]
51
54
  pdflinkcheck = "pdflinkcheck.cli:app"
52
55
 
56
+
53
57
  [project.optional-dependencies]
54
- # This allows users to do: pip install pdflinkcheck[full]
55
- full = [
56
- #"pymupdf>=1.26.7 ; platform_system == 'Linux' and platform_machine != 'aarch64'" # to avoid on termux
57
- "pymupdf>=1.26.7" # let them try
58
- ]
59
- gui = [
60
- "sv-ttk>=2.6.1",
61
- ]
58
+ # If you choose to include PyMuPDF, you must comply with the AGPL3
59
+ mupdf = ["pymupdf>=1.24.0,<2.0.0"] # fails on termux
60
+ pdfium = ["pypdfium2>=5.2.0,<6.0.0"]
61
+ full = ["pymupdf>=1.24.0,<2.0.0", "pypdfium2>=5.2.0,<6.0.0"]
62
+
63
+ #rust = [
64
+ # "pdflinkcheck-rust>=0.1.13"
65
+ #]
62
66
 
63
67
  [dependency-groups]
64
68
  dev = [
65
69
  "build>=1.3.0",
66
- "pyinstaller>=6.17.0",
70
+ "pyinstaller>=6.17.0 ; platform_system == 'Linux' and platform_machine != 'aarch64'", # to avoid on termux
67
71
  "shiv>=1.0.8",
68
72
  "ruff>=0.7.0 ; platform_system == 'Linux' and platform_machine != 'aarch64'", # to avoid on termux
69
73
  "pytest>=8.0.0",
70
74
  "pytest-cov>=4.1.0",
71
- "sv-ttk>=2.6.1",
72
75
  ]
73
76
 
77
+ #[build-system]
78
+ #requires = ["uv_build"]
79
+ #build-backend = "uv_build"
74
80
  [build-system]
75
- requires = ["uv_build"]
76
- build-backend = "uv_build"
77
-
78
- #[tool.hatch.build.targets.wheel]
79
- #packages = ["src/pdflinkcheck"]
80
- #artifacts = [
81
- # "src/pdflinkcheck/data/LICENSE",
82
- # "src/pdflinkcheck/data/README.md"
83
- # ]
84
-
85
- #[tool.uv.build-backend.data]
86
- #data = ["src/pdflinkcheck/data"]
87
-
88
- #[tool.hatch.build.targets.wheel.force-include]
89
- #"pyproject.toml" = "pdflinkcheck/data/pyproject.toml"
90
-
91
- #[tool.hatch.build.targets.sdist]
92
- #include = [
93
- # "pyproject.toml",
94
- # "src/pdflinkcheck/data/LICENSE",
95
- # "src/pdflinkcheck/data/README.md",
96
- #]
81
+ requires = ["setuptools>=64", "wheel"]
82
+ build-backend = "setuptools.build_meta"
97
83
 
84
+ [tool.uv.sources]
85
+ pdflinkcheck = { path = "src/pdflinkcheck" }
98
86