codendium 1.0.0__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 (45) hide show
  1. codendium-1.0.0.dist-info/METADATA +332 -0
  2. codendium-1.0.0.dist-info/RECORD +45 -0
  3. codendium-1.0.0.dist-info/WHEEL +5 -0
  4. codendium-1.0.0.dist-info/entry_points.txt +6 -0
  5. codendium-1.0.0.dist-info/licenses/LICENSE +201 -0
  6. codendium-1.0.0.dist-info/top_level.txt +1 -0
  7. copyright_deposit/__init__.py +15 -0
  8. copyright_deposit/__main__.py +34 -0
  9. copyright_deposit/assets/__init__.py +5 -0
  10. copyright_deposit/assets/fonts/README.md +31 -0
  11. copyright_deposit/assets/logo.svg +26 -0
  12. copyright_deposit/cli.py +314 -0
  13. copyright_deposit/config.py +269 -0
  14. copyright_deposit/core/__init__.py +1 -0
  15. copyright_deposit/core/deposit.py +117 -0
  16. copyright_deposit/core/discovery.py +260 -0
  17. copyright_deposit/core/encoding.py +136 -0
  18. copyright_deposit/core/languages.py +190 -0
  19. copyright_deposit/core/layout.py +349 -0
  20. copyright_deposit/core/lineranges.py +219 -0
  21. copyright_deposit/core/manifest.py +282 -0
  22. copyright_deposit/core/metrics.py +279 -0
  23. copyright_deposit/core/ordering.py +349 -0
  24. copyright_deposit/core/pipeline.py +386 -0
  25. copyright_deposit/core/redaction.py +162 -0
  26. copyright_deposit/core/render.py +242 -0
  27. copyright_deposit/core/scanning/__init__.py +61 -0
  28. copyright_deposit/core/scanning/secrets.py +181 -0
  29. copyright_deposit/core/scanning/thirdparty.py +190 -0
  30. copyright_deposit/core/strip/__init__.py +337 -0
  31. copyright_deposit/core/strip/cfamily_strip.py +235 -0
  32. copyright_deposit/core/strip/pygments_strip.py +85 -0
  33. copyright_deposit/core/strip/python_strip.py +131 -0
  34. copyright_deposit/gui/__init__.py +1 -0
  35. copyright_deposit/gui/app.py +34 -0
  36. copyright_deposit/gui/branding.py +83 -0
  37. copyright_deposit/gui/history.py +192 -0
  38. copyright_deposit/gui/main_window.py +617 -0
  39. copyright_deposit/gui/panels/__init__.py +1 -0
  40. copyright_deposit/gui/panels/estimate.py +166 -0
  41. copyright_deposit/gui/panels/files.py +635 -0
  42. copyright_deposit/gui/panels/identification.py +193 -0
  43. copyright_deposit/gui/panels/options.py +445 -0
  44. copyright_deposit/gui/panels/preflight.py +260 -0
  45. copyright_deposit/gui/workers.py +96 -0
@@ -0,0 +1,332 @@
1
+ Metadata-Version: 2.4
2
+ Name: codendium
3
+ Version: 1.0.0
4
+ Summary: Codendium - builds US Copyright Office compliant source-code deposit PDFs from a source tree.
5
+ Author: ami-a
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/ami-a/codendium
8
+ Project-URL: Repository, https://github.com/ami-a/codendium
9
+ Project-URL: Issues, https://github.com/ami-a/codendium/issues
10
+ Keywords: copyright,registration,deposit,source-code,pdf,compendium,intellectual-property,legal
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Environment :: X11 Applications :: Qt
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Legal Industry
16
+ Classifier: Natural Language :: English
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Topic :: Printing
24
+ Classifier: Topic :: Software Development :: Documentation
25
+ Classifier: Topic :: Text Processing :: Markup
26
+ Requires-Python: >=3.10
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Requires-Dist: reportlab>=4.0
30
+ Requires-Dist: pygments>=2.7
31
+ Requires-Dist: charset-normalizer>=2.0
32
+ Requires-Dist: pathspec>=0.9
33
+ Provides-Extra: gui
34
+ Requires-Dist: PySide6>=6.8.1; extra == "gui"
35
+ Provides-Extra: test
36
+ Requires-Dist: pytest>=7.4; extra == "test"
37
+ Requires-Dist: pypdf>=4.0; extra == "test"
38
+ Provides-Extra: lint
39
+ Requires-Dist: ruff>=0.5; extra == "lint"
40
+ Provides-Extra: build
41
+ Requires-Dist: build>=1.2; extra == "build"
42
+ Requires-Dist: twine>=6.1; extra == "build"
43
+ Requires-Dist: trove-classifiers>=2024.1.1; extra == "build"
44
+ Provides-Extra: dev
45
+ Requires-Dist: codendium[build,gui,lint,test]; extra == "dev"
46
+ Dynamic: license-file
47
+
48
+ <div align="center">
49
+
50
+ <img src="https://raw.githubusercontent.com/ami-a/codendium/main/copyright_deposit/assets/logo.svg" alt="Codendium" width="104">
51
+
52
+ # Codendium
53
+
54
+ **Turn a source tree into a US Copyright Office compliant deposit PDF — and know the page count before you render it.**
55
+
56
+ [![CI](https://github.com/ami-a/codendium/actions/workflows/ci.yml/badge.svg)](https://github.com/ami-a/codendium/actions/workflows/ci.yml)
57
+ [![PyPI](https://img.shields.io/pypi/v/codendium?label=PyPI)](https://pypi.org/project/codendium/)
58
+ [![Python](https://img.shields.io/pypi/pyversions/codendium?label=Python)](https://pypi.org/project/codendium/)
59
+ [![Downloads](https://static.pepy.tech/badge/codendium)](https://pepy.tech/project/codendium)
60
+ [![Visits](https://hits.sh/github.com/ami-a/codendium.svg?label=visits)](https://hits.sh/github.com/ami-a/codendium/)
61
+
62
+ [![Licence](https://img.shields.io/badge/Licence-Apache_2.0-D22128?style=flat-square&logo=apache&logoColor=white)](https://github.com/ami-a/codendium/blob/main/LICENSE)
63
+ [![GUI](https://img.shields.io/badge/GUI-PySide6-41CD52?style=flat-square&logo=qt&logoColor=white)](https://doc.qt.io/qtforpython/)
64
+ [![PDF](https://img.shields.io/badge/PDF-ReportLab-005C9C?style=flat-square)](https://www.reportlab.com/)
65
+ [![Highlighting](https://img.shields.io/badge/Lexing-Pygments-FFD43B?style=flat-square&logoColor=black)](https://pygments.org/)
66
+ [![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-64748B?style=flat-square)](https://github.com/ami-a/codendium#install)
67
+
68
+ </div>
69
+
70
+ ---
71
+
72
+ ## The problem this solves
73
+
74
+ To register software copyright in the United States you must deposit "identifying
75
+ portions" of your source code, and the Copyright Office is exacting about what
76
+ that means. The *Compendium of U.S. Copyright Office Practices* (Third) requires
77
+ the program title and version on the first page, monospaced type at roughly
78
+ 9–10 pt, **about 40 lines per page**, continuous page numbering and clear file
79
+ paths. Then §721.6 adds the rule that governs everything else: if the program
80
+ runs to more than 50 pages, you deposit **the first 25 pages and the last 25**
81
+ — not a selection of your choosing.
82
+
83
+ Doing that by hand from a real multi-file project is slow and easy to get wrong.
84
+ Worse, the number that decides which rule applies — the page count — is
85
+ invisible until you have already built the PDF. So you build it, discover you
86
+ are at 62 pages, change something, and build it again.
87
+
88
+ **Codendium turns that into one step.** Point it at a folder; it discovers the
89
+ source, puts it in the order you want, optionally strips comments, lays it on a
90
+ compliant grid, and tells you the exact page count *before* rendering anything.
91
+ Then it writes both the complete PDF for your records and the filing copy with
92
+ §721.6 already applied, plus a manifest recording exactly what went in.
93
+
94
+ It is useful if you are an individual developer, a small studio or a law firm
95
+ preparing a software registration, and you would rather not assemble a
96
+ 200-page deposit in a word processor.
97
+
98
+ ---
99
+
100
+ ## How it works
101
+
102
+ <div align="center">
103
+ <img src="https://raw.githubusercontent.com/ami-a/codendium/main/docs/flow.svg" alt="Pipeline: discover, order, strip, then a shared layout stage feeding either the estimator or the renderer" width="100%">
104
+ </div>
105
+
106
+ The page grid is fixed and the font is monospaced, so **page count is a pure
107
+ function of the character stream**. Estimating runs the same discovery,
108
+ ordering, stripping and layout the renderer runs, and stops just before writing
109
+ the file. The estimate is therefore not a projection of the page count — it *is*
110
+ the page count, and the test suite asserts that equality against the rendered
111
+ PDF across seven different layout configurations.
112
+
113
+ ---
114
+
115
+ ## Install
116
+
117
+ ```bash
118
+ pip install codendium # CLI only
119
+ pip install "codendium[gui]" # CLI + desktop GUI
120
+ ```
121
+
122
+ Python 3.10 or newer. On Windows use the `py` launcher in place of `python`.
123
+
124
+ The GUI needs PySide6; **the CLI does not**, so on a headless machine or in CI
125
+ `pip install codendium` pulls only the four runtime dependencies.
126
+
127
+ From source instead:
128
+
129
+ ```bash
130
+ git clone https://github.com/ami-a/codendium.git
131
+ cd codendium
132
+ pip install -e ".[dev]" # everything, including the test suite
133
+ ```
134
+
135
+ ---
136
+
137
+ ## Quick start
138
+
139
+ ```bash
140
+ python -m copyright_deposit # opens the GUI
141
+ ```
142
+
143
+ Or from the command line:
144
+
145
+ ```bash
146
+ # Propose an order from the code's own structure
147
+ python -m copyright_deposit suggest-order <folder> --write order.txt
148
+
149
+ # Exact page count, no PDF written, plus the comment-policy comparison
150
+ python -m copyright_deposit estimate <folder> --order-file order.txt --what-if
151
+
152
+ # Build it
153
+ python -m copyright_deposit build <folder> --order-file order.txt \
154
+ --name "My Program" --program-version 1.2.0 \
155
+ --owner "Jane Developer" --revision auto -o out
156
+ ```
157
+
158
+ `build` exits non-zero and writes nothing if it finds credentials in the
159
+ selected files, which makes it safe to run unattended.
160
+
161
+ ### What you get
162
+
163
+ | File | Purpose |
164
+ |---|---|
165
+ | `deposit_full.pdf` | The complete program, for your records |
166
+ | `deposit_deposit.pdf` | The filing copy, with §721.6 applied |
167
+ | `deposit_manifest.json` | Every file, its SHA-256, and the pages it landed on |
168
+ | `deposit_summary.txt` | Readable audit trail, plus the statement to give the Office |
169
+
170
+ ---
171
+
172
+ ## The application
173
+
174
+ <div align="center">
175
+ <img src="https://raw.githubusercontent.com/ami-a/codendium/main/docs/screenshot-estimate.png" alt="The estimate tab: 205 pages, the §721.6 split, the statement for the application, and page counts under four comment policies" width="100%">
176
+ </div>
177
+
178
+ The estimate answers the question that actually matters — *what do I change to
179
+ get under 50 pages and deposit the whole program?*
180
+
181
+ ```
182
+ Keep everything 236 pages (first 25 + last 25)
183
+ Strip comments 229 pages (first 25 + last 25)
184
+ Strip comments + docstrings 217 pages (first 25 + last 25)
185
+ Strip all + collapse blanks 205 pages (first 25 + last 25)
186
+ ```
187
+
188
+ <div align="center">
189
+ <img src="https://raw.githubusercontent.com/ami-a/codendium/main/docs/screenshot-files.png" alt="The files tab: drag-ordered file list with language, line counts, per-file line ranges and the pages each file occupies" width="100%">
190
+ </div>
191
+
192
+ The file list *is* the order list. Drag rows, or let **Suggest order** build one
193
+ from the entry points and the import/`#include` graph. Files nobody named are
194
+ appended and flagged, so an automatic decision never passes for a deliberate
195
+ one, and the Pages column shows which files fall inside the omitted middle —
196
+ code the Office will never see.
197
+
198
+ ---
199
+
200
+ ## Depositing only part of a file
201
+
202
+ Give any file a line range and only those lines are deposited — the **Deposit
203
+ lines** column in the GUI, or `--lines` on the command line:
204
+
205
+ ```bash
206
+ python -m copyright_deposit build <folder> --lines "src/core.py=1-50,120-200"
207
+ ```
208
+
209
+ Accepted forms: `1-50, 120-200` (blocks), `12` (one line), `305-` (to the end),
210
+ `-40` (from the start). Overlapping ranges are merged; out-of-range ones are
211
+ clamped or reported.
212
+
213
+ **Line numbers are the ones in your editor** — the original file's, not
214
+ positions after comments were stripped. An extract is then marked twice, so no
215
+ reader can mistake it for a whole file:
216
+
217
+ ```
218
+ FILE: src/core.py
219
+ PARTIAL FILE - lines 1-50, 120-200 of 380 included
220
+ ------------------------------------------------------------
221
+ def public_api(value):
222
+ return _compute(value)
223
+ - - - - - - [ lines 51-119 omitted (69 lines) ] - - - - - -
224
+ def _compute(value):
225
+ ```
226
+
227
+ One thing the markers deliberately do *not* claim: lines removed by the comment
228
+ policy are **not** reported as omitted. If stripping deleted lines 1–2, you did
229
+ not omit them — so no marker appears. Elisions are computed from your ranges
230
+ against the file's true length, never from which lines happened to survive.
231
+
232
+ ---
233
+
234
+ ## Stripping code without breaking it
235
+
236
+ Strippers never rewrite source. They *classify* byte ranges as comment or
237
+ docstring, and a shared routine removes those ranges — so the transform is
238
+ provably subtractive.
239
+
240
+ - **Python** — `tokenize` for comments, `ast` for docstrings, so a `#` inside a
241
+ string cannot be mistaken for a comment. Afterwards the original and stripped
242
+ ASTs are compared; on any difference the file is kept verbatim and a warning
243
+ is raised.
244
+ - **Everything else** — Pygments, but only after its token stream is verified to
245
+ reconstruct the source exactly. `Comment.Preproc` is never removed: C lexers
246
+ classify `#include` and `#define` as comments, and deleting those would gut
247
+ the deposit.
248
+ - **Fallback** — a hand-written C-family state machine handling raw strings
249
+ (`R"tag( */ )tag"`), C# verbatim strings, Rust `r#"…"#`, template literals,
250
+ line splicing, and JavaScript regex literals containing `//`.
251
+
252
+ A docstring that is the only statement in a function is never removed — that
253
+ would leave an empty suite and turn valid source into a syntax error.
254
+
255
+ ---
256
+
257
+ ## Safeguards
258
+
259
+ | Check | Why it exists |
260
+ |---|---|
261
+ | **Secret / PII scan** | A deposit becomes a public record. Anything left in the code is readable by anyone who inspects the filing, so high-severity findings block the build until redacted or acknowledged. |
262
+ | **Third-party detector** | A registration covers only your own authorship. Flags foreign copyright holders, SPDX licences and generated files — and reads *only the comment layer*, so prose and code never trigger it. |
263
+ | **Redaction (§721.7)** | Blocked-out text is never written into the PDF, only a filled rectangle, so it cannot be copied or extracted. Line count is unchanged, so pagination cannot shift. The 49 % limit is checked. |
264
+ | **Reproducibility** | Identical settings and sources produce a byte-identical PDF, so a re-run proves what was filed. |
265
+
266
+ ---
267
+
268
+ ## Page grid
269
+
270
+ Letter (or A4), 0.75 in margins, Courier 9.5 pt, 40 lines per page, 88 columns.
271
+
272
+ Courier is a PDF base-14 face: guaranteed monospaced, rendered identically by
273
+ every viewer, with no embedding or font-redistribution question — which is what
274
+ you want in a document you are filing. To use something else, point `--font` at
275
+ a monospaced `.ttf` or drop one in
276
+ [`copyright_deposit/assets/fonts/`](https://github.com/ami-a/codendium/tree/main/copyright_deposit/assets/fonts/). A
277
+ proportional font is rejected rather than silently breaking the grid, and
278
+ glyphs the font cannot draw become `?` with a warning rather than vanishing.
279
+
280
+ Overlong lines wrap — never truncate — and the wrap is counted in the estimate.
281
+
282
+ ---
283
+
284
+ ## Dependencies
285
+
286
+ | Package | Version | Licence | Used for |
287
+ |---|---|---|---|
288
+ | [reportlab](https://www.reportlab.com/) | ≥ 4.0 | BSD | PDF generation |
289
+ | [Pygments](https://pygments.org/) | ≥ 2.7 | BSD-2-Clause | Comment classification for ~30 languages |
290
+ | [charset-normalizer](https://github.com/jawah/charset_normalizer) | ≥ 2.0 | MIT | Deterministic source decoding |
291
+ | [pathspec](https://github.com/cpburnz/python-pathspec) | ≥ 0.9 | MPL-2.0 | `.gitignore` matching |
292
+ | [PySide6](https://doc.qt.io/qtforpython/) | ≥ 6.8.1 | LGPL-3.0 | GUI (optional) |
293
+
294
+ PySide6 is LGPL. That imposes nothing on you for source use or a normal
295
+ `pip install`, but it is worth knowing the day anyone freezes this into a
296
+ distributed binary.
297
+
298
+ ---
299
+
300
+ ## Tests
301
+
302
+ ```bash
303
+ pip install -e ".[test]"
304
+ python -m pytest
305
+ ```
306
+
307
+ 175 tests covering stripper correctness on adversarial input, AST equivalence,
308
+ grid compliance, both §721.6 branches, redaction non-extractability, byte-level
309
+ reproducibility, line-range selection and elision marking, order resolution,
310
+ scanner false positives, and settings/history round-trips.
311
+
312
+ The estimate-equals-render property is asserted directly: the estimated page
313
+ count is compared against `len(PdfReader(...).pages)` of the file actually
314
+ written.
315
+
316
+ ---
317
+
318
+ ## Limitations
319
+
320
+ - Comment classification is verified for Python and validated for C-family and
321
+ Pygments-supported languages; an unrecognised language is deposited verbatim
322
+ rather than guessed at.
323
+
324
+ ---
325
+
326
+ ## Licence
327
+
328
+ [Apache License 2.0](https://github.com/ami-a/codendium/blob/main/LICENSE) — Copyright 2026 [ami-a](https://github.com/ami-a).
329
+
330
+ **Codendium prepares a deposit. It is not legal advice.** Whether a particular
331
+ deposit satisfies the Copyright Office for a particular work is a judgement for
332
+ you or your attorney to make.
@@ -0,0 +1,45 @@
1
+ codendium-1.0.0.dist-info/licenses/LICENSE,sha256=w91D0CwuTwkrPo69WRpHivw9A626zFdLyNGdhfn5A1U,11335
2
+ copyright_deposit/__init__.py,sha256=1TC21WoTwXcXPDUmKNp2HHHVmSGlBRO6Eqb8hHdwZJM,507
3
+ copyright_deposit/__main__.py,sha256=l0EvlJ28LoOHhzOtXoD0808cHiVlkhVzp1qrj95G6Ak,823
4
+ copyright_deposit/cli.py,sha256=lWy88tmVVVgrUAZj-6URxjhf0Ez7_IUkgBZxbqlivd0,12364
5
+ copyright_deposit/config.py,sha256=cVj7rLaTm0-vAFdutx76e8otcdcFnhTxasX2BrLqA1I,9649
6
+ copyright_deposit/assets/__init__.py,sha256=k4ud6oT02zBR74heVVNTPTIelAXB42Bjw1oUfsqJz6k,127
7
+ copyright_deposit/assets/logo.svg,sha256=cHc1ylNC6emqUR42N2Dn634AU8qs__-ikOv1cjE6Apo,1345
8
+ copyright_deposit/assets/fonts/README.md,sha256=MzkmBHwEp0yTgbMq_hsUcfTL3tABRHFfODXNLfrJRhc,1401
9
+ copyright_deposit/core/__init__.py,sha256=TKzZr07l1TBuOrVErIKhgjRkSGfFIv7XBwTVfSnJyhM,77
10
+ copyright_deposit/core/deposit.py,sha256=o8v5p79x3wENuiYgjhnWEwYtQzMHke_rubp9jtN1uCY,3977
11
+ copyright_deposit/core/discovery.py,sha256=SwuBGvwvtINi52HVDtJ7VTbbmibEsmIECQWWhAK7SOo,8809
12
+ copyright_deposit/core/encoding.py,sha256=xhffQXwKbHf2RYOcTAk-qRXXKRzcWIFshVDPfLyUSwo,4249
13
+ copyright_deposit/core/languages.py,sha256=rxwEDRNjgKrFqN4Ufx7iHWPN24F1FP9kmXBYjT1GEss,5861
14
+ copyright_deposit/core/layout.py,sha256=r2xrpOiX8QjeiSkyzoC9HUZpr00qW0g3lyIDkONBPl0,11749
15
+ copyright_deposit/core/lineranges.py,sha256=sjBegfR8Hpt1QsN9D2bGRkMwb2CMY0GfjjPdbhGC104,7111
16
+ copyright_deposit/core/manifest.py,sha256=joHi1UOCAYwfG_p4N_7JGX8iJ9qIf9JP0lY6iQU3ZQE,10287
17
+ copyright_deposit/core/metrics.py,sha256=vn_wUwQYkjcTvG_VT6Y_wlghoc_b5i3ZYbnaX5dZRTw,8740
18
+ copyright_deposit/core/ordering.py,sha256=S6zdGLF2zy1dnfOrffnhXNsv95JQ86yMENqTzo4oc8U,12230
19
+ copyright_deposit/core/pipeline.py,sha256=ASbev5ziXfhXx0ElYNnjTzwtAt_kfJwzAV06CpunWU8,14126
20
+ copyright_deposit/core/redaction.py,sha256=9nZXU7T5JmNfKpwrR_Zeu6RxizO9NOatA-JwhfXiIDc,5111
21
+ copyright_deposit/core/render.py,sha256=Ubd9IehbFg-IleYOCQ8rGkW7dAnPEed0K9DTujCG2ps,7994
22
+ copyright_deposit/core/scanning/__init__.py,sha256=0G9DVNnXjYTIjn8Sxn7PaXPIH79Ss6SE85gYRUM2nLc,1660
23
+ copyright_deposit/core/scanning/secrets.py,sha256=Qrrw5d7EDvxsi1G4T1jdpX0vgHw0YJ0cpDSc5c2r0_I,5985
24
+ copyright_deposit/core/scanning/thirdparty.py,sha256=RyIqIeBxrpwwqGCAs7YX5TkQuBznVt6_y90bZJzNQFg,6712
25
+ copyright_deposit/core/strip/__init__.py,sha256=xRgeLGmhtX37RRYkhjyNJ546JNnzIVcnWt1nKGjPy1g,11697
26
+ copyright_deposit/core/strip/cfamily_strip.py,sha256=rN27JdHjNyZGC4TR6hQPLfh0mUcg8JPOfQfzAS7FBvA,7471
27
+ copyright_deposit/core/strip/pygments_strip.py,sha256=MHnK7HcFjV5xpe6ZEiXH4v6GrsPa9O9egvL6l13pF3o,2865
28
+ copyright_deposit/core/strip/python_strip.py,sha256=7N8fViCnYyJ_0GnXKh_hwL7LoFoABqrunM1xuC7AKb4,4828
29
+ copyright_deposit/gui/__init__.py,sha256=wuAox1FJw_2oNmAbQRJdnlMrFzCzSxJuYjGNlLrMXRw,60
30
+ copyright_deposit/gui/app.py,sha256=iy1GGDBcG3nM8ZIsad1cEQ6wOuUXOkfi_W4p7ojP9cY,933
31
+ copyright_deposit/gui/branding.py,sha256=nkOgyskRT8NDiKqCDvCU5rQ87UiZ2yxAghbLvaA8hcA,2665
32
+ copyright_deposit/gui/history.py,sha256=XeWmcM779292qIRzuzmvKnrU5rCcUTt2k4cyZ0O2ZeU,6429
33
+ copyright_deposit/gui/main_window.py,sha256=eSUDxyt6rCuCxBluiBWFcEhPFRj4zxXtbxt-hA-ZDnc,23797
34
+ copyright_deposit/gui/workers.py,sha256=GKvYIWzXqTB7D0vj6CZyM3J123Li4ajKSYkeN4u5HYc,2900
35
+ copyright_deposit/gui/panels/__init__.py,sha256=-zlxfHl6jq4T5uOVySC5VfcBolxKcHmOy0cchFtf8rw,26
36
+ copyright_deposit/gui/panels/estimate.py,sha256=GzBce5h-mXOnEwjb8x6ntSgBTIKfVvvI2FcqL5Eua-g,6255
37
+ copyright_deposit/gui/panels/files.py,sha256=LSFOw5v5Is93G0IkJy3SBLtluNbcYBjV9_4aqtYd28Y,24219
38
+ copyright_deposit/gui/panels/identification.py,sha256=wnb3kVZ_Hh8YarPyw1yk63IBVfynvui2Oep5vVrZMK8,7494
39
+ copyright_deposit/gui/panels/options.py,sha256=69cXNGMDPVAnppO3lHMvPi1Osd1opkAP_yEENTg6p6Q,19093
40
+ copyright_deposit/gui/panels/preflight.py,sha256=VVu6DxIwJQrTwLCZM2P8-S08rQatsMTB-QTH4yj1tqA,10344
41
+ codendium-1.0.0.dist-info/METADATA,sha256=EMe5wQM6GuSwT5gZk93_4qkYj45JyarwIMAKW9RQREQ,14262
42
+ codendium-1.0.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
43
+ codendium-1.0.0.dist-info/entry_points.txt,sha256=2BSdQ9RNKafYzwWnPaiEcHXCzWSJ00q0EW-BtVuI6l4,170
44
+ codendium-1.0.0.dist-info/top_level.txt,sha256=JkhLMOi-9U7ReXxgpjbEJoC_34dmpzJokMhaO1ZrFqg,18
45
+ codendium-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,6 @@
1
+ [console_scripts]
2
+ codendium = copyright_deposit.__main__:main
3
+ copyright-deposit = copyright_deposit.cli:main
4
+
5
+ [gui_scripts]
6
+ codendium-gui = copyright_deposit.gui.app:run
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 ami-a
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1 @@
1
+ copyright_deposit
@@ -0,0 +1,15 @@
1
+ """Codendium.
2
+
3
+ Builds US Copyright Office compliant source-code deposit PDFs
4
+ (Compendium sections 721.6 and 721.7) from an arbitrary source tree.
5
+ """
6
+
7
+ __version__ = "1.0.0"
8
+
9
+ #: Product name, shown to people: window title, PDF metadata, reports.
10
+ DISPLAY_NAME = "Codendium"
11
+
12
+ #: Storage key for the settings/history directory under %APPDATA%.
13
+ #: Deliberately NOT the display name - renaming it would orphan the
14
+ #: profiles and build history of anyone who already has them.
15
+ APP_NAME = "CopyrightDepositBuilder"
@@ -0,0 +1,34 @@
1
+ """Entry point.
2
+
3
+ With no arguments the GUI opens; with arguments the CLI runs, so the same
4
+ installation serves both an operator and a build script.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ import sys
10
+
11
+
12
+ def main() -> int:
13
+ if len(sys.argv) > 1:
14
+ from .cli import main as cli_main
15
+
16
+ return cli_main()
17
+
18
+ try:
19
+ from .gui.app import run
20
+ except ImportError as exc: # PySide6 missing
21
+ print(
22
+ "The GUI needs PySide6. Install it with:\n"
23
+ " py -m pip install PySide6\n"
24
+ f"(import error: {exc})\n\n"
25
+ "Or use the command line, for example:\n"
26
+ " py -m copyright_deposit estimate <folder> --what-if",
27
+ file=sys.stderr,
28
+ )
29
+ return 1
30
+ return run()
31
+
32
+
33
+ if __name__ == "__main__":
34
+ raise SystemExit(main())
@@ -0,0 +1,5 @@
1
+ """Bundled assets.
2
+
3
+ This is a package so that ``fonts/`` is installed as package data; see
4
+ ``core.metrics._bundled_font``.
5
+ """