Skip to content

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 03 Nov 07:04
· 61 commits to main since this release
7d89023

Change lists

  • gwt-apply: detach, remove_tag and unlink_child of something the target does not have are a conflict now, not a skip, so a mistyped ID no longer passes a dry run. Add expect: "absent" to an op that may find it already gone; --verify still reads it as landed. A rerun of the same list after a crash skips the removals an earlier --apply of it logged as done. The skip line of an update_source or update_family that changes nothing now reads already has those values. attach_existing is unchanged unless it says expect: "absent".
  • gwt-apply dates: julian ... and french ... dates (julian 1700-02-11, french an XII-01-01) and text: ... text-only dates are read now; they used to be refused. Two dates with the same numbers in different calendars, or two text-only dates with different texts, are now different dates when an op compares them (the event reuse of add_event, merge_event, update_* skips), where they used to count as the same. Gregorian dates compare as before.

Added

  • gwt-rawstore doctor [--repo PATH] [--json] checks how a research repo uses the disk and prints the fix for each finding: too many packs (--max-packs, default 500), more than 50 packs outside the multi-pack-index, more than 100 promisor packs written in a day (lazy fetching), tracked binaries over --max-binary-gb (default 1), scratch or cache folders inside the work tree over --max-tmp-gb (default 1), and on macOS big folders Time Machine still backs up. It is read-only and never fetches. Exit 0 clean, 1 findings, 2 cannot run. Hard-won lessons 55 to 57 explain the partial-clone rules behind it.
  • gwt-leads --archives builtin:es,fr (country codes, or builtin:all) reads a catalogue of about 200 archives and record portals in 79 countries that ships with the tool, one TSV per country under leads/archives/ (xx holds the sources that span countries). A gap's record gets every row whose place names match a level of its place, whose record types hold it and whose years and coverage_places include it: the first as where, the rest as also (deepest level first, online sources first within a level, and a region row only for places in its own country), and the rows that match the place but cannot hold this record under outside with why, so a search there is not counted as a negative. The queue note lists up to three. Catalogue urls take {given}, {surname}, {code}, {year_from} and {year_to} besides {place} and {year}, every value URL-encoded. gwt-leads archives probe [--country CC] checks the urls live (robots.txt first, two seconds between requests) and dates the ones that answer; it is for maintainers and never runs in CI. --archives FILE reads your own file exactly as before.
  • gwt-apply ops for what lists used to write by hand through the API: update_media (description, date, path, private, and the file itself against its current MD5), delete (only an object nothing points at; --revert makes it again), merge_place, merge_source and merge_citation (the server's merge), reorder_refs, add_alternate_name and remove_alternate_name (people and places), set_external_id (FamilySearch in _FSFTID). private in every update_*; call_name, nickname, title, suffix in update_person; father and mother in update_family for a family that lacks one; source with expect_source in update_citation; a region (rect) on add_media and attach_existing; add_media refuses text, HTML, JSON and mail files unless force. ops_table() lists every op with its fields.
  • gwt-geocode, a new tool that puts coordinates on the places a tree's events use, so the Gramps Web map is not empty. gwt-geocode --snapshot DUMP --out changes.jsonl reads a gwt-check dump or gwt-apply snapshot offline and writes update_place ops with lat and long for gwt-apply, plus a TSV report (match, provider, confidence, distance). Places no event uses never get a point. Each place is looked up with its hierarchy through CartoCiudad (Spain), the BAN (France), a GeoNames dump you downloaded (any country) and Nominatim (anywhere, one request a second, cached on disk). A church, building or cemetery must lie within 5 km of its town (a street within 2 km), else it gets the town's point and the report says why; a church never matches a namesake that only shares its words; an --overrides file always wins; a point already in the tree is kept unless --recheck asks again, and even then a church's own point is never replaced by its town's.
  • gwt-read <source> control runs the source's canary searches (public, neutral queries with a known minimum of rows) without the cache, and exits 3 with a void line when one reads less. search --controls before|after|both runs them around one search, read without the cache: a short canary before means no search, after means the run is void, and the files and cached answers the search left are removed. Each source declares the marks of a page with rows and the site's own "nothing found" words; gwt_reader.classify() calls any other page unknown, a STOP. Sources now come from one registry (gwt_reader.SOURCE_MODULES, read/_template.py, gwt-read sources), and run_tests.py --mutants also reads <pkg>/mutants.d/*.txt. Existing commands, options and output are unchanged, except the new optional place_orig key on FamilySearch candidates (below).
  • gwt-read familysearch record: a 403 whose answer says Access to artifact denied or names the record's permissions without ThemisPrmAnyone, or a 403 while the --control-ark record still answers, is restricted (exit 5, an envelope with access: restricted), and the gate only logs it as a denial. A plain 403 with no --control-ark, or one whose control read fails, is still a block.
  • gwt-fscache: FSCache.forget(method, url, headers) drops one stored answer.
  • gwt-read familysearch candidates carry place_orig, the event place as the index typed it, when the record has one: the _ORIG place and parish fields, and the typed place some collections keep inside EXT_DATA or FS_UNSUPPORTED.
  • gwt-report, a new tool that reads an offline dump or snapshot. gwt-report kin DUMP A B lists every blood path between two people (through Birth, Adopted or Unknown parent links, never a marriage or a step link), the common ancestors with their Ahnentafel numbers from each side, the relationship name in English, Spanish and French (cousins of any degree and removal, half relations), how many links of each path are confirmed, probable, weak-tagged or unmarked, and implex in either pedigree. gwt-report digest --from OLD --to NEW lists the new people, events, citations and media by person and, with --root, by side and kin distance, with Gramps Web links (--base-url) and the web addresses their citations hold; --told FILE --audience NAME leaves out what that audience was told, and --mark records what it shows. Double cousins get both relationships, a big pedigree keeps both sides (the path cap drops the most distant paths first, and a digest says when it cut), tags that say débil or faible are weak by default, a digest of two different trees exits 2, and --format html keeps to the inline tags chat apps accept.
  • gwt-fetch --rawstore (on iiif, digibib and gazeta fetch) moves each downloaded image or PDF to the gwt-rawstore bucket and deletes the local copy once a HEAD confirms it. gwt-rawstore migrate --evict does the same for images already committed: upload, git rm --cached, then delete the local copies, once every upload is confirmed.
  • gwt-check finds media Gramps Web cannot show. media-non-viewable: a text, JSON, HTML, mail or archive file, shown only as a grey icon. media-file-missing: a media object whose file the server does not have (one request on a live check). With --download, which reads each image's 256 px thumbnail and needs Pillow: media-tiny (longer side under 200 px), media-uniform (a blank, grey or failed image) and media-dup-page (the same page twice on one citation, as different files). Without Pillow those three are skipped with a note. gwt-check dump --download keeps the measures in the dump for an offline check. media-uniform and media-dup-page are for information only. The answers sit in the dump under media_status, beside the objects, so gwt-apply can still write objects from a dump back. An offline check of a dump without them (an older dump, a gwt-apply snapshot) now prints media files not checked: N.
  • gwt_core.rules, the shared rules new tools import: possibly_living() returns whether a person may be alive with the reason (child-born-1990, dna-match) and the latest year they can have been born, inferring from any dated event of the person's own and of their children, grandchildren, spouses, siblings and parents, reading every date by the latest year it allows (the end of a range, no end for «after», other calendars through their day number), and counting a DNA match with no dates as living; find_ids() finds a Spanish, French, Italian or US identity number with a right check digit in text of any language; fold() folds names with a language's spelling pairs and particles; read_date() reads gwt-apply's date grammar and, with a language, written dates such as «12 de marzo de 1890». Word tables (months, record roles, life events, church-name abbreviations) for es, en, fr, it, pt, de, nl, ca, eu, gl and la ship in the package. No tool uses them yet; nothing changes for existing tools.
  • gwt-ledger keeps one name per source, proof for every negative, and requests to archives. ledger/sources.tsv is a shipped registry of sources (id, aliases, country, kind, covered years), extended by your own file (--registry or $GWT_LEDGER_SOURCES); add and check store and match the canonical id, so fs and familysearch-index rows answer a check for familysearch (the ids match gwt read's), and a source close to a known name (a typo, a spelling drift) exits 2 unless --new-source; a source far from every known name is kept as its slug with a note. New results restricted, paid, in-person, out-of-coverage and unproven; add --result none without --control-ok RUN (a passing gwt read <source> control output, or a run id; a path that names no file is refused) is stored as unproven and counts as not done. check takes --agent, --label and --date like add, and works with --person and --source alone. New: stats --by source (hit, partial and blocked rates), coverage --dump --sources [--root] (a person by source matrix with n/a outside a source's years; rows keyed by Gramps id, <id>-... or a name only one person has), import-tsv FILE --map [--control-ok RUN] (column-mapped import with a synonym map for results, the same control check as add, and rows already in the ledger skipped), request add|update|list|due and costs --by payer|archive|person (requests with channel, thread, due date, cost, currency and payer), and due --ics (an iCalendar file of every pending date). The ledger gains a tenth column, control; older files read as before, and list and check print it. gwt-queue done takes the new results too. Breaking for scripts: a source name close to a registry name exits 2 (use the known name, add an alias in a --registry file, or pass --new-source), and a none with no control run is stored as unproven. A copy of gwt_ledger.py outside the package needs sources.tsv beside it.
  • Four new gwt-read sources, open APIs with no account: openarch (Open Archives: person records from Dutch, Belgian and other archives; record ARCHIVE:UUID [--gedcom] reads every person of a record and can save its GEDCOM), wikitree (WikiTree public profiles; record ID --ancestors N), archiveorg (Internet Archive catalogue, or --fulltext inside the scanned text, with each item's IIIF manifest and OCR link) and matchid (France's deaths since 1970, the online twin of insee, optional $MATCHID_TOKEN). Each has its own gate, cache rules and canary, reads "none" only from the API's own zero count, and treats an answer of any other shape as a STOP. A 5xx or no answer from these APIs is an outage, exit 3, through the new gwt_reader.get_api(). Pages: gwt-read sources.
  • gwt-fetch iiif --image-base URL/info.json fetches a IIIF Image API base with no Presentation manifest (French departmental archives) at the native width from info.json; {page} in the URL takes each --pages number. --native does the same for each canvas of a manifest, past full/max caps such as Antenati's 10 megapixels. Both refuse an image whose width is not the one info.json gives, so an upscaled or shrunk file is never saved. Re-running a full/max download with --native in the same folder adds <name>_native.jpg beside each capped page.
  • gwt-fetch iiif turns a Canadiana viewer URL (heritage.canadiana.ca/view/<id>) into its manifest. A Canadiana run waits the 10 seconds between requests that its robots.txt asks for. The fetch page lists manifest URL templates for Riksarkivet, ANNO, the Bayerische Staatsbibliothek, the National Diet Library and the Internet Archive.
  • gwt-fetch crop IMG (--box x,y,w,h [--from-size WxH] | --grid 2x3 [--overlap 10%] | --half left|right) [--max N] [--out DIR] cuts a saved page into JPEG pieces beside it (or in --out), each with a manifest.tsv row that names the source file, its sha256 and the box. It never adds rows to a manifest.tsv another tool wrote. Needs Pillow (extra crop); without it the command exits 2.
  • gwt-import-gedcom, a new tool. gwt import-gedcom FILE --tree SNAPSHOT --batch NAME --out LIST turns a GEDCOM 5.5.1 or 7 file into a gwt-apply change list (people, families, events, places as a hierarchy matched against the tree, sources, repositories, citations, notes, external ids), with keys from the file's SHA-256 and each record's id. A person who looks like someone in the tree is held until --same @I3@=I0042 or --different "@I3@=why", people who may be living are held unless --allow-living, and Julian and French Republican dates keep their calendar. audit FILE reports encodings (each line read in another encoding than declared), look-alike records, impossible dates, orphans and broken pointers; split FILE --root ... --out-dir DIR writes one GEDCOM per root with spouses as stubs. A character an exporter cut across a CONC line is put back together, a bare line inside a note is kept as a new line of it, a Windows file labelled ANSEL or UTF-8 labelled UNICODE is read as what it is and reported, a person whose _UID is on a tree person is held as that person (new people get their _UID), look-alike couples inside the file are kept apart like look-alike people, _MARNM becomes a Married Name, and --decisions FILE / --write-decisions FILE carry hundreds of --same/--different decisions. People and places are matched through indexes, so large files and trees take seconds; gwt-apply's preflight compares new people the same way.
  • gwt-gate human <lane> <what> --url U parks every lane until a person solves a captcha, triples the gap like a hit, and runs the --notify command template ({site}, {lane}, {url}, {what}, no shell) once per parking. gwt-gate wait-clear --probe CMD ends the parking when the probe exits 0, reminds once after --timeout, then exits 5 still parked. gwt-gate auth-expired <lane> --account A --session FILE parks only the lanes that wait --account A, leaves the gap alone, and lets them go when the session file changes. --profile HOST applies a site's published limits from gate/profiles.tsv (per hour, burst and cooldown; each row cites its source). gwt-gate eta <n> estimates how long n requests take, and gwt_gate.challenge() / gwt-gate challenge FILE names the bot wall (Radware perfdrive, Imperva, Cloudflare, hCaptcha, reCAPTCHA) in a saved answer (exit 2 when it cannot read the file). clear also releases expired accounts, and a notice that fails makes human exit 1. Existing calls behave as before.
  • gwt-run, a new tool: gwt run LIST --config FILE takes one change list through a backup (gwt-apply --save-snapshot, read back whole, md5 kept), a dry run on that backup, the apply, a verify and a gwt-check check --from gate against the backup and --known, and writes run.json with every step's status. It reads the steps' JSON, never their printed lines. A conflict, an error, or a dry-run skip that is not a no-op stops it before any write (exit 3) unless the skip is named with --accept-skip; an apply that fails on a busy server is tried again up to --apply-tries times without writing anything twice; a step with no output and no API call for --stall seconds is ended (exit 5, naming the last call). Until the apply writes, running the same command again starts over from a backup that reads only what changed (an edited list is accepted); after that it goes on from the first step that is not done, and refuses a changed list, another server or tree, or a changed backup. --server-backup stays on until the server confirms a backup, so nothing is written without one. Ctrl-C or SIGTERM on gwt-run ends the running step too. gwt-apply --save-snapshot now prints one progress line per page on stderr, and its snapshots record read_started, so gwt-check --from on one no longer guesses when the read began.
  • gwt-import-dna, a new tool: gwt-import-dna --site myheritage|ftdna|gedmatch|livingdna|ancestry|other --tested I0001 --snapshot DUMP --out changes.jsonl FILE... turns a site's match list and segment file (CSV) into a change list: per match an add_person tagged dna-match (unless the match is already in the tree), an add_association with relation DNA, a Research note whose first line marks the site, the match and its cM, and a segment note in the format Gramps Web's DNA view parses (pinned in the tests to a string the server was seen to accept). A match already in the tree is found by --id-map, by an earlier import of the same site, or by another site's import with the same name and a close cM (20 cM and up); contact, e-mail, country and location columns are never read; output splits into files of at most --batch ops without splitting a match.
  • Four more gwt-read sources, open APIs with no account: riksarkivet (Sweden's National Archives: scanned church books and other volumes by parish or series, each with its reference code and IIIF manifest for gwt fetch iiif), tna (The National Archives (UK) Discovery: wills, service records and the catalogues of 2,500 UK archives, with archive lines naming which archives hold matching entries, and record ID; the gate keeps it to 120 calls an hour, under the API's daily limit), census1950 (the 1950 US census name index for every state and Puerto Rico: one row per matching schedule line with its enumeration district, line and page scan in NARA's public S3 bucket, marked machine: true when only the handwriting-recognition index read it) and digitalnz (Papers Past, New Zealand newspapers from 1839, through the DigitalNZ API, with each article's link and the words around the query). Each reads "none" only from the API's own zero count and stops on an answer of any other shape. Pages: gwt-read sources.
  • gwt-lint, a new tool: gwt-lint LIST --snapshot DUMP checks a change list against the tree before it is applied, with rules for scope (blood relatives of --root and their spouses, through birth, adoptive or unknown parent links only), protected people, possibly living people (exact dates, places, quotations, marriages, identity numbers), overlap with open lists and updates already applied, the weak tag on weak claims, and text that counts what the tree holds. Every finding has a stable code; it exits 0 clean, 1 on findings and 2 when a rule had nothing to check. gwt-lint --prove LIST runs every rule on its own broken copy of the list, under your own settings, and fails unless each could look and fires its own code.
  • gwt-corpus, a new tool that searches everything already downloaded before an agent goes back to a site. gwt-corpus update ROOT... indexes gwt-fscache answers, reader envelopes, text files and PDF pages (with pdftotext) into one SQLite FTS5 file, each row with its URL, sha256 and page. search folds accents, needs every word near the others (never OR, and a + stays a separator), and answers 0 hits with «not downloaded yet»; a raw --fts expression needs a --control that matches. sweep looks for every person of a TSV or dump with control names checked before and after (a lost control voids the run) and can write gwt-ledger rows: a match is partial (a lead), a miss is none due again at once, so a corpus miss never stops the search on the site. Particles (de, la, van) are never a surname, and two-word names, pairs and surname-and-town matches count only when rare. xref crosses a book or gazette with a dump (full name, surname pair, surname and town; dictionary headings «SURNAME, Given» flipped) and writes gwt-rank candidates with page and md5. Standard library only.
  • Four new gwt-read sources for historical newspapers, searched inside their text: bvph (Spain's Biblioteca Virtual de Prensa Histórica), delpher (Dutch newspapers 1618-1995, through the KB's open SRU API, with each article's OCR text), trove (Australian newspapers, with your own free API key in $GWT_TROVE_KEY; without it, exit 4) and kramerius (the MZK and NKP Czech digital libraries, public pages only, with each page's image URL and, at the MZK, its IIIF service for gwt fetch iiif). A row is a page or an article that mentions the words, role mention, never a person, with the words around them in text. bvph takes only a phrase in double quotes, walks every results page up to --pages (6) and prints a capped line when it stops there; a 429, the HTTP 200 skeleton the site serves when it soft-blocks, or "No hay resultados" on a later page is exit 3, never zero results. A page that shows hits but whose rows cannot be read is a STOP too, and an issue dated only in its title keeps that date. delpher and trove put the query in brackets when --from/--to add a date filter, so a quoted phrase or an OR keeps its meaning. Each source has its own gate, cache rules and canary. Pages: gwt-read sources.
  • gwt-lint evidence rules, read from the records you saved (--records DIR or records in lint.toml; nothing is fetched): quote (every quotation of four words or more is in a field of the cited record or a saved transcription, after NFC only, and shorter spans next to a cited record too; a quotation with only an image behind it needs a signed row in --readings), principal (every FamilySearch ark in an op, note text and reasons included, is the record's principal, of the right event; the fix is the principal's ark), role (the family role the list gives a persona matches the record; two parents of one sex) and placement (sacraments on a church the record's typed place names, civil events off churches). An ark with no saved record makes the rule exit 2. With no --rules, these run too; a list that cites no record and quotes nothing needs no saved records. See https://geiserx.github.io/gramps-web-toolkit/lint-evidence/
  • Five new gwt-read sources for open parish and census indexes with no API: dokuklik (the Basque archive's index of baptisms, marriages and burials in Araba, Bizkaia and Gipuzkoa), hiski (Finnish parish registers, one parish and book at a time), digitalarkivet (Norway's transcribed censuses, church books and emigrant lists), geneteka (Polish parish and civil registers; one request every 2 minutes, as its robots.txt asks, so never in bulk) and freeukgen (FreeREG parish registers and FreeCEN censuses, --site). Every row is an index entry, a lead to the record. Each source has its own gate at its site's pace, cache rules and canary; "none" is only the site's own count or words, and any other page is a STOP. Reader.get(..., data=b'...') and get_api(..., data=...) send a POST, for a site whose search is a form or a JSON body. A page that carries Cloudflare's ordinary beacon script is no longer read as a wall; a real Cloudflare challenge still is. gwt_reader.rows_check makes a results page a STOP when it shows a row the reader cannot read, so a markup change never reads as fewer rows or none. A mistake in the search that the site itself answers (a HisKi book the parish does not keep, a FreeREG search with no county, type or years) exits 64 without pausing the gate. Pages: gwt-read sources.

Changed

  • gwt-rawstore migrate --remove writes one .gitignore pattern per extension (*.jpg) in the migrated folder instead of one line per file in every subfolder.
  • gwt-check: dup-person-relative and the shared-relative branch of dup-person-fuzzy leave out two namesakes whose Primary Birth dates cannot overlap. Before, a birth that was open (before 1750), a range, estimated or calculated was ignored, so a grandfather and a grandson with one name and same-named fathers came out as a duplicate. The dates are read as intervals with the slack about, estimated and calculated dates already get; a baptism alone, an unknown birth or an unreadable birth date never sets two people apart. dup-person-birth is unchanged: a shared birth or baptism year still reports the pair.

Fixed

  • .github/scripts/check_wheel.sh failed on macOS: it compared the venv path from mktemp (/var/...) with the module paths Python reports (/private/var/...). It now compares real paths, imports every source module the registry names, and runs gwt read <source> --help for each.
  • gwt-fetch no longer downloads again a file that was moved to the bucket: a row in the folder's rawstore.tsv counts as finished.
  • gwt-fetch iiif fetches Portale Antenati again. A pasted manifest URL was sent as its own Referer, and Antenati's firewall answers 403 to anything but Referer: https://antenati.cultura.gov.it/; every dam-antenati and iiif-antenati URL now gets the portal as Referer. Other archives get the Referer they got before.