Repository navigation
Deliver open issues: repeated-names, move-value, media set, list --with, refs, and per-row FORM in media add --batch - #114
Conversation
…s twice repeated-names wraps gedcom-go's merge.RepeatedNames and FoldRepeatedNames, sharing repeated-events' report, --fold and -o handling. list names now computes same_as with gedcom.SamePersonalName instead of a local key, so both commands compare name values by the library's rule: the same words in the same order, case ignored. The list help points to repeated-names and to validate --style NAME_PART_MISMATCH for parts that disagree with the value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSVrYUmhKiXygF7aH9j9Fh
… to the shared rule Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSVrYUmhKiXygF7aH9j9Fh
…, ADDR or a NOTE from a table A tab-separated table names a tag path (or *.<TAG> for any event), the exact whole value and an action: prepend PLAC (removing the PLAC's MAP), to ADDR, to PLAC, or to NOTE with a prefix. A line the action cannot be applied to, or a move that adds a validation finding, stops the write; a row that matches nothing is reported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSVrYUmhKiXygF7aH9j9Fh
…an empty move-value table A FORM or TRAN under the PLAC describes the old value, so prepending to it is refused as "described". Prepending to an empty PLAC no longer leaves a trailing separator. A table with no header row is an error rather than a silent no-op. Refusal reasons are named constants, and the text report no longer splices a format string. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSVrYUmhKiXygF7aH9j9Fh
media set --obje <xref> --path <path> [--form <form>], or --batch rows of xref, path and an optional FORM, fills the FILE of an OBJE record in place, so the record keeps its xref, title and links. A FILE holding another path needs --replace, a record with several FILE lines is refused, --root checks each path as media add does, and a batch is applied whole or not at all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSVrYUmhKiXygF7aH9j9Fh
media set now reports the path FILE holds after the edit, so a FILE that already named the path under another spelling is reported as spelled. The decision to write FILE is recorded when the row is checked rather than re-derived when it is applied, and the help says "set" also covers a FORM-only change. Tests cover a FORM-only change and the GEDCOM 5.5 layout with FORM beside FILE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSVrYUmhKiXygF7aH9j9Fh
A record type's listing takes a repeatable --with <path> and prints each record's values at the path after the type's own fields: every line in file order with its CONT and CONC lines folded in, joined by " | " in text and as an array under a "with" object in JSON. A path under another record type is a usage error, and a record --redact-living hides has no values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSVrYUmhKiXygF7aH9j9Fh
…olumns JSON keys the --with values by path, so a repeated path was one key there but two columns in text. It is now a usage error. The test for the other record types checks whole rows, for each type, not only the first column. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSVrYUmhKiXygF7aH9j9Fh
refs prints one line per pointer to each record given: the record holding it, the tag path to it and the record pointed at, as delete reports the pointers that stop it. It reads xrefs from stdin with "-", reads the file once, and prints JSON with delete's from, path and to keys. The output is xrefs and tag paths only, so --redact-living does not change it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSVrYUmhKiXygF7aH9j9Fh
A batch row may give a fourth column, FORM, used for the new OBJE record it creates. With --batch, --form now only fills in rows that give no FORM and whose extension gives none, so one batch can mix file types. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSVrYUmhKiXygF7aH9j9Fh
Single-row mode no longer clears the --form value to keep it out of the fallback, and a test pins the single-row "pass --form" hint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSVrYUmhKiXygF7aH9j9Fh
Unverified review dismissalsReview of #93 at
|
Unverified review dismissalsReview of #107 at
|
Unverified review dismissalsReview of #108 at
|
Unverified review dismissalsReview of #109 at
|
Unverified review dismissalsReview of #110 at
|
Unverified review dismissalsReview of #111 at
|
Summary
This branch delivers six open issues. It adds four commands:
repeated-namesreports and folds names a person holds twice,move-valuemoves event values into their PLAC, ADDR or a NOTE from a table,media setsets the FILE of an existing OBJE record, andrefslists the records that point at an xref. It also addslist --with, which prints chosen tag paths as extra columns, and letsmedia add --batchrows carry their own FORM. Each command wraps gedcom-go v3.17.0 calls, andmake checkpasses on the rebased branch.Changes
Issues
#93 — list: show name parts and a person's later names; report names repeated in one record
Refs #93
list namesalready had these columns before this branch.TestListNamesandTestListNamesEmptyValuecheck them.TestListNamesandTestListNamesRepeatedcheck it.list --repeated namesand the newrepeated-namescommand report repeats, andvalidate --style NAME_PART_MISMATCHreports mismatches (TestRepeatedNamesReport). This departs from the issue:same_asnow usesgedcom.SamePersonalName, which compares words and treats punctuation as a separator. The issue asks to ignore punctuation, so "O'Brien" no longer equals "OBrien" (TestListNamesSameAsWords). For that reason this PR uses Refs, not Closes.--redact-livingapplies to the listing and the report): met.TestListNamesRedactLivingcovers it, along with therepeated-namesrows inTestRedactLivingand the unredacted-file check inTestRedactLivingWholeFiles.--helpstates the fields and the equality rule): met. Both commands' help embeds the sharedsamePersonalNameHelp.TestListHelpHasExampleandTestRepeatedNamesHelpassert it.TestRepeatedNamesFoldcompares the whole output file and the input. There is awriteCommandsround-trip entry.#107 — move-value: move an event line's value into its PLAC, ADDR or a NOTE, from a table
Closes #107
TestMoveValueChangesOnlyTheMatchedLines/"prepend PLAC" compares the whole output.*.PLAC"at home" to NOTE with a prefix):TestMoveValueChangesOnlyTheMatchedLines/"to NOTE with a prefix".to ADDRonto an existing ADDR, orprepend PLACwith no PLAC, exits 1, writes nothing and names the record and line):TestMoveValueRefused.TestMoveValueRefused"a MAP under the line" and "a CITY under the line".TestMoveValueJSON(unmatched=[4]).-o -splits stdout from stderr):TestMoveValueChangesOnlyTheMatchedLines,TestMoveValueJSONandTestMoveValueStdout.--redact-livinghides values, the file is not redacted, the README names the command):living_test.gorows and the README conventions list.cli.Run; the command is inwriteCommandsandTestRedactLiving; help and README document it):roundtrip_test.go,living_test.go, the Long help and the README### move-valuesection.#108 — media: set the FILE of an existing OBJE record
Closes #108
TestMediaSetEmptyFilebyte comparison. There is awriteCommands"media set" entry.--rootrefuses an absolute path, a path that climbs out and a missing file; exits 1, writes nothing, names the row):TestMediaSetRefusesandTestMediaSetBatchAllOrNone.TestMediaSetRefuses,TestMediaSetReplaceand the second run inTestMediaSetEmptyFile.TestMediaSetBatchandTestMediaSetBatchAllOrNone.cli.Run; inwriteCommands): the Long help, the README table row and section, the redaction list androundtrip_test.go.#109 — list: print chosen tag paths as extra columns
Closes #109
--withflag.TestListWithchecks the issue's example and every record type.TestListWithcovers empty cells, " | " joins in text and arrays in JSON.TestListWithWrongPath. This departs from the issue: it exits 2 (ExitUsage, this CLI's code for command-line mistakes, the same aslist --tag), not 1.--redact-living): the "list with" and "list with json" rows inTestRedactLiving.--helpstates the column order, repeated values and CONT handling): the list help text, checked byTestListHelpHasExample.#110 — List the records that point at an xref
Closes #110
TestRefsText"one xref" and "header".TestRefsText/"nothing points at it" andTestRefsExitCodes/"no such record".-on stdin in one pass, each line naming its target):TestRefsText/"several" andTestRefsStdin.--format jsonuses delete's keys):TestRefsJSONchecksfrom,pathandto, and[]when empty.--redact-livingleaves output unchanged, and the help says so): aliving_test.gorow, the Long help and the README. Note: a pointer a record holds to itself is not listed, and the help says so.#111 — media add --batch: take a FORM per row
Closes #111
TestMediaAddBatchForm. The existing batch tests pass unchanged.--batch,--formfills in only rows that give no FORM and have an unknown extension;--helpsays so):TestMediaAddBatchForm, the flag help and the README.TestMediaAddBatchForm.TestMediaAddBatchFormUnknown.Panel Review
Each issue was panel-reviewed separately (6 personas) and valid findings fixed before integration.
🤖 Generated with Claude Code
Claude-Session: https://claude.ai/code/session_01CSVrYUmhKiXygF7aH9j9Fh