gramps-web-toolkit 0.2.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 (53) hide show
  1. gramps_web_toolkit-0.2.0.dist-info/METADATA +89 -0
  2. gramps_web_toolkit-0.2.0.dist-info/RECORD +53 -0
  3. gramps_web_toolkit-0.2.0.dist-info/WHEEL +4 -0
  4. gramps_web_toolkit-0.2.0.dist-info/entry_points.txt +15 -0
  5. gramps_web_toolkit-0.2.0.dist-info/licenses/LICENSE +675 -0
  6. gwt_apply/__init__.py +15 -0
  7. gwt_apply/__main__.py +3 -0
  8. gwt_apply/cli.py +391 -0
  9. gwt_apply/client.py +515 -0
  10. gwt_apply/dates.py +131 -0
  11. gwt_apply/dupes.py +250 -0
  12. gwt_apply/lock.py +138 -0
  13. gwt_apply/ops.py +1851 -0
  14. gwt_apply/revert.py +394 -0
  15. gwt_apply/snapshot.py +122 -0
  16. gwt_check/__init__.py +15 -0
  17. gwt_check/__main__.py +3 -0
  18. gwt_check/checks.py +780 -0
  19. gwt_check/cli.py +441 -0
  20. gwt_check/client.py +235 -0
  21. gwt_check/compare.py +105 -0
  22. gwt_check/dates.py +117 -0
  23. gwt_check/fill.py +117 -0
  24. gwt_check/repos.py +56 -0
  25. gwt_check/selftest.py +601 -0
  26. gwt_check/tree.py +183 -0
  27. gwt_core/__init__.py +4 -0
  28. gwt_core/cli.py +64 -0
  29. gwt_core/version.py +39 -0
  30. gwt_fetch/__init__.py +2 -0
  31. gwt_fetch/__main__.py +5 -0
  32. gwt_fetch/cli.py +77 -0
  33. gwt_fetch/digibib.py +76 -0
  34. gwt_fetch/europeana.py +74 -0
  35. gwt_fetch/gazeta.py +133 -0
  36. gwt_fetch/geo.py +51 -0
  37. gwt_fetch/iiif.py +170 -0
  38. gwt_fetch/net.py +71 -0
  39. gwt_fetch/store.py +93 -0
  40. gwt_fscache.py +200 -0
  41. gwt_gate.py +234 -0
  42. gwt_import_excel.py +540 -0
  43. gwt_leads.py +469 -0
  44. gwt_ledger.py +237 -0
  45. gwt_mh.py +875 -0
  46. gwt_mh_browser.py +299 -0
  47. gwt_mh_cli.py +434 -0
  48. gwt_pares.py +123 -0
  49. gwt_queue.py +523 -0
  50. gwt_rank.py +438 -0
  51. gwt_rawstore.py +447 -0
  52. gwt_read.py +324 -0
  53. gwt_reader.py +287 -0
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.5
2
+ Name: gramps-web-toolkit
3
+ Version: 0.2.0
4
+ Summary: Command-line tools for running AI research agents against a Gramps Web family tree without letting them write guesses into it
5
+ Project-URL: Homepage, https://github.com/GeiserX/gramps-web-toolkit
6
+ Project-URL: Documentation, https://geiserx.github.io/gramps-web-toolkit/
7
+ Project-URL: Issues, https://github.com/GeiserX/gramps-web-toolkit/issues
8
+ License-Expression: GPL-3.0-or-later
9
+ License-File: LICENSE
10
+ Keywords: ai-agents,family-tree,genealogy,gramps,gramps-web
11
+ Classifier: Environment :: Console
12
+ Classifier: Operating System :: POSIX
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Topic :: Sociology :: Genealogy
16
+ Requires-Python: >=3.11
17
+ Requires-Dist: requests>=2.28
18
+ Provides-Extra: mh
19
+ Requires-Dist: playwright>=1.40; extra == 'mh'
20
+ Description-Content-Type: text/markdown
21
+
22
+ <p align="center">
23
+ <img src="docs/images/banner.svg" alt="gramps-web-toolkit banner" width="100%">
24
+ </p>
25
+
26
+ <h1 align="center">gramps-web-toolkit</h1>
27
+
28
+ <p align="center">
29
+ <a href="https://github.com/GeiserX/gramps-web-toolkit/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/GeiserX/gramps-web-toolkit/ci.yml?style=flat-square&label=CI" alt="CI"></a>
30
+ <a href="https://geiserx.github.io/gramps-web-toolkit/"><img src="https://img.shields.io/badge/docs-site-e8b04a?style=flat-square" alt="Docs"></a>
31
+ <a href="LICENSE"><img src="https://img.shields.io/github/license/GeiserX/gramps-web-toolkit?style=flat-square" alt="License"></a>
32
+ </p>
33
+
34
+ gramps-web-toolkit is a set of command-line tools for running AI research agents against a family tree in [Gramps Web](https://www.grampsweb.org) without letting them write guesses into it. Each tool fixes a failure we hit while running about 30 research rounds over two trees of roughly 10,000 people each. The [pipeline design](docs/pipeline.md) and [every trap it taught us](docs/hard-won.md) sit next to the code.
35
+
36
+ The toolkit works for genealogy in any country. One module, `spanish-poller`, is Spain-only: it watches the Spanish Ministry of Justice sede and the DEHú notification inbox. In `gwt-fetch`, `iiif` works with any IIIF archive, while `digibib`, `gazeta` and `geo` cover Spanish sources and `europeana` searches every provider in any country (`--provider Hispana` narrows it to Spain).
37
+
38
+ ## Features
39
+
40
+ - `gwt-apply`: applies a JSON Lines change list to a tree, reads before every write, skips what is already there, and stays dry-run until you pass `--apply`
41
+ - `gwt-check`: reads the whole tree after an apply and reports orphans, dangling links, broken birth and death pointers, likely duplicates, dates that contradict each other and what changed since the last copy, with a self-test that plants every error kind
42
+ - `gwt-import-excel`: turns a research workbook into a gwt-apply change list for review
43
+ - `gwt-fetch`: downloads archive images and text without a browser, with one manifest row per file: any IIIF archive, Europeana search, plus Spanish sources (DIGIBIB, the historical Gaceta de Madrid, CartoCiudad geocoding)
44
+ - `gwt-ledger`: a shared "already searched" ledger, so parallel agents stop repeating each other's negative searches
45
+ - `gwt-queue`: a durable "what to search next" queue that hands prioritized tasks to lanes, reopens the claims of dead lanes and backs off the tasks that keep failing
46
+ - `gwt-leads`: reads a tree dump offline and lists the gaps (lines that stop, missing vitals, uncited facts), ranked with the root's direct ancestors first, as `gwt-queue` tasks
47
+ - `gwt-fscache`: an on-disk HTTP cache for rate-limited genealogy APIs that never stores a block or an auth header
48
+ - `gwt-rank`: orders record-search results by how well they fit a person in the tree, from the cached FamilySearch JSON or from page text, and never hides a row
49
+ - `gwt-mh`: MyHeritage record search, record pages and originals through a signed-in browser
50
+ - `gwt-read`: record search and records on FamilySearch and PARES, slow and cached so the account is not suspended
51
+ - `gwt-gate`: one request pace shared by every agent on a machine, which backs off on a block and lets priority lanes go first
52
+ - `gwt-rawstore`: keeps source images in an S3-compatible bucket and only a small manifest in git
53
+ - `gwt-spanish-poller` (Spain only): watches Spanish civil-registry requests and the DEHú inbox read-only, and flags cases that vanish
54
+ - `ocr-bench`: scores OCR, HTR and LLM readings of the same pages on how many names they recover
55
+
56
+ ## Quick start
57
+
58
+ Watch the toolkit refuse a duplicate in two minutes, with no server. The tree in `examples/` is a snapshot of 30 invented people, and `changes.jsonl` adds a wife and a son for Tomás Ortega Sanz, but adds Tomás again as a new person although he is already in the tree.
59
+
60
+ <!-- quick-start:begin -->
61
+ ```bash
62
+ git clone https://github.com/GeiserX/gramps-web-toolkit
63
+ cd gramps-web-toolkit
64
+ pipx install . # Python 3.11+, macOS or Linux; every Python tool, needs only requests
65
+ cd examples
66
+ gwt check selftest # plants every kind of error in a made-up tree and finds each one
67
+ gwt apply changes.jsonl --snapshot tree.json.gz --log /tmp/gwt-demo.jsonl # refused: Tomás is already I0008
68
+ gwt apply changes-fixed.jsonl --snapshot tree.json.gz --log /tmp/gwt-demo.jsonl # uses I0008: the plan goes through
69
+ gwt check check tree.json.gz # the whole tree, offline
70
+ gwt leads --root I0001 --limit 10 tree.json.gz # the gaps to research next, Lucía's ancestors first
71
+ ```
72
+ <!-- quick-start:end -->
73
+
74
+ `./demo.sh` in `examples/` runs the same commands and checks each exit code. Nothing above writes to a tree: without `--apply`, `gwt apply` only prints the plan. Every tool runs as `gwt <tool>` and keeps its old `gwt-<tool>` command too. `gwt mh` needs the `mh` extra (`pipx install '.[mh]'`) and a Chrome it reaches over CDP. `gwt-spanish-poller` needs Node 18+ and Playwright and is not in the package. PyPI gets the package with the first release. [Getting started](https://geiserx.github.io/gramps-web-toolkit/getting-started/) connects the tools to your own tree.
75
+
76
+ ## Documentation
77
+
78
+ The full documentation is at https://geiserx.github.io/gramps-web-toolkit/
79
+
80
+ - [Getting started](https://geiserx.github.io/gramps-web-toolkit/getting-started/): what each tool needs, install, connecting to a tree, a first dry run
81
+ - [The research pipeline](https://geiserx.github.io/gramps-web-toolkit/pipeline/): how agents, verifiers, a judge and a writer share one tree
82
+ - [The autonomous research loop](https://geiserx.github.io/gramps-web-toolkit/agent-loop/): the queue, leads, ledger, gate and cache wired into one loop an agent runs on its own
83
+ - [Hard-won lessons](https://geiserx.github.io/gramps-web-toolkit/hard-won/): each failure that cost us time, data or an account, and the rule that followed
84
+ - One page per tool: [gwt-apply](https://geiserx.github.io/gramps-web-toolkit/apply/), [gwt-check](https://geiserx.github.io/gramps-web-toolkit/check/), [gwt-import-excel](https://geiserx.github.io/gramps-web-toolkit/import-excel/), [gwt-leads](https://geiserx.github.io/gramps-web-toolkit/leads/), [gwt-queue](https://geiserx.github.io/gramps-web-toolkit/queue/), [gwt-ledger](https://geiserx.github.io/gramps-web-toolkit/ledger/), [gwt-rank](https://geiserx.github.io/gramps-web-toolkit/rank/), [gwt-fetch](https://geiserx.github.io/gramps-web-toolkit/fetch/), [gwt-mh](https://geiserx.github.io/gramps-web-toolkit/myheritage/), [gwt-rawstore](https://geiserx.github.io/gramps-web-toolkit/rawstore/), [ocr-bench](https://geiserx.github.io/gramps-web-toolkit/ocr-bench/), [gwt-spanish-poller](https://geiserx.github.io/gramps-web-toolkit/spanish-poller/), [gwt-gate](https://geiserx.github.io/gramps-web-toolkit/gate/), [gwt-fscache](https://geiserx.github.io/gramps-web-toolkit/fscache/)
85
+ - [Development](https://geiserx.github.io/gramps-web-toolkit/development/): running the tests, building the site, the rules for a change
86
+
87
+ ## License
88
+
89
+ [GPL-3.0-or-later](LICENSE)
@@ -0,0 +1,53 @@
1
+ gwt_apply/__init__.py,sha256=QLRPRzG1km4dvNLZ7EcN5Gmm5RK83OI4tqejG3KDYrg,487
2
+ gwt_apply/__main__.py,sha256=k1ocEWawweo1qCJWNFAAvyxz3tcY13dzvCenHszij30,48
3
+ gwt_apply/cli.py,sha256=DaGZRMTEvicsMbUf4q4P-hTCGEb8NenlsiZof2QyVlA,19881
4
+ gwt_apply/client.py,sha256=OYxJycPBsgb-9RHNLB21f0hWNqHcm9VPfvMs3jBqNgM,24230
5
+ gwt_apply/dates.py,sha256=VOPgfkiBNGRolYjhKEGu0OHs8osGcOX0nLa9GRFQnBg,4064
6
+ gwt_apply/dupes.py,sha256=YP4PoMgI2d-GQlVJEF3Ju-Cls2uq31gyAiLerv6aa6U,12686
7
+ gwt_apply/lock.py,sha256=9Cy6YHK4vEq3q7Dh3AMUhDZfZsSE6TVeNYJtAce75Kc,4970
8
+ gwt_apply/ops.py,sha256=ox_axeYnND71zhuN72JoDu1HhoohtN-3yHrDIwt5qmc,100914
9
+ gwt_apply/revert.py,sha256=NHorYE9wRsMvdgsEwS2lltA5cCdCxIpjPIcjAUfucDM,20073
10
+ gwt_apply/snapshot.py,sha256=psfShVQwgvXWd0YmrW1qzHfNxpaZ-Uby7qbaNu-Hlng,6191
11
+ gwt_check/__init__.py,sha256=tx35gRrKv3V97e-g0q6V8PHpgkd5NPy-4cSmNbVKoZQ,480
12
+ gwt_check/__main__.py,sha256=vbbfAie_PIhAqDsVuH2guoAgXfs-Tghw3ail-wgzfEY,59
13
+ gwt_check/checks.py,sha256=JWElFaLddT8MofSq8QvkBd3eo21OgEeHPk-v9Sven58,38255
14
+ gwt_check/cli.py,sha256=Cfc25KjbSwFEcloeFumt6LIF8rH7HTR--3Ifj8w41b8,24510
15
+ gwt_check/client.py,sha256=tz6Ps5c-siJ2XvH5WXAqqn7m4lV0HNLAtx7z6n0GCN0,10928
16
+ gwt_check/compare.py,sha256=nxzQIjC3rtpvYJ5D6469cVurNOkj513cxMRk7Yr8Liw,5138
17
+ gwt_check/dates.py,sha256=46wZEUAvGKkdiBq-6B3XEXrOXdCuOzGprdW5NmZ32Sk,4781
18
+ gwt_check/fill.py,sha256=oJoLnaYIsgVlyK3aG82K4yf7SsHOPjqrw9tsOfcYFVg,5361
19
+ gwt_check/repos.py,sha256=owljO5hhY3BV75rQRr37u1Azq0ufScUcKBuQzWyuF4Y,2824
20
+ gwt_check/selftest.py,sha256=AAXiA1ONZF6nnZnOohEqmMLUgJOZNSmkJlOODtVxW3M,27703
21
+ gwt_check/tree.py,sha256=X3vnMYXv2vMw8Ynoy2vLOn_BrcVSvHw3PmTjHFclCmE,7328
22
+ gwt_core/__init__.py,sha256=toI7Uc_XBYLtbTjfhcu89-VawdDFe72Dw8GVlv43g7o,140
23
+ gwt_core/cli.py,sha256=wBHxJ-XT1hDpqI7pnBjAJCsgpYX110_YLWpafA9rA8Y,2718
24
+ gwt_core/version.py,sha256=nXqqbGZO6uD8x32mPRr21QiWgcXT2oWHbUWaAClO3iY,1346
25
+ gwt_fetch/__init__.py,sha256=N-xmIYQaqj8INAyWFbgsSbuY5nNXbIX8QWv2XLOmOe0,87
26
+ gwt_fetch/__main__.py,sha256=E6Gls0DNz8GQK2K-kOUIx8cYhgANW_CH54VKrfCfs14,52
27
+ gwt_fetch/cli.py,sha256=SGrgp49pwO_A8EAR6EugDu309OSUFNJznqPpsARJniI,3664
28
+ gwt_fetch/digibib.py,sha256=Fs7jYr6kzuqTbmE0B7wlFWizTnSRRGFeWaWe9Pd2IvA,3504
29
+ gwt_fetch/europeana.py,sha256=3uMgQpRWdc6HJxjcwqNiCEygcr9p07K6PNJREFktHOI,3130
30
+ gwt_fetch/gazeta.py,sha256=Ca7Xw_ARKI4kA5D9w4qXvOS5vSuXbjAJtjDRrDpr-bI,6023
31
+ gwt_fetch/geo.py,sha256=4l2kRxZ9N3mGS4ioJeCPqTV6ZBblMmZ8BTg-uDoqt1k,2043
32
+ gwt_fetch/iiif.py,sha256=_x_uSPGyoLq44hfXSh5H7zih3odCNIyLZ4OhxtfwoeI,6574
33
+ gwt_fetch/net.py,sha256=wmy8v_aT4HbxrNFsRVV4MgJJ4MeUDwuSPy0QiL6p6BY,2751
34
+ gwt_fetch/store.py,sha256=TpORZRXcyLDmfRKfxEpNWWk_gESwTzKNUCTg7sQgQuU,3610
35
+ gwt_fscache.py,sha256=oJ25BQM3-x0xovDv_B-9Uog2t5rwNkYYP78HhJzUBCU,9223
36
+ gwt_gate.py,sha256=da0HMhPEmSBS0xKnqBazKU9IvZs0cobyzdiBzswDZ2s,11506
37
+ gwt_import_excel.py,sha256=TJiarAtNxDGZfEWdEBgKkzVHCXGQu-pu4o3ipWugnUA,27589
38
+ gwt_leads.py,sha256=UAtjjdwO70MVu-CoaNCp5OLQPRPRDfD_SrHwWVqeXMc,21707
39
+ gwt_ledger.py,sha256=fGNVtEt1vNDnjawiB1aWzEXzbElwEEbzTSvzBfJaVyU,11750
40
+ gwt_mh.py,sha256=gCFtcpTsxgC2X5SDSv5ELvTTgB4ojuMqeiC__fdWW2c,40918
41
+ gwt_mh_browser.py,sha256=miKkvMP1DYecxOziSFFqoPWceuLC2I8OPldXOc6XYxI,14120
42
+ gwt_mh_cli.py,sha256=i47XB5FuzIH_ggVV2x5zCxm_XPXfcCHSTDB9Q4rJOgY,21361
43
+ gwt_pares.py,sha256=lkcFAE85w3cEIbPMnnxje9UGSRUe3ImUTsNwkEQHvhQ,5372
44
+ gwt_queue.py,sha256=67oJau5lnqVzaXW63Uxzpc2iGp1BGp6gv8EcVu6LlCc,23329
45
+ gwt_rank.py,sha256=QTih_kPRSiqlxMnr-ytwbElx3pov2l5QmsGYBoQS6Jk,21247
46
+ gwt_rawstore.py,sha256=42VteqJxkJCSpcHpsjiG4bz6znprotFhPwZjRfU5Ii0,20870
47
+ gwt_read.py,sha256=9aJwi8lIdaReHw3yl6YjTkjIALgjchsWnKQgfiQOYlY,15104
48
+ gwt_reader.py,sha256=iZG0FITiSOrcaGdBiWZrlB2IHufuYhcnBxEnJlR0PkE,13582
49
+ gramps_web_toolkit-0.2.0.dist-info/METADATA,sha256=J8jR0JFkKMEOi6m1veHOp9DqveUq09XDe82LHPgZdic,8050
50
+ gramps_web_toolkit-0.2.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
51
+ gramps_web_toolkit-0.2.0.dist-info/entry_points.txt,sha256=wkhGHl9Mqty0Y36GXlIT5uzdShwAkO0KXD6PuVyhxuQ,423
52
+ gramps_web_toolkit-0.2.0.dist-info/licenses/LICENSE,sha256=5X8cMguM-HmKfS_4Om-eBqM6A1hfbgZf6pfx2G24QFI,35150
53
+ gramps_web_toolkit-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.4
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,15 @@
1
+ [console_scripts]
2
+ gwt = gwt_core.cli:main
3
+ gwt-apply = gwt_apply.cli:main
4
+ gwt-check = gwt_check.cli:main
5
+ gwt-fetch = gwt_fetch.cli:main
6
+ gwt-fscache = gwt_fscache:main
7
+ gwt-gate = gwt_gate:main
8
+ gwt-import-excel = gwt_import_excel:main
9
+ gwt-leads = gwt_leads:main
10
+ gwt-ledger = gwt_ledger:main
11
+ gwt-mh = gwt_core.cli:mh
12
+ gwt-queue = gwt_queue:main
13
+ gwt-rank = gwt_rank:main
14
+ gwt-rawstore = gwt_rawstore:main
15
+ gwt-read = gwt_read:main