pdflinkcheck 1.1.73__py3-none-any.whl → 1.1.94__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 (177) hide show
  1. pdflinkcheck/__init__.py +2 -5
  2. pdflinkcheck/analyze_pymupdf.py +12 -6
  3. pdflinkcheck/analyze_pypdf.py +25 -7
  4. pdflinkcheck/analyze_pypdf_v2.py +5 -6
  5. pdflinkcheck/cli.py +82 -91
  6. pdflinkcheck/data/I Have Questions.md +51 -0
  7. pdflinkcheck/data/LICENSE +17 -654
  8. pdflinkcheck/data/README.md +49 -49
  9. pdflinkcheck/data/icons/BoxArt-1080x1080.png +0 -0
  10. pdflinkcheck/data/icons/Logo-150x150.png +0 -0
  11. pdflinkcheck/data/icons/Logo-300x300.png +0 -0
  12. pdflinkcheck/data/icons/Logo-71x71.png +0 -0
  13. pdflinkcheck/data/icons/PosterArt-720x1080.png +0 -0
  14. pdflinkcheck/data/icons/SmallLogo-44x44.png +0 -0
  15. pdflinkcheck/data/icons/SplashScreen-620x300.png +0 -0
  16. pdflinkcheck/data/icons/StoreLogo-50x50.png +0 -0
  17. pdflinkcheck/data/icons/WideLogo-310x150.png +0 -0
  18. pdflinkcheck/data/icons/red_pdf_512px.ico +0 -0
  19. pdflinkcheck/data/pyproject.toml +20 -23
  20. pdflinkcheck/data/themes/forest/forest-dark/border-accent-hover.png +0 -0
  21. pdflinkcheck/data/themes/forest/forest-dark/border-accent.png +0 -0
  22. pdflinkcheck/data/themes/forest/forest-dark/border-basic.png +0 -0
  23. pdflinkcheck/data/themes/forest/forest-dark/border-hover.png +0 -0
  24. pdflinkcheck/data/themes/forest/forest-dark/border-invalid.png +0 -0
  25. pdflinkcheck/data/themes/forest/forest-dark/card.png +0 -0
  26. pdflinkcheck/data/themes/forest/forest-dark/check-accent.png +0 -0
  27. pdflinkcheck/data/themes/forest/forest-dark/check-basic.png +0 -0
  28. pdflinkcheck/data/themes/forest/forest-dark/check-hover.png +0 -0
  29. pdflinkcheck/data/themes/forest/forest-dark/check-tri-accent.png +0 -0
  30. pdflinkcheck/data/themes/forest/forest-dark/check-tri-basic.png +0 -0
  31. pdflinkcheck/data/themes/forest/forest-dark/check-tri-hover.png +0 -0
  32. pdflinkcheck/data/themes/forest/forest-dark/check-unsel-accent.png +0 -0
  33. pdflinkcheck/data/themes/forest/forest-dark/check-unsel-basic.png +0 -0
  34. pdflinkcheck/data/themes/forest/forest-dark/check-unsel-hover.png +0 -0
  35. pdflinkcheck/data/themes/forest/forest-dark/check-unsel-pressed.png +0 -0
  36. pdflinkcheck/data/themes/forest/forest-dark/combo-button-basic.png +0 -0
  37. pdflinkcheck/data/themes/forest/forest-dark/combo-button-focus.png +0 -0
  38. pdflinkcheck/data/themes/forest/forest-dark/combo-button-hover.png +0 -0
  39. pdflinkcheck/data/themes/forest/forest-dark/down.png +0 -0
  40. pdflinkcheck/data/themes/forest/forest-dark/empty.png +0 -0
  41. pdflinkcheck/data/themes/forest/forest-dark/hor-accent.png +0 -0
  42. pdflinkcheck/data/themes/forest/forest-dark/hor-basic.png +0 -0
  43. pdflinkcheck/data/themes/forest/forest-dark/hor-hover.png +0 -0
  44. pdflinkcheck/data/themes/forest/forest-dark/notebook.png +0 -0
  45. pdflinkcheck/data/themes/forest/forest-dark/off-accent.png +0 -0
  46. pdflinkcheck/data/themes/forest/forest-dark/off-basic.png +0 -0
  47. pdflinkcheck/data/themes/forest/forest-dark/off-hover.png +0 -0
  48. pdflinkcheck/data/themes/forest/forest-dark/on-accent.png +0 -0
  49. pdflinkcheck/data/themes/forest/forest-dark/on-basic.png +0 -0
  50. pdflinkcheck/data/themes/forest/forest-dark/on-hover.png +0 -0
  51. pdflinkcheck/data/themes/forest/forest-dark/radio-accent.png +0 -0
  52. pdflinkcheck/data/themes/forest/forest-dark/radio-basic.png +0 -0
  53. pdflinkcheck/data/themes/forest/forest-dark/radio-hover.png +0 -0
  54. pdflinkcheck/data/themes/forest/forest-dark/radio-tri-accent.png +0 -0
  55. pdflinkcheck/data/themes/forest/forest-dark/radio-tri-basic.png +0 -0
  56. pdflinkcheck/data/themes/forest/forest-dark/radio-tri-hover.png +0 -0
  57. pdflinkcheck/data/themes/forest/forest-dark/radio-unsel-accent.png +0 -0
  58. pdflinkcheck/data/themes/forest/forest-dark/radio-unsel-basic.png +0 -0
  59. pdflinkcheck/data/themes/forest/forest-dark/radio-unsel-hover.png +0 -0
  60. pdflinkcheck/data/themes/forest/forest-dark/radio-unsel-pressed.png +0 -0
  61. pdflinkcheck/data/themes/forest/forest-dark/rect-accent-hover.png +0 -0
  62. pdflinkcheck/data/themes/forest/forest-dark/rect-accent.png +0 -0
  63. pdflinkcheck/data/themes/forest/forest-dark/rect-basic.png +0 -0
  64. pdflinkcheck/data/themes/forest/forest-dark/rect-hover.png +0 -0
  65. pdflinkcheck/data/themes/forest/forest-dark/right.png +0 -0
  66. pdflinkcheck/data/themes/forest/forest-dark/scale-hor.png +0 -0
  67. pdflinkcheck/data/themes/forest/forest-dark/scale-vert.png +0 -0
  68. pdflinkcheck/data/themes/forest/forest-dark/separator.png +0 -0
  69. pdflinkcheck/data/themes/forest/forest-dark/sizegrip.png +0 -0
  70. pdflinkcheck/data/themes/forest/forest-dark/spin-button-down-basic.png +0 -0
  71. pdflinkcheck/data/themes/forest/forest-dark/spin-button-down-focus.png +0 -0
  72. pdflinkcheck/data/themes/forest/forest-dark/spin-button-up.png +0 -0
  73. pdflinkcheck/data/themes/forest/forest-dark/tab-accent.png +0 -0
  74. pdflinkcheck/data/themes/forest/forest-dark/tab-basic.png +0 -0
  75. pdflinkcheck/data/themes/forest/forest-dark/tab-hover.png +0 -0
  76. pdflinkcheck/data/themes/forest/forest-dark/thumb-hor-accent.png +0 -0
  77. pdflinkcheck/data/themes/forest/forest-dark/thumb-hor-basic.png +0 -0
  78. pdflinkcheck/data/themes/forest/forest-dark/thumb-hor-hover.png +0 -0
  79. pdflinkcheck/data/themes/forest/forest-dark/thumb-vert-accent.png +0 -0
  80. pdflinkcheck/data/themes/forest/forest-dark/thumb-vert-basic.png +0 -0
  81. pdflinkcheck/data/themes/forest/forest-dark/thumb-vert-hover.png +0 -0
  82. pdflinkcheck/data/themes/forest/forest-dark/tree-basic.png +0 -0
  83. pdflinkcheck/data/themes/forest/forest-dark/tree-pressed.png +0 -0
  84. pdflinkcheck/data/themes/forest/forest-dark/up.png +0 -0
  85. pdflinkcheck/data/themes/forest/forest-dark/vert-accent.png +0 -0
  86. pdflinkcheck/data/themes/forest/forest-dark/vert-basic.png +0 -0
  87. pdflinkcheck/data/themes/forest/forest-dark/vert-hover.png +0 -0
  88. pdflinkcheck/data/themes/forest/forest-dark.tcl +536 -0
  89. pdflinkcheck/data/themes/forest/forest-light/border-accent-hover.png +0 -0
  90. pdflinkcheck/data/themes/forest/forest-light/border-accent.png +0 -0
  91. pdflinkcheck/data/themes/forest/forest-light/border-basic.png +0 -0
  92. pdflinkcheck/data/themes/forest/forest-light/border-hover.png +0 -0
  93. pdflinkcheck/data/themes/forest/forest-light/border-invalid.png +0 -0
  94. pdflinkcheck/data/themes/forest/forest-light/card.png +0 -0
  95. pdflinkcheck/data/themes/forest/forest-light/check-accent.png +0 -0
  96. pdflinkcheck/data/themes/forest/forest-light/check-basic.png +0 -0
  97. pdflinkcheck/data/themes/forest/forest-light/check-hover.png +0 -0
  98. pdflinkcheck/data/themes/forest/forest-light/check-tri-accent.png +0 -0
  99. pdflinkcheck/data/themes/forest/forest-light/check-tri-basic.png +0 -0
  100. pdflinkcheck/data/themes/forest/forest-light/check-tri-hover.png +0 -0
  101. pdflinkcheck/data/themes/forest/forest-light/check-unsel-accent.png +0 -0
  102. pdflinkcheck/data/themes/forest/forest-light/check-unsel-basic.png +0 -0
  103. pdflinkcheck/data/themes/forest/forest-light/check-unsel-hover.png +0 -0
  104. pdflinkcheck/data/themes/forest/forest-light/check-unsel-pressed.png +0 -0
  105. pdflinkcheck/data/themes/forest/forest-light/combo-button-basic.png +0 -0
  106. pdflinkcheck/data/themes/forest/forest-light/combo-button-focus.png +0 -0
  107. pdflinkcheck/data/themes/forest/forest-light/combo-button-hover.png +0 -0
  108. pdflinkcheck/data/themes/forest/forest-light/down-focus.png +0 -0
  109. pdflinkcheck/data/themes/forest/forest-light/down.png +0 -0
  110. pdflinkcheck/data/themes/forest/forest-light/empty.png +0 -0
  111. pdflinkcheck/data/themes/forest/forest-light/hor-accent.png +0 -0
  112. pdflinkcheck/data/themes/forest/forest-light/hor-basic.png +0 -0
  113. pdflinkcheck/data/themes/forest/forest-light/hor-hover.png +0 -0
  114. pdflinkcheck/data/themes/forest/forest-light/notebook.png +0 -0
  115. pdflinkcheck/data/themes/forest/forest-light/off-accent.png +0 -0
  116. pdflinkcheck/data/themes/forest/forest-light/off-basic.png +0 -0
  117. pdflinkcheck/data/themes/forest/forest-light/off-hover.png +0 -0
  118. pdflinkcheck/data/themes/forest/forest-light/on-accent.png +0 -0
  119. pdflinkcheck/data/themes/forest/forest-light/on-basic.png +0 -0
  120. pdflinkcheck/data/themes/forest/forest-light/on-hover.png +0 -0
  121. pdflinkcheck/data/themes/forest/forest-light/radio-accent.png +0 -0
  122. pdflinkcheck/data/themes/forest/forest-light/radio-basic.png +0 -0
  123. pdflinkcheck/data/themes/forest/forest-light/radio-hover.png +0 -0
  124. pdflinkcheck/data/themes/forest/forest-light/radio-tri-accent.png +0 -0
  125. pdflinkcheck/data/themes/forest/forest-light/radio-tri-basic.png +0 -0
  126. pdflinkcheck/data/themes/forest/forest-light/radio-tri-hover.png +0 -0
  127. pdflinkcheck/data/themes/forest/forest-light/radio-unsel-accent.png +0 -0
  128. pdflinkcheck/data/themes/forest/forest-light/radio-unsel-basic.png +0 -0
  129. pdflinkcheck/data/themes/forest/forest-light/radio-unsel-hover.png +0 -0
  130. pdflinkcheck/data/themes/forest/forest-light/radio-unsel-pressed.png +0 -0
  131. pdflinkcheck/data/themes/forest/forest-light/rect-accent-hover.png +0 -0
  132. pdflinkcheck/data/themes/forest/forest-light/rect-accent.png +0 -0
  133. pdflinkcheck/data/themes/forest/forest-light/rect-basic.png +0 -0
  134. pdflinkcheck/data/themes/forest/forest-light/rect-hover.png +0 -0
  135. pdflinkcheck/data/themes/forest/forest-light/right-focus.png +0 -0
  136. pdflinkcheck/data/themes/forest/forest-light/right.png +0 -0
  137. pdflinkcheck/data/themes/forest/forest-light/scale-hor.png +0 -0
  138. pdflinkcheck/data/themes/forest/forest-light/scale-vert.png +0 -0
  139. pdflinkcheck/data/themes/forest/forest-light/separator.png +0 -0
  140. pdflinkcheck/data/themes/forest/forest-light/sizegrip.png +0 -0
  141. pdflinkcheck/data/themes/forest/forest-light/spin-button-down-basic.png +0 -0
  142. pdflinkcheck/data/themes/forest/forest-light/spin-button-down-focus.png +0 -0
  143. pdflinkcheck/data/themes/forest/forest-light/spin-button-up.png +0 -0
  144. pdflinkcheck/data/themes/forest/forest-light/tab-accent.png +0 -0
  145. pdflinkcheck/data/themes/forest/forest-light/tab-basic.png +0 -0
  146. pdflinkcheck/data/themes/forest/forest-light/tab-hover.png +0 -0
  147. pdflinkcheck/data/themes/forest/forest-light/thumb-hor-accent.png +0 -0
  148. pdflinkcheck/data/themes/forest/forest-light/thumb-hor-basic.png +0 -0
  149. pdflinkcheck/data/themes/forest/forest-light/thumb-hor-hover.png +0 -0
  150. pdflinkcheck/data/themes/forest/forest-light/thumb-vert-accent.png +0 -0
  151. pdflinkcheck/data/themes/forest/forest-light/thumb-vert-basic.png +0 -0
  152. pdflinkcheck/data/themes/forest/forest-light/thumb-vert-hover.png +0 -0
  153. pdflinkcheck/data/themes/forest/forest-light/tree-basic.png +0 -0
  154. pdflinkcheck/data/themes/forest/forest-light/tree-pressed.png +0 -0
  155. pdflinkcheck/data/themes/forest/forest-light/up.png +0 -0
  156. pdflinkcheck/data/themes/forest/forest-light/vert-accent.png +0 -0
  157. pdflinkcheck/data/themes/forest/forest-light/vert-basic.png +0 -0
  158. pdflinkcheck/data/themes/forest/forest-light/vert-hover.png +0 -0
  159. pdflinkcheck/data/themes/forest/forest-light.tcl +544 -0
  160. pdflinkcheck/datacopy.py +2 -0
  161. pdflinkcheck/dev.py +10 -23
  162. pdflinkcheck/environment.py +64 -0
  163. pdflinkcheck/gui.py +229 -103
  164. pdflinkcheck/io.py +4 -18
  165. pdflinkcheck/report.py +148 -78
  166. pdflinkcheck/stdlib_server.py +14 -6
  167. pdflinkcheck/update_msix_version.py +47 -0
  168. pdflinkcheck/validate.py +50 -73
  169. pdflinkcheck/version_info.py +5 -2
  170. {pdflinkcheck-1.1.73.dist-info → pdflinkcheck-1.1.94.dist-info}/METADATA +54 -52
  171. pdflinkcheck-1.1.94.dist-info/RECORD +176 -0
  172. pdflinkcheck-1.1.94.dist-info/licenses/LICENSE +24 -0
  173. pdflinkcheck-1.1.94.dist-info/licenses/LICENSE-MIT +9 -0
  174. pdflinkcheck-1.1.73.dist-info/RECORD +0 -21
  175. {pdflinkcheck-1.1.73.dist-info → pdflinkcheck-1.1.94.dist-info}/WHEEL +0 -0
  176. {pdflinkcheck-1.1.73.dist-info → pdflinkcheck-1.1.94.dist-info}/entry_points.txt +0 -0
  177. /pdflinkcheck-1.1.73.dist-info/licenses/LICENSE → /pdflinkcheck-1.1.94.dist-info/licenses/LICENSE-AGPL3 +0 -0
@@ -0,0 +1,544 @@
1
+ # Copyright (c) 2021 rdbende <rdbende@gmail.com>
2
+
3
+ # The Forest theme is a beautiful and modern ttk theme inspired by Excel.
4
+
5
+ # Repository: https://github.com/rdbende/Forest-ttk-theme/
6
+
7
+
8
+ package require Tk 8.6
9
+
10
+ namespace eval ttk::theme::forest-light {
11
+
12
+ variable version 1.0
13
+ package provide ttk::theme::forest-light $version
14
+ variable colors
15
+ array set colors {
16
+ -fg "#313131"
17
+ -bg "#ffffff"
18
+ -disabledfg "#595959"
19
+ -disabledbg "#ffffff"
20
+ -selectfg "#ffffff"
21
+ -selectbg "#217346"
22
+ }
23
+
24
+ proc LoadImages {imgdir} {
25
+ variable I
26
+ foreach file [glob -directory $imgdir *.png] {
27
+ set img [file tail [file rootname $file]]
28
+ set I($img) [image create photo -file $file -format png]
29
+ }
30
+ }
31
+
32
+ LoadImages [file join [file dirname [info script]] forest-light]
33
+
34
+ # Settings
35
+ ttk::style theme create forest-light -parent default -settings {
36
+ ttk::style configure . \
37
+ -background $colors(-bg) \
38
+ -foreground $colors(-fg) \
39
+ -troughcolor $colors(-bg) \
40
+ -focuscolor $colors(-selectbg) \
41
+ -selectbackground $colors(-selectbg) \
42
+ -selectforeground $colors(-selectfg) \
43
+ -insertwidth 1 \
44
+ -insertcolor $colors(-fg) \
45
+ -fieldbackground $colors(-selectbg) \
46
+ -font {TkDefaultFont 10} \
47
+ -borderwidth 1 \
48
+ -relief flat
49
+
50
+ ttk::style map . -foreground [list disabled $colors(-disabledfg)]
51
+
52
+ tk_setPalette background [ttk::style lookup . -background] \
53
+ foreground [ttk::style lookup . -foreground] \
54
+ highlightColor [ttk::style lookup . -focuscolor] \
55
+ selectBackground [ttk::style lookup . -selectbackground] \
56
+ selectForeground [ttk::style lookup . -selectforeground] \
57
+ activeBackground [ttk::style lookup . -selectbackground] \
58
+ activeForeground [ttk::style lookup . -selectforeground]
59
+
60
+ option add *font [ttk::style lookup . -font]
61
+
62
+
63
+ # Layouts
64
+ ttk::style layout TButton {
65
+ Button.button -children {
66
+ Button.padding -children {
67
+ Button.label -side left -expand true
68
+ }
69
+ }
70
+ }
71
+
72
+ ttk::style layout Toolbutton {
73
+ Toolbutton.button -children {
74
+ Toolbutton.padding -children {
75
+ Toolbutton.label -side left -expand true
76
+ }
77
+ }
78
+ }
79
+
80
+ ttk::style layout TMenubutton {
81
+ Menubutton.button -children {
82
+ Menubutton.padding -children {
83
+ Menubutton.indicator -side right
84
+ Menubutton.label -side right -expand true
85
+ }
86
+ }
87
+ }
88
+
89
+ ttk::style layout TOptionMenu {
90
+ OptionMenu.button -children {
91
+ OptionMenu.padding -children {
92
+ OptionMenu.indicator -side right
93
+ OptionMenu.label -side right -expand true
94
+ }
95
+ }
96
+ }
97
+
98
+ ttk::style layout Accent.TButton {
99
+ AccentButton.button -children {
100
+ AccentButton.padding -children {
101
+ AccentButton.label -side left -expand true
102
+ }
103
+ }
104
+ }
105
+
106
+ ttk::style layout TCheckbutton {
107
+ Checkbutton.button -children {
108
+ Checkbutton.padding -children {
109
+ Checkbutton.indicator -side left
110
+ Checkbutton.label -side right -expand true
111
+ }
112
+ }
113
+ }
114
+
115
+ ttk::style layout Switch {
116
+ Switch.button -children {
117
+ Switch.padding -children {
118
+ Switch.indicator -side left
119
+ Switch.label -side right -expand true
120
+ }
121
+ }
122
+ }
123
+
124
+ ttk::style layout ToggleButton {
125
+ ToggleButton.button -children {
126
+ ToggleButton.padding -children {
127
+ ToggleButton.label -side left -expand true
128
+ }
129
+ }
130
+ }
131
+
132
+ ttk::style layout TRadiobutton {
133
+ Radiobutton.button -children {
134
+ Radiobutton.padding -children {
135
+ Radiobutton.indicator -side left
136
+ Radiobutton.label -side right -expand true
137
+ }
138
+ }
139
+ }
140
+
141
+ ttk::style layout Vertical.TScrollbar {
142
+ Vertical.Scrollbar.trough -sticky ns -children {
143
+ Vertical.Scrollbar.thumb -expand true
144
+ }
145
+ }
146
+
147
+ ttk::style layout Horizontal.TScrollbar {
148
+ Horizontal.Scrollbar.trough -sticky ew -children {
149
+ Horizontal.Scrollbar.thumb -expand true
150
+ }
151
+ }
152
+
153
+ ttk::style layout TCombobox {
154
+ Combobox.field -sticky nswe -children {
155
+ Combobox.padding -expand true -sticky nswe -children {
156
+ Combobox.textarea -sticky nswe
157
+ }
158
+ }
159
+ Combobox.button -side right -sticky ns -children {
160
+ Combobox.arrow -sticky nsew
161
+ }
162
+ }
163
+
164
+ ttk::style layout TSpinbox {
165
+ Spinbox.field -sticky nsew -children {
166
+ Spinbox.padding -expand true -sticky nswe -children {
167
+ Spinbox.textarea -sticky nsew
168
+ }
169
+
170
+ }
171
+ null -side right -sticky nsew -children {
172
+ Spinbox.uparrow -side right -sticky nsew -children {
173
+ Spinbox.symuparrow
174
+ }
175
+ Spinbox.downarrow -side left -sticky nsew -children {
176
+ Spinbox.symdownarrow
177
+ }
178
+ }
179
+ }
180
+
181
+ ttk::style layout Horizontal.TSeparator {
182
+ Horizontal.separator -sticky nswe
183
+ }
184
+
185
+ ttk::style layout Vertical.TSeparator {
186
+ Vertical.separator -sticky nswe
187
+ }
188
+
189
+ ttk::style layout Card {
190
+ Card.field {
191
+ Card.padding -expand 1
192
+ }
193
+ }
194
+
195
+ ttk::style layout TLabelframe {
196
+ Labelframe.border {
197
+ Labelframe.padding -expand 1 -children {
198
+ Labelframe.label -side left
199
+ }
200
+ }
201
+ }
202
+
203
+ ttk::style layout TNotebook {
204
+ Notebook.border -children {
205
+ TNotebook.Tab -expand 1 -side top
206
+ Notebook.client -sticky nsew
207
+ }
208
+ }
209
+
210
+ ttk::style layout TNotebook.Tab {
211
+ Notebook.tab -children {
212
+ Notebook.padding -side top -children {
213
+ Notebook.label
214
+ }
215
+ }
216
+ }
217
+
218
+ ttk::style layout Treeview.Item {
219
+ Treeitem.padding -sticky nswe -children {
220
+ Treeitem.indicator -side left -sticky {}
221
+ Treeitem.image -side left -sticky {}
222
+ Treeitem.text -side left -sticky {}
223
+ }
224
+ }
225
+
226
+
227
+ # Elements
228
+
229
+ # Button
230
+ ttk::style configure TButton -padding {8 4 8 4} -width -10 -anchor center
231
+
232
+ ttk::style element create Button.button image \
233
+ [list $I(rect-basic) \
234
+ {selected disabled} $I(rect-basic) \
235
+ disabled $I(rect-basic) \
236
+ selected $I(rect-basic) \
237
+ pressed $I(rect-basic) \
238
+ active $I(rect-hover) \
239
+ ] -border 4 -sticky nsew
240
+
241
+ # Toolbutton
242
+ ttk::style configure Toolbutton -padding {8 4 8 4} -width -10 -anchor center
243
+
244
+ ttk::style element create Toolbutton.button image \
245
+ [list $I(empty) \
246
+ {selected disabled} $I(empty) \
247
+ disabled $I(empty) \
248
+ selected $I(rect-basic) \
249
+ pressed $I(rect-basic) \
250
+ active $I(rect-basic) \
251
+ ] -border 4 -sticky nsew
252
+
253
+ # Menubutton
254
+ ttk::style configure TMenubutton -padding {8 4 4 4}
255
+
256
+ ttk::style element create Menubutton.button image \
257
+ [list $I(rect-basic) \
258
+ disabled $I(rect-basic) \
259
+ pressed $I(rect-basic) \
260
+ active $I(rect-hover) \
261
+ ] -border 4 -sticky nsew
262
+
263
+ ttk::style element create Menubutton.indicator image \
264
+ [list $I(down) \
265
+ active $I(down) \
266
+ pressed $I(down) \
267
+ disabled $I(down) \
268
+ ] -width 15 -sticky e
269
+
270
+ # OptionMenu
271
+ ttk::style configure TOptionMenu -padding {8 4 4 4}
272
+
273
+ ttk::style element create OptionMenu.button image \
274
+ [list $I(rect-basic) \
275
+ disabled $I(rect-basic) \
276
+ pressed $I(rect-basic) \
277
+ active $I(rect-hover) \
278
+ ] -border 4 -sticky nsew
279
+
280
+ ttk::style element create OptionMenu.indicator image \
281
+ [list $I(down) \
282
+ active $I(down) \
283
+ pressed $I(down) \
284
+ disabled $I(down) \
285
+ ] -width 15 -sticky e
286
+
287
+ # AccentButton
288
+ ttk::style configure Accent.TButton -padding {8 4 8 4} -width -10 -anchor center -foreground #eeeeee
289
+
290
+ ttk::style element create AccentButton.button image \
291
+ [list $I(rect-accent) \
292
+ {selected disabled} $I(rect-accent-hover) \
293
+ disabled $I(rect-accent-hover) \
294
+ selected $I(rect-accent) \
295
+ pressed $I(rect-accent) \
296
+ active $I(rect-accent-hover) \
297
+ ] -border 4 -sticky nsew
298
+
299
+ # Checkbutton
300
+ ttk::style configure TCheckbutton -padding 4
301
+
302
+ ttk::style element create Checkbutton.indicator image \
303
+ [list $I(check-unsel-accent) \
304
+ {alternate disabled} $I(check-tri-basic) \
305
+ {selected disabled} $I(check-basic) \
306
+ disabled $I(check-unsel-basic) \
307
+ {pressed alternate} $I(check-tri-hover) \
308
+ {active alternate} $I(check-tri-hover) \
309
+ alternate $I(check-tri-accent) \
310
+ {pressed selected} $I(check-hover) \
311
+ {active selected} $I(check-hover) \
312
+ selected $I(check-accent) \
313
+ {pressed !selected} $I(check-unsel-pressed) \
314
+ active $I(check-unsel-hover) \
315
+ ] -width 26 -sticky w
316
+
317
+ # Switch
318
+ ttk::style element create Switch.indicator image \
319
+ [list $I(off-accent) \
320
+ {selected disabled} $I(on-basic) \
321
+ disabled $I(off-basic) \
322
+ {pressed selected} $I(on-accent) \
323
+ {active selected} $I(on-hover) \
324
+ selected $I(on-accent) \
325
+ {pressed !selected} $I(off-accent) \
326
+ active $I(off-hover) \
327
+ ] -width 46 -sticky w
328
+
329
+ # ToggleButton
330
+ ttk::style configure ToggleButton -padding {8 4 8 4} -width -10 -anchor center -foregound $colors(-fg)
331
+
332
+ ttk::style map ToggleButton -foreground \
333
+ [list {pressed selected} $colors(-fg) \
334
+ {pressed !selected} #ffffff \
335
+ selected #ffffff]
336
+
337
+ ttk::style element create ToggleButton.button image \
338
+ [list $I(rect-basic) \
339
+ {selected disabled} $I(rect-accent-hover) \
340
+ disabled $I(rect-basic) \
341
+ {pressed selected} $I(rect-basic) \
342
+ {active selected} $I(rect-accent-hover) \
343
+ selected $I(rect-accent) \
344
+ {pressed !selected} $I(rect-accent) \
345
+ active $I(rect-hover) \
346
+ ] -border 4 -sticky nsew
347
+
348
+ # Radiobutton
349
+ ttk::style configure TRadiobutton -padding 4
350
+
351
+ ttk::style element create Radiobutton.indicator image \
352
+ [list $I(radio-unsel-accent) \
353
+ {alternate disabled} $I(radio-tri-basic) \
354
+ {selected disabled} $I(radio-basic) \
355
+ disabled $I(radio-unsel-basic) \
356
+ {pressed alternate} $I(radio-tri-hover) \
357
+ {active alternate} $I(radio-tri-hover) \
358
+ alternate $I(radio-tri-accent) \
359
+ {pressed selected} $I(radio-hover) \
360
+ {active selected} $I(radio-hover) \
361
+ selected $I(radio-accent) \
362
+ {pressed !selected} $I(radio-unsel-pressed) \
363
+ active $I(radio-unsel-hover) \
364
+ ] -width 26 -sticky w
365
+
366
+ # Scrollbar
367
+ ttk::style element create Horizontal.Scrollbar.trough image $I(hor-basic) \
368
+ -sticky ew
369
+
370
+ ttk::style element create Horizontal.Scrollbar.thumb image \
371
+ [list $I(hor-accent) \
372
+ disabled $I(hor-basic) \
373
+ pressed $I(hor-hover) \
374
+ active $I(hor-hover) \
375
+ ] -sticky ew
376
+
377
+ ttk::style element create Vertical.Scrollbar.trough image $I(vert-basic) \
378
+ -sticky ns
379
+
380
+ ttk::style element create Vertical.Scrollbar.thumb image \
381
+ [list $I(vert-accent) \
382
+ disabled $I(vert-basic) \
383
+ pressed $I(vert-hover) \
384
+ active $I(vert-hover) \
385
+ ] -sticky ns
386
+
387
+ # Scale
388
+ ttk::style element create Horizontal.Scale.trough image $I(scale-hor) \
389
+ -border 5 -padding 0
390
+
391
+ ttk::style element create Horizontal.Scale.slider image \
392
+ [list $I(thumb-hor-accent) \
393
+ disabled $I(thumb-hor-basic) \
394
+ pressed $I(thumb-hor-hover) \
395
+ active $I(thumb-hor-hover) \
396
+ ] -sticky {}
397
+
398
+ ttk::style element create Vertical.Scale.trough image $I(scale-vert) \
399
+ -border 5 -padding 0
400
+
401
+ ttk::style element create Vertical.Scale.slider image \
402
+ [list $I(thumb-vert-accent) \
403
+ disabled $I(thumb-vert-basic) \
404
+ pressed $I(thumb-vert-hover) \
405
+ active $I(thumb-vert-hover) \
406
+ ] -sticky {}
407
+
408
+ # Progressbar
409
+ ttk::style element create Horizontal.Progressbar.trough image $I(hor-basic) \
410
+ -sticky ew
411
+
412
+ ttk::style element create Horizontal.Progressbar.pbar image $I(hor-accent) \
413
+ -sticky ew
414
+
415
+ ttk::style element create Vertical.Progressbar.trough image $I(vert-basic) \
416
+ -sticky ns
417
+
418
+ ttk::style element create Vertical.Progressbar.pbar image $I(vert-accent) \
419
+ -sticky ns
420
+
421
+ # Entry
422
+ ttk::style element create Entry.field image \
423
+ [list $I(border-basic) \
424
+ {focus hover} $I(border-accent) \
425
+ invalid $I(border-invalid) \
426
+ disabled $I(border-basic) \
427
+ focus $I(border-accent) \
428
+ hover $I(border-hover) \
429
+ ] -border 5 -padding {8} -sticky nsew
430
+
431
+ # Combobox
432
+ ttk::style map TCombobox -selectbackground [list \
433
+ {!focus} $colors(-selectbg) \
434
+ {readonly hover} $colors(-selectbg) \
435
+ {readonly focus} $colors(-selectbg) \
436
+ ]
437
+
438
+ ttk::style map TCombobox -selectforeground [list \
439
+ {!focus} $colors(-selectfg) \
440
+ {readonly hover} $colors(-selectfg) \
441
+ {readonly focus} $colors(-selectfg) \
442
+ ]
443
+
444
+ ttk::style element create Combobox.field image \
445
+ [list $I(border-basic) \
446
+ {readonly disabled} $I(rect-basic) \
447
+ {readonly pressed} $I(rect-basic) \
448
+ {readonly focus hover} $I(rect-hover) \
449
+ {readonly focus} $I(rect-hover) \
450
+ {readonly hover} $I(rect-hover) \
451
+ {focus hover} $I(border-accent) \
452
+ readonly $I(rect-basic) \
453
+ invalid $I(border-invalid) \
454
+ disabled $I(border-basic) \
455
+ focus $I(border-accent) \
456
+ hover $I(border-hover) \
457
+ ] -border 5 -padding {8 8 28 8}
458
+
459
+ ttk::style element create Combobox.button image \
460
+ [list $I(combo-button-basic) \
461
+ {!readonly focus} $I(combo-button-focus) \
462
+ {readonly focus} $I(combo-button-hover) \
463
+ {readonly hover} $I(combo-button-hover)
464
+ ] -border 5 -padding {2 6 6 6}
465
+
466
+ ttk::style element create Combobox.arrow image $I(down) -width 15 -sticky e
467
+
468
+ # Spinbox
469
+ ttk::style element create Spinbox.field image \
470
+ [list $I(border-basic) \
471
+ invalid $I(border-invalid) \
472
+ disabled $I(border-basic) \
473
+ focus $I(border-accent) \
474
+ hover $I(border-hover) \
475
+ ] -border 5 -padding {8 8 54 8} -sticky nsew
476
+
477
+ ttk::style element create Spinbox.uparrow image $I(spin-button-up) -border 4 -sticky nsew
478
+
479
+ ttk::style element create Spinbox.downarrow image \
480
+ [list $I(spin-button-down-basic) \
481
+ focus $I(spin-button-down-focus) \
482
+ ] -border 4 -sticky nsew
483
+
484
+ ttk::style element create Spinbox.symuparrow image $I(up) -width 15 -sticky {}
485
+ ttk::style element create Spinbox.symdownarrow image $I(down) -width 17 -sticky {}
486
+
487
+ # Sizegrip
488
+ ttk::style element create Sizegrip.sizegrip image $I(sizegrip) \
489
+ -sticky nsew
490
+
491
+ # Separator
492
+ ttk::style element create Horizontal.separator image $I(separator)
493
+
494
+ ttk::style element create Vertical.separator image $I(separator)
495
+
496
+ # Card
497
+ ttk::style element create Card.field image $I(card) \
498
+ -border 10 -padding 4 -sticky nsew
499
+
500
+ # Labelframe
501
+ ttk::style element create Labelframe.border image $I(card) \
502
+ -border 5 -padding 4 -sticky nsew
503
+
504
+ # Notebook
505
+ ttk::style configure TNotebook -padding 2
506
+
507
+ ttk::style element create Notebook.border image $I(card) -border 5
508
+
509
+ ttk::style element create Notebook.client image $I(notebook) -border 5
510
+
511
+ ttk::style element create Notebook.tab image \
512
+ [list $I(tab-basic) \
513
+ selected $I(tab-accent) \
514
+ active $I(tab-hover) \
515
+ ] -border 5 -padding {14 4}
516
+
517
+ # Treeview
518
+ ttk::style element create Treeview.field image $I(card) \
519
+ -border 5
520
+
521
+ ttk::style element create Treeheading.cell image \
522
+ [list $I(tree-basic) \
523
+ pressed $I(tree-pressed)
524
+ ] -border 5 -padding 6 -sticky nsew
525
+
526
+ ttk::style element create Treeitem.indicator image \
527
+ [list $I(right) \
528
+ user2 $I(empty) \
529
+ {user1 focus} $I(down-focus) \
530
+ focus $I(right-focus) \
531
+ user1 $I(down) \
532
+ ] -width 17 -sticky {}
533
+
534
+ ttk::style configure Treeview -background $colors(-bg)
535
+ ttk::style configure Treeview.Item -padding {2 0 0 0}
536
+
537
+ ttk::style map Treeview \
538
+ -background [list selected $colors(-selectbg)] \
539
+ -foreground [list selected $colors(-selectfg)]
540
+
541
+ # Sashes
542
+ #ttk::style map TPanedwindow -background [list hover $colors(-bg)]
543
+ }
544
+ }
pdflinkcheck/datacopy.py CHANGED
@@ -1,3 +1,5 @@
1
+ #!/usr/bin/env python3
2
+ # SPDX-License-Identifier: MIT
1
3
  # src/pdflinkcheck/datacopy.py
2
4
  import shutil
3
5
  import sys
pdflinkcheck/dev.py CHANGED
@@ -1,3 +1,5 @@
1
+ #!/usr/bin/env python3
2
+ # SPDX-License-Identifier: MIT
1
3
  # pdflinkcheck/dev.py
2
4
 
3
5
  """
@@ -7,30 +9,15 @@ help_tree_command() used click and typer internals which might change version to
7
9
 
8
10
  This portion of the codebase is MIT licensed. It does not rely on any AGPL-licensed code.
9
11
 
10
- ---
12
+ DEV_TYPER_HELP_TREE=1 pdflinkcheck help-tree
11
13
 
12
- MIT License
13
-
14
- Copyright (c) 2025 George Clayton Bennett <george.bennett@memphistn.gov>
15
-
16
- Permission is hereby granted, free of charge, to any person obtaining a copy
17
- of this software and associated documentation files (the "Software"), to deal
18
- in the Software without restriction, including without limitation the rights
19
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20
- copies of the Software, and to permit persons to whom the Software is
21
- furnished to do so, subject to the following conditions:
22
-
23
- The above copyright notice and this permission notice shall be included in all
24
- copies or substantial portions of the Software.
25
-
26
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32
- SOFTWARE.
14
+ ```
15
+ import os
16
+ os.environ["DEV_TYPER_HELP_TREE"] = "true"
33
17
 
18
+ import pdflinkcheck
19
+ subprocess.run("pdflinkcheck", "help-tree")
20
+ ```
34
21
  """
35
22
 
36
23
  import typer
@@ -106,4 +93,4 @@ def add_typer_help_tree(app,
106
93
  params_branch.add(f"[magenta]ARG: {arg_name}[/magenta]: [dim]{param.help}[/dim]")
107
94
 
108
95
  # 4. Print the final Panel containing the tree
109
- console.print(Panel(app_tree, title=f"[bold]{root_app_command.name} CLI Tree Help[/bold]", border_style="blue"))
96
+ console.print(Panel(app_tree, title=f"[bold]{root_app_command.name} CLI Help Tree[/bold]", border_style="blue"))
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env python3
2
+ # SPDX-License-Identifier: MIT
3
+ # pdflinkcheck/environment.py
4
+
5
+ from functools import cache
6
+ import subprocess
7
+ """
8
+ Environment checks.
9
+
10
+ Functions:
11
+ - is_in_git_repo()
12
+ - pymupdf_is_available()
13
+
14
+ Examples:
15
+ - is_in_git_repo() is used when deciding to force load src/pdflinkcheck/data/ files, when CLI docs is called, and if they are not found when called in the GUI,
16
+ - Default to pypdf at load if not pymupdf_is_available(). pymupdf_is_available() is useful for caching a common check in this codebase and setting up explicit logic rather than relying on try/except blocks in each instance.
17
+ """
18
+
19
+ def clear_all_caches()->None:
20
+ """Clear every @cache used in pdflinkcheck. Future work: Call from CLI using --clear-cache"""
21
+
22
+ @cache
23
+ def pymupdf_is_available() -> bool:
24
+ """Check if pymupdf is available in the current local version of pdflinkcheck."""
25
+ try:
26
+ import fitz
27
+ return True
28
+ except Exception:
29
+ # Fails if: the [full] group from [project.optional-dependencies] in pyrpoject.toml was not used when installing pdflink check. Like
30
+ # Use: `pipx install pdflinkcheck[full]` or alternative.
31
+ return False
32
+
33
+
34
+ @cache
35
+ def is_in_git_repo(path='.'):
36
+ """
37
+ Check if the given path is inside a Git repository.
38
+
39
+ Uses 'git rev-parse --is-inside-work-tree' command.
40
+
41
+ """
42
+ try:
43
+ # Run the git command, suppressing output
44
+ result = subprocess.run(
45
+ ['git', 'rev-parse', '--is-inside-work-tree'],
46
+ cwd=path,
47
+ check=True,
48
+ stdout=subprocess.PIPE,
49
+ stderr=subprocess.PIPE
50
+ )
51
+ return result.stdout.strip().decode('utf-8') == 'true'
52
+ except subprocess.CalledProcessError:
53
+ # The command fails if it's not a git repository
54
+ return False
55
+ except FileNotFoundError:
56
+ # Handle the case where the 'git' executable is not found
57
+ print("Error: 'git' command not found. Please ensure Git is installed and in your PATH.")
58
+ return False
59
+
60
+ def assess_default_pdf_library():
61
+ if pymupdf_is_available():
62
+ return "pymupdf"
63
+ else:
64
+ return "pypdf"