strom-research 1.30.0-beta.2 → 1.30.0-beta.3
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.
- package/CHANGELOG.cs.md +8 -2
- package/CHANGELOG.de.md +9 -2
- package/CHANGELOG.md +9 -2
- package/CHANGELOG.pl.md +9 -2
- package/assets/lang/cs.json +1 -0
- package/assets/lang/de.json +1 -0
- package/assets/lang/pl.json +1 -0
- package/dist/brief/verify.js +1 -1
- package/dist/cli/ui.js +1 -0
- package/dist/commands/error.js +24 -3
- package/dist/commands/fixes.js +1 -1
- package/dist/commands/verify.js +10 -4
- package/dist/core/excerpt.js +4 -3
- package/dist/core/import.js +11 -10
- package/dist/core/live.js +288 -39
- package/dist/core/liveged.js +127 -2
- package/dist/core/media.js +30 -2
- package/dist/core/mediaindex.js +38 -0
- package/dist/core/origin.js +7 -4
- package/dist/core/originfix.js +175 -26
- package/dist/core/readers.js +9 -0
- package/dist/core/redact.js +8 -3
- package/dist/core/reportdata.js +2 -2
- package/dist/core/stromapp.js +6 -4
- package/dist/core/text.js +18 -0
- package/dist/core/tree.js +2 -2
- package/dist/core/verify.js +43 -4
- package/dist/gedcom/export.js +16 -5
- package/dist/gedcom/validate.js +2 -0
- package/package.json +1 -1
package/CHANGELOG.cs.md
CHANGED
|
@@ -7,7 +7,7 @@ Změny každé verze ve zkratce. Úplné poznámky a instalační řádky jsou n
|
|
|
7
7
|
|
|
8
8
|
## 1.30.0
|
|
9
9
|
|
|
10
|
-
*Připravuje se: bety do 1.30.0-beta.
|
|
10
|
+
*Připravuje se: bety do 1.30.0-beta.3. Oddíl bude úplný s vydáním.*
|
|
11
11
|
|
|
12
12
|
- **Údaje ověřené proti originálu.** Narození, křest, sňatek, úmrtí nebo pohřeb, který cituje původní záznam, ale
|
|
13
13
|
zůstává pravděpodobný nebo možný, agent ověří proti tomu originálu: podívá se na sken a údaj buď povýší na doložený,
|
|
@@ -18,6 +18,7 @@ Změny každé verze ve zkratce. Úplné poznámky a instalační řádky jsou n
|
|
|
18
18
|
uživatel v aplikaci Strom potvrdí podle skenu, agent nikdy nezmění – jen navrhne. Hodnota, kterou zadal uživatel nebo
|
|
19
19
|
která přišla z rodokmenu, se nikdy nepřepíše: co se liší, je návrh k rozhodnutí uživatele. Kolik údajů čeká, řekne
|
|
20
20
|
`strom check`, `strom doctor`, `strom stats` a `strom verify status`.
|
|
21
|
+
Potvrzení v aplikaci Strom platí pro hodnotu, kterou uživatel viděl: údaj od té doby změněný se nepotvrdí.
|
|
21
22
|
|
|
22
23
|
- **Údaje z převzatého rodokmenu jsou chráněné.** Rodokmen z jiného programu (GEDCOM) dává vodítka: agent takový údaj
|
|
23
24
|
změní jen podle záznamu, který cituje, a hodnota z rodokmenu zůstává uložená vedle („původně z rodokmenu: …“) a jde
|
|
@@ -29,6 +30,7 @@ Změny každé verze ve zkratce. Úplné poznámky a instalační řádky jsou n
|
|
|
29
30
|
`strom fixes undo origins` značky vezme zpět. Návrh, jehož hodnota se od jeho vzniku změnila (upravil ji uživatel), je
|
|
30
31
|
zastaralý: přijmout ho nelze – přes novější hodnotu se nic nezapíše –, jen uzavřít s ponechanou hodnotou. Co návrh
|
|
31
32
|
neunese (příčina změněná spolu s datem), řekne výsledek synchronizace, nikdy se neztratí.
|
|
33
|
+
Hodnota, která přišla s rodokmenem z aplikace Strom a nikdo ji od té doby nezměnil, je chráněná jako hodnota uživatele.
|
|
32
34
|
|
|
33
35
|
- **Znovu převzatý rodokmen najde své lidi.** ID, která program dal lidem a rodinám (`_UID`, `EXID`, `_FSFTID`…
|
|
34
36
|
z MyHeritage, Gramps, FamilySearch a dalších), se uchovají: rodokmen téhož programu převzatý znovu (nebo z jiného
|
|
@@ -53,7 +55,11 @@ Změny každé verze ve zkratce. Úplné poznámky a instalační řádky jsou n
|
|
|
53
55
|
|
|
54
56
|
- **Soubor pro aplikaci Strom se zase zapíše i u výzkumu s hypotézou rozhodnutou s odůvodněním:** pro aplikaci od
|
|
55
57
|
3.25.0 (nebo neznámé verze) ho `strom export gedcom` odmítl a `output/tree-strom.ged` po session zůstal starý (výzkum
|
|
56
|
-
otevřený v aplikaci přes `strom app` se to netýkalo).
|
|
58
|
+
otevřený v aplikaci přes `strom app` se to netýkalo). **Sledování velkého výzkumu živě v aplikaci Strom se otevírá
|
|
59
|
+
mnohem rychleji:** strom pro aplikaci se sestaví jednou pro každý stav výzkumu a zůstane uložený i po novém spuštění
|
|
60
|
+
mostu, a během sledování se změna ohlásí, až je její strom připravený. Most už neskončí, když je disk výzkumu na
|
|
61
|
+
chvíli nedostupný, a druhý most téhož výzkumu spuštěný navíc hned skončí a neběží dál bez povšimnutí.
|
|
62
|
+
Aplikaci, která nejnovější strom už má, se znovu nic neposílá.
|
|
57
63
|
|
|
58
64
|
- **Údaj zobrazený nebo upravený v terminálu** (`strom event show`, `strom event edit`) se vypisuje v jazyce
|
|
59
65
|
výzkumu. V aplikaci Strom už rodokmen převzatý do výzkumu nemá jako odkaz celého rodokmenu první řádek z něj:
|
package/CHANGELOG.de.md
CHANGED
|
@@ -7,7 +7,7 @@ Die Änderungen jeder Version in Kürze. Die vollständigen Hinweise und die Ins
|
|
|
7
7
|
|
|
8
8
|
## 1.30.0
|
|
9
9
|
|
|
10
|
-
*In Vorbereitung: die Betas bis 1.30.0-beta.
|
|
10
|
+
*In Vorbereitung: die Betas bis 1.30.0-beta.3. Der Abschnitt ist mit dem Release vollständig.*
|
|
11
11
|
|
|
12
12
|
- **Angaben am Original geprüft.** Angaben zu Geburt, Taufe, Heirat, Tod oder Begräbnis, die ihren ursprünglichen
|
|
13
13
|
Eintrag zitieren, aber wahrscheinlich oder möglich bleiben, prüft der Agent an diesem Original: er sieht sich den Scan
|
|
@@ -20,6 +20,7 @@ Die Änderungen jeder Version in Kürze. Die vollständigen Hinweise und die Ins
|
|
|
20
20
|
bestätigt, ändert der Agent nie – er schlägt nur vor. Ein Wert, den der Benutzer eingegeben hat oder der aus einem
|
|
21
21
|
Stammbaum kam, wird nie überschrieben: was abweicht, ist ein Vorschlag zur Entscheidung des Benutzers. Wie viele
|
|
22
22
|
Angaben warten, sagen `strom check`, `strom doctor`, `strom stats` und `strom verify status`.
|
|
23
|
+
Eine Bestätigung in der App Strom gilt für den Wert, den der Benutzer gesehen hat: eine seitdem geänderte Angabe wird nicht bestätigt.
|
|
23
24
|
|
|
24
25
|
- **Angaben aus einem übernommenen Stammbaum sind geschützt.** Ein Stammbaum aus einem anderen Programm (GEDCOM) gibt
|
|
25
26
|
Hinweise: der Agent ändert eine solche Angabe nur nach einem Eintrag, den er zitiert, und der Wert aus dem Stammbaum
|
|
@@ -34,6 +35,7 @@ Die Änderungen jeder Version in Kürze. Die vollständigen Hinweise und die Ins
|
|
|
34
35
|
Benutzer bearbeitet), ist veraltet: Er lässt sich nicht annehmen – über den neueren Wert wird nichts geschrieben –, nur
|
|
35
36
|
mit dem behaltenen Wert schließen. Was ein Vorschlag nicht tragen kann (eine zusammen mit dem Datum geänderte Ursache),
|
|
36
37
|
nennt das Ergebnis der Synchronisation, es geht nie verloren.
|
|
38
|
+
Ein Wert, der mit dem Stammbaum aus der App Strom kam und seitdem von niemandem geändert wurde, ist wie ein eigener des Benutzers geschützt.
|
|
37
39
|
|
|
38
40
|
- **Ein erneut übernommener Stammbaum findet seine Personen.** Die IDs, die ein Programm Personen und Familien gab
|
|
39
41
|
(`_UID`, `EXID`, `_FSFTID`… von MyHeritage, Gramps, FamilySearch und anderen), bleiben erhalten: ein Stammbaum desselben
|
|
@@ -63,7 +65,12 @@ Die Änderungen jeder Version in Kürze. Die vollständigen Hinweise und die Ins
|
|
|
63
65
|
- **Die Datei für die App Strom wird auch bei einer Forschung mit einer begründet entschiedenen Hypothese wieder
|
|
64
66
|
geschrieben:** für die App ab 3.25.0 (oder unbekannter Version) lehnte `strom export gedcom` sie ab, und
|
|
65
67
|
`output/tree-strom.ged` blieb nach einer Sitzung alt (eine über `strom app` in der App geöffnete Forschung war nicht
|
|
66
|
-
betroffen).
|
|
68
|
+
betroffen). **Eine große Forschung live in der App Strom zu verfolgen öffnet sich viel schneller:** der Baum für
|
|
69
|
+
die App wird für jeden Stand der Forschung einmal erstellt und bleibt gespeichert, auch nach einem Neustart der
|
|
70
|
+
Brücke, und beim Verfolgen wird eine Änderung gemeldet, sobald ihr Baum bereit ist. Die Brücke endet nicht mehr,
|
|
71
|
+
wenn das Laufwerk der Forschung kurz nicht erreichbar ist, und eine zusätzlich gestartete zweite Brücke derselben
|
|
72
|
+
Forschung endet sofort, statt unbemerkt weiterzulaufen.
|
|
73
|
+
Einer App, die den neuesten Stammbaum schon hat, wird nichts erneut gesendet.
|
|
67
74
|
|
|
68
75
|
- **Eine im Terminal gezeigte oder bearbeitete Angabe** (`strom event show`, `strom event edit`) erscheint in der
|
|
69
76
|
Sprache der Forschung. In der App Strom hat ein in die Forschung übernommener Stammbaum nicht mehr die erste Zeile
|
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,7 @@ The changes of each version in short. The full notes and the install lines are o
|
|
|
7
7
|
|
|
8
8
|
## 1.30.0
|
|
9
9
|
|
|
10
|
-
*In preparation: the betas up to 1.30.0-beta.
|
|
10
|
+
*In preparation: the betas up to 1.30.0-beta.3. The section is complete with the release.*
|
|
11
11
|
|
|
12
12
|
- **Facts checked against their originals.** A birth, a baptism, a marriage, a death or a burial that cites its
|
|
13
13
|
original record but stays probable or possible is verified by the agent against that original: it looks at the scan
|
|
@@ -19,6 +19,7 @@ The changes of each version in short. The full notes and the install lines are o
|
|
|
19
19
|
the Strom app the agent never changes – it only proposes. A value the user entered or one from a family tree is never
|
|
20
20
|
overwritten: what differs is a proposal for the user to decide. How many facts wait is said by `strom check`, `strom
|
|
21
21
|
doctor`, `strom stats` and `strom verify status`.
|
|
22
|
+
A confirmation in the Strom app holds for the value the user saw: a fact changed since is not confirmed.
|
|
22
23
|
|
|
23
24
|
- **Values from an imported family tree are guarded.** A tree from another program (GEDCOM) gives leads: the agent
|
|
24
25
|
changes such a value only by a record it cites, and the value from the family tree stays kept beside it ("originally
|
|
@@ -31,6 +32,7 @@ The changes of each version in short. The full notes and the install lines are o
|
|
|
31
32
|
marks back. A proposal whose value has changed since it was made (the user edited it) is out of date: it cannot be
|
|
32
33
|
taken – nothing is written over the newer value – only closed keeping the value. What a proposal cannot carry (a cause
|
|
33
34
|
changed together with a date) is said in the sync's result, never lost.
|
|
35
|
+
A value that came with the family tree from the Strom app and nobody has changed since is guarded as the user's own.
|
|
34
36
|
|
|
35
37
|
- **A family tree imported again finds its people.** The IDs a program gave its people and families (MyHeritage's,
|
|
36
38
|
Gramps', FamilySearch's and others' `_UID`, `EXID`, `_FSFTID`…) are kept: a tree of the same program taken in again
|
|
@@ -56,7 +58,12 @@ The changes of each version in short. The full notes and the install lines are o
|
|
|
56
58
|
|
|
57
59
|
- **The file for the Strom app is written for a research with a hypothesis decided with its reasons** again: for the
|
|
58
60
|
app from 3.25.0 (or of a version unknown) `strom export gedcom` refused it and `output/tree-strom.ged` after a session
|
|
59
|
-
stayed as it was (the research opened in the app through `strom app` was never affected).
|
|
61
|
+
stayed as it was (the research opened in the app through `strom app` was never affected). **Following a large
|
|
62
|
+
research live in the Strom app opens much faster:** the tree for the app is made once for each state of the research
|
|
63
|
+
and kept, also when the bridge starts again, and while the app follows, a change is told once its tree is ready.
|
|
64
|
+
The bridge no longer ends when the research's disk is away for a moment, and a second bridge started for the same
|
|
65
|
+
research ends at once instead of running on unseen.
|
|
66
|
+
An app that has the newest tree already is sent nothing again.
|
|
60
67
|
|
|
61
68
|
- **A fact shown or edited at the terminal** (`strom event show`, `strom event edit`) is said in the research's
|
|
62
69
|
language. In the Strom app, a family tree taken into the research no longer gives the first line of it as the
|
package/CHANGELOG.pl.md
CHANGED
|
@@ -7,7 +7,7 @@ Zmiany każdej wersji w skrócie. Pełne informacje o wydaniach i polecenia inst
|
|
|
7
7
|
|
|
8
8
|
## 1.30.0
|
|
9
9
|
|
|
10
|
-
*W przygotowaniu: bety do 1.30.0-beta.
|
|
10
|
+
*W przygotowaniu: bety do 1.30.0-beta.3. Sekcja będzie kompletna z wydaniem.*
|
|
11
11
|
|
|
12
12
|
- **Dane sprawdzane z oryginałem.** Urodzenie, chrzest, ślub, zgon lub pochówek, który cytuje pierwotny zapis, ale
|
|
13
13
|
pozostaje prawdopodobny lub możliwy, agent sprawdzi z tym oryginałem: obejrzy skan i albo podniesie daną do
|
|
@@ -19,6 +19,7 @@ Zmiany każdej wersji w skrócie. Pełne informacje o wydaniach i polecenia inst
|
|
|
19
19
|
Strom według skanu, agent nigdy nie zmienia – tylko proponuje. Wartość wpisana przez użytkownika lub pochodząca
|
|
20
20
|
z drzewa nigdy nie jest nadpisywana: to, co się różni, jest propozycją do decyzji użytkownika. Ile danych czeka, mówią
|
|
21
21
|
`strom check`, `strom doctor`, `strom stats` i `strom verify status`.
|
|
22
|
+
Potwierdzenie w aplikacji Strom dotyczy wartości, którą użytkownik widział: dana zmieniona od tego czasu nie zostaje potwierdzona.
|
|
22
23
|
|
|
23
24
|
- **Dane z przejętego drzewa są chronione.** Drzewo z innego programu (GEDCOM) daje wskazówki: agent zmienia taką daną
|
|
24
25
|
tylko według zapisu, który cytuje, a wartość z drzewa zostaje zachowana obok („pierwotnie z drzewa: …”) i można ją
|
|
@@ -31,6 +32,7 @@ Zmiany każdej wersji w skrócie. Pełne informacje o wydaniach i polecenia inst
|
|
|
31
32
|
Propozycja, której wartość zmieniła się od jej powstania (zmienił ją użytkownik), jest nieaktualna: nie można jej
|
|
32
33
|
przyjąć – nic nie zostanie zapisane na nowszej wartości – można ją tylko zamknąć, zachowując wartość. Czego propozycja
|
|
33
34
|
nie uniesie (przyczyna zmieniona razem z datą), mówi wynik synchronizacji, nigdy nie ginie.
|
|
35
|
+
Wartość, która przyszła z drzewem z aplikacji Strom i której nikt od tego czasu nie zmienił, jest chroniona jak wartość użytkownika.
|
|
34
36
|
|
|
35
37
|
- **Ponownie przejęte drzewo odnajduje swoje osoby.** ID, które program nadał osobom i rodzinom (`_UID`, `EXID`,
|
|
36
38
|
`_FSFTID`… z MyHeritage, Gramps, FamilySearch i innych), są zachowywane: drzewo tego samego programu przejęte ponownie
|
|
@@ -56,7 +58,12 @@ Zmiany każdej wersji w skrócie. Pełne informacje o wydaniach i polecenia inst
|
|
|
56
58
|
|
|
57
59
|
- **Plik dla aplikacji Strom znów się zapisuje także w badaniu z hipotezą rozstrzygniętą z uzasadnieniem:** dla
|
|
58
60
|
aplikacji od 3.25.0 (lub nieznanej wersji) `strom export gedcom` go odrzucał, a `output/tree-strom.ged` po sesji
|
|
59
|
-
zostawał stary (badania otwartego w aplikacji przez `strom app` to nie dotyczyło).
|
|
61
|
+
zostawał stary (badania otwartego w aplikacji przez `strom app` to nie dotyczyło). **Śledzenie dużego badania na
|
|
62
|
+
żywo w aplikacji Strom otwiera się dużo szybciej:** drzewo dla aplikacji powstaje raz dla każdego stanu badania i
|
|
63
|
+
zostaje zapisane, także po ponownym uruchomieniu mostu, a podczas śledzenia zmiana jest zgłaszana, gdy jej drzewo
|
|
64
|
+
jest gotowe. Most nie kończy się już, gdy dysk badania jest na chwilę niedostępny, a drugi most tego samego badania
|
|
65
|
+
uruchomiony dodatkowo kończy się od razu, zamiast działać dalej niezauważony.
|
|
66
|
+
Aplikacji, która ma już najnowsze drzewo, nic nie jest wysyłane ponownie.
|
|
60
67
|
|
|
61
68
|
- **Dana pokazana lub zmieniona w terminalu** (`strom event show`, `strom event edit`) jest wypisywana w języku
|
|
62
69
|
badania. W aplikacji Strom drzewo przejęte do badania nie ma już jako odnośnika całego drzewa pierwszego wiersza z
|
package/assets/lang/cs.json
CHANGED
|
@@ -3734,6 +3734,7 @@
|
|
|
3734
3734
|
"ui.fixes.origins.found": "Nalezeno: {found, plural, one {# údaj} few {# údaje} other {# údajů}} k označení původu",
|
|
3735
3735
|
"ui.fixes.origins.example.import": " {what} → importovaný rodokmen ({source})",
|
|
3736
3736
|
"ui.fixes.origins.example.user": " {what} → vlastní údaj uživatele",
|
|
3737
|
+
"ui.fixes.origins.example.tree": " {what} → rodokmen uživatele, od převzetí beze změny",
|
|
3737
3738
|
"ui.fixes.origins.example.source": " {source} · {title} → import {key}",
|
|
3738
3739
|
"ui.fixes.origins.example.ids": " {owner} · ID z rodokmenu ({source}, {xref})",
|
|
3739
3740
|
"ui.fixes.origins.more": " … a {n} dalších: strom fixes show {id} --json",
|
package/assets/lang/de.json
CHANGED
|
@@ -3734,6 +3734,7 @@
|
|
|
3734
3734
|
"ui.fixes.origins.found": "Gefunden: {found, plural, one {# Angabe} other {# Angaben}}, deren Herkunft zu vermerken ist",
|
|
3735
3735
|
"ui.fixes.origins.example.import": " {what} → importierter Stammbaum ({source})",
|
|
3736
3736
|
"ui.fixes.origins.example.user": " {what} → eigene Angabe des Benutzers",
|
|
3737
|
+
"ui.fixes.origins.example.tree": " {what} → Stammbaum des Benutzers, seit der Übernahme unverändert",
|
|
3737
3738
|
"ui.fixes.origins.example.source": " {source} · {title} → Import {key}",
|
|
3738
3739
|
"ui.fixes.origins.example.ids": " {owner} · die IDs aus dem Stammbaum ({source}, {xref})",
|
|
3739
3740
|
"ui.fixes.origins.more": " … {n} weitere: strom fixes show {id} --json",
|
package/assets/lang/pl.json
CHANGED
|
@@ -3734,6 +3734,7 @@
|
|
|
3734
3734
|
"ui.fixes.origins.found": "Znaleziono: {found, plural, one {# daną} few {# dane} many {# danych} other {# danych}} do oznaczenia pochodzenia",
|
|
3735
3735
|
"ui.fixes.origins.example.import": " {what} → zaimportowane drzewo ({source})",
|
|
3736
3736
|
"ui.fixes.origins.example.user": " {what} → własna dana użytkownika",
|
|
3737
|
+
"ui.fixes.origins.example.tree": " {what} → drzewo użytkownika, od przejęcia bez zmian",
|
|
3737
3738
|
"ui.fixes.origins.example.source": " {source} · {title} → import {key}",
|
|
3738
3739
|
"ui.fixes.origins.example.ids": " {owner} · ID z drzewa genealogicznego ({source}, {xref})",
|
|
3739
3740
|
"ui.fixes.origins.more": " … i {n} kolejnych: strom fixes show {id} --json",
|
package/dist/brief/verify.js
CHANGED
|
@@ -14,7 +14,7 @@ function whose(e) {
|
|
|
14
14
|
if (!e.origin)
|
|
15
15
|
return undefined;
|
|
16
16
|
if (e.origin.by === "user")
|
|
17
|
-
return "the user's value";
|
|
17
|
+
return e.origin.tree ? "the user's family tree's value" : "the user's value";
|
|
18
18
|
return `a family tree's value${e.origin.parts?.length ? ` (${e.origin.parts.join(", ")})` : ""}`;
|
|
19
19
|
}
|
|
20
20
|
/** A cited source as the line under its fact says it: the original's images and how to look at the entry. */
|
package/dist/cli/ui.js
CHANGED
|
@@ -1436,6 +1436,7 @@ export const UI = {
|
|
|
1436
1436
|
"ui.fixes.origins.found": "Found: {found, plural, one {# value} other {# values}} to mark where it came from",
|
|
1437
1437
|
"ui.fixes.origins.example.import": " {what} → an imported family tree ({source})",
|
|
1438
1438
|
"ui.fixes.origins.example.user": " {what} → the user's own",
|
|
1439
|
+
"ui.fixes.origins.example.tree": " {what} → the user's family tree, unchanged by them since it was taken in",
|
|
1439
1440
|
"ui.fixes.origins.example.source": " {source} · {title} → import {key}",
|
|
1440
1441
|
"ui.fixes.origins.example.ids": " {owner} · the IDs it had in the family tree ({source}, {xref})",
|
|
1441
1442
|
"ui.fixes.origins.more": " … {n} more: strom fixes show {id} --json",
|
package/dist/commands/error.js
CHANGED
|
@@ -12,7 +12,7 @@ import { stromVocabulary } from "../cli/vocab.js";
|
|
|
12
12
|
import { NeedsConsentError, UsageError } from "../core/errors.js";
|
|
13
13
|
import { gitVersion } from "../core/git.js";
|
|
14
14
|
import { downloadsDir, userHome } from "../core/paths.js";
|
|
15
|
-
import { Masker, maskKey } from "../core/redact.js";
|
|
15
|
+
import { MASK_CODE, Masker, maskKey } from "../core/redact.js";
|
|
16
16
|
import { agentSessionOf } from "../core/cmdlog.js";
|
|
17
17
|
import { agentsArea, bridgeArea, checkArea, commandsArea, configArea, connectorsArea, envArea, fetchesArea, fingerprintArea, freeBytes, gitArea, installArea, launchedFrom, LOG_LIMITS, logsArea, readArea, REPORT_ABOUT, REPORT_ADDRESS, REPORT_TABLE, REPORT_WHERE, reportFileName, researchTerms, sessionsArea, sinceOf, syncArea, systemArea, treeNameTerms, treeSettingsArea, windowsArea, writeReport, } from "../core/report.js";
|
|
18
18
|
import { mb } from "../core/tidy.js";
|
|
@@ -340,8 +340,25 @@ async function makeReport(ctx, opts) {
|
|
|
340
340
|
...(Object.keys(trimmed).length ? { trimmed } : {}),
|
|
341
341
|
...(withData ? { withData: withData.added.map((a) => a.id) } : {}),
|
|
342
342
|
});
|
|
343
|
-
// the
|
|
344
|
-
|
|
343
|
+
// the README is strom's own text in the person's language: only the values put into it (the note, an area's error)
|
|
344
|
+
// masked and looked over, never its own words — a source's title or a name may be a word of its sentences
|
|
345
|
+
// (Zpráva, Nový, Kovář); the count: the codes report.json carries (README's values are some of them again)
|
|
346
|
+
const look = (v) => masker.sweep(v);
|
|
347
|
+
const readme = readmeText(lang, {
|
|
348
|
+
made,
|
|
349
|
+
where,
|
|
350
|
+
about,
|
|
351
|
+
sinceMs,
|
|
352
|
+
note: str(opts.note) ? look(masker.note(str(opts.note))) : undefined,
|
|
353
|
+
areas: areas.map((a) => (a.error ? { ...a, error: look(a.error) } : a)),
|
|
354
|
+
trimmed,
|
|
355
|
+
label,
|
|
356
|
+
masked: codesIn(report),
|
|
357
|
+
archive,
|
|
358
|
+
data: !!withData,
|
|
359
|
+
}) +
|
|
360
|
+
(withData ? `\n\n${dataText(lang, withData.added)}` : "") +
|
|
361
|
+
`\n\n${t("ui.report.send", { address: REPORT_ADDRESS })}\n`;
|
|
345
362
|
// the data the person agreed to: as it is, never masked (data.json)
|
|
346
363
|
bytes = writeReport(file, readme, report, withData?.data);
|
|
347
364
|
if (bytes <= REPORT_MAX_BYTES)
|
|
@@ -373,6 +390,10 @@ async function makeReport(ctx, opts) {
|
|
|
373
390
|
};
|
|
374
391
|
}
|
|
375
392
|
}
|
|
393
|
+
/** How many codes a value carries (‹3fa9c›): the words of a person, a place or a path the report replaced. */
|
|
394
|
+
export function codesIn(v) {
|
|
395
|
+
return (JSON.stringify(v) ?? "").match(MASK_CODE)?.length ?? 0;
|
|
396
|
+
}
|
|
376
397
|
/** README.txt: what the report is and holds, in the language strom is shown in. */
|
|
377
398
|
function readmeText(lang, o) {
|
|
378
399
|
const t = (k, v = {}) => ui(lang, k, v);
|
package/dist/commands/fixes.js
CHANGED
|
@@ -282,7 +282,7 @@ const REWRITERS = {
|
|
|
282
282
|
if (r.kind === "ids")
|
|
283
283
|
return t("ui.fixes.origins.example.ids", { owner: r.owner, source: r.entry.source, xref: r.entry.xref ?? "" });
|
|
284
284
|
const what = r.kind === "fact" ? `${r.event} · ${r.owner}` : r.kind === "name" ? `${r.person} · ${r.name.replace(/\//g, "").replace(/\s+/g, " ").trim()}` : `${r.person} · ${t("ui.conflict.sex")}`;
|
|
285
|
-
return t(r.by === "user" ? "ui.fixes.origins.example.user" : "ui.fixes.origins.example.import", { what, source: r.source ?? "" });
|
|
285
|
+
return t(r.by === "user" ? "ui.fixes.origins.example.user" : r.by === "tree" ? "ui.fixes.origins.example.tree" : "ui.fixes.origins.example.import", { what, source: r.source ?? "" });
|
|
286
286
|
},
|
|
287
287
|
apply: (tree, items, config) => applyOrigins(tree, items, VERSION, config),
|
|
288
288
|
done: (tree) => originsDone(tree).length,
|
package/dist/commands/verify.js
CHANGED
|
@@ -6,7 +6,7 @@ import { register } from "../cli/registry.js";
|
|
|
6
6
|
import { lines } from "../cli/format.js";
|
|
7
7
|
import { ui } from "../cli/ui.js";
|
|
8
8
|
import { UsageError, StromError } from "../core/errors.js";
|
|
9
|
-
import { BULK_ORDERS, BULK_SCOPES, emptyFunnel, taskPlaces, verifyAsk, verifyStop, verifyCandidates, verifyBulk,
|
|
9
|
+
import { BULK_ORDERS, BULK_SCOPES, emptyFunnel, taskPlaces, verifyAsk, verifyStop, verifyCandidates, verifyBulk, verifyConfirmAll, verifyCounts, verifyFactDone } from "../core/verify.js";
|
|
10
10
|
import { displayName, resolvePerson } from "../core/people.js";
|
|
11
11
|
import { actsAsArchive, refuseInArchive } from "../core/state.js";
|
|
12
12
|
import { detectAgent, isAgent } from "../core/which.js";
|
|
@@ -245,17 +245,23 @@ register({
|
|
|
245
245
|
hidden: true,
|
|
246
246
|
description: "The user's own (the app, through the bridge): the fact is marked confirmed against the scan, its status as it is; tasks of verification leave it. --undo takes it back.",
|
|
247
247
|
args: [{ name: "fact", description: "the fact (E…)", required: true, variadic: true }],
|
|
248
|
-
options: [
|
|
248
|
+
options: [
|
|
249
|
+
{ name: "undo", type: "boolean", description: "take the confirmation back" },
|
|
250
|
+
{ name: "txt", type: "string", value: "<mark>[,<mark>…]", description: "the mark of the value seen, as the Strom file gives it (3 _TXT under 2 _STROM_EID), one for each fact: a fact changed since and nothing is written (confirm.changed)" },
|
|
251
|
+
],
|
|
249
252
|
examples: ["strom verify confirm E0001", "strom verify confirm E0001 --undo"],
|
|
250
253
|
run(ctx, { args, opts }) {
|
|
251
254
|
const tree = ctx.tree();
|
|
252
255
|
const undo = !!opts.undo;
|
|
253
|
-
const
|
|
256
|
+
const txts = opts.txt === undefined ? undefined : String(opts.txt).split(",").map((t) => t.trim());
|
|
257
|
+
if (txts?.some((t) => !/^[0-9a-f]{16}$/iu.test(t)))
|
|
258
|
+
throw new UsageError(`not a fact's mark: ${String(opts.txt)}`, { code: "factconfirm.invalid", hint: "the mark the Strom file gives under 2 _STROM_EID (3 _TXT): 16 hex characters" });
|
|
259
|
+
const set = ["strom verify confirm", ...args, ...(undo ? ["--undo"] : []), ...(txts ? [`--txt ${txts.join(",")}`] : [])].join(" ");
|
|
254
260
|
// the person's own: the app through the bridge, or the person's terminal
|
|
255
261
|
if (!tree.personWrites)
|
|
256
262
|
ctx.requireHuman(undo ? "Take back the confirmation against the scan?" : "Confirm the fact against the scan?", set, "verify", undefined, { window: false });
|
|
257
263
|
const lang = tree.lang;
|
|
258
|
-
const results =
|
|
264
|
+
const results = verifyConfirmAll(tree, args, !undo, txts);
|
|
259
265
|
return {
|
|
260
266
|
text: lines(...results.map((r) => (r.same ? ui(lang, "ui.verify.same", { fact: r.fact }) : ui(lang, undo ? "ui.verify.unconfirmed" : "ui.verify.confirmed", { fact: r.fact })))),
|
|
261
267
|
data: { results },
|
package/dist/core/excerpt.js
CHANGED
|
@@ -8,8 +8,9 @@ import crypto from "node:crypto";
|
|
|
8
8
|
import fs from "node:fs";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { threadId } from "node:worker_threads";
|
|
11
|
-
import { clipText, inputPath, sharperPart } from "./media.js";
|
|
11
|
+
import { clipText, inputPath, mediaById, sharperPart } from "./media.js";
|
|
12
12
|
import { kinship } from "./kin.js";
|
|
13
|
+
import { mediaRecords } from "./mediaindex.js";
|
|
13
14
|
import { convertedDir, readableFile } from "./readable.js";
|
|
14
15
|
import { Settings } from "./config.js";
|
|
15
16
|
import { excerptPage } from "./scanlink.js";
|
|
@@ -58,7 +59,7 @@ export function turned(e) {
|
|
|
58
59
|
export const LATER = Symbol("later");
|
|
59
60
|
/** Where a clip's excerpt is cut from at a level: the sharpest image of that place, its region there, its file and the excerpt's place in the cache. */
|
|
60
61
|
function clipPlace(tree, shared, clip, all, level) {
|
|
61
|
-
const m = all
|
|
62
|
+
const m = mediaById(all, clip.media);
|
|
62
63
|
if (!m)
|
|
63
64
|
return undefined;
|
|
64
65
|
const wanted = withMargin(clip.region);
|
|
@@ -230,7 +231,7 @@ export function excerptSettings(tree, settings = new Settings(tree.env, {})) {
|
|
|
230
231
|
* excerpt in `left`.
|
|
231
232
|
*/
|
|
232
233
|
export function planExcerpts(tree, shared, opts) {
|
|
233
|
-
const all = tree
|
|
234
|
+
const all = mediaRecords(tree);
|
|
234
235
|
const near = sourceNearness(tree, opts.persons);
|
|
235
236
|
const report = { sources: 0, excerpts: 0, bytes: 0, asked: opts.quality, level: opts.quality, dropped: [], outOfScope: 0, uncited: 0, uncitedLeft: [], missing: [], unclipped: [], later: [] };
|
|
236
237
|
const why = new Map();
|
package/dist/core/import.js
CHANGED
|
@@ -229,7 +229,7 @@ export function importGedcom(tree, text, opts) {
|
|
|
229
229
|
const bare = (xref) => xref.replace(/@/g, "");
|
|
230
230
|
tree.withTreeLock(() => {
|
|
231
231
|
// a family tree of another program: an import of this research (its key R1, R2…, the program, the file's date) —
|
|
232
|
-
// its values leads an agent changes only on a record (core/origin.ts); the Strom app's file is the user's own
|
|
232
|
+
// its values leads an agent changes only on a record (core/origin.ts); the Strom app's file is the user's own tree
|
|
233
233
|
const head = records.find((r) => r.tag === "HEAD");
|
|
234
234
|
const sourNode = head?.children.find((c) => c.tag === "SOUR");
|
|
235
235
|
const imported = fromApp.app
|
|
@@ -245,10 +245,11 @@ export function importGedcom(tree, text, opts) {
|
|
|
245
245
|
};
|
|
246
246
|
const source = makeSource(tree, `${importLabel(tree.config.lang)} ${opts.name}`, opts.input, imported);
|
|
247
247
|
result.source = source.id;
|
|
248
|
-
const stamp = fromApp.app ? { by: "user" } : { by: "import", source: source.id };
|
|
248
|
+
const stamp = fromApp.app ? { by: "user", tree: true } : { by: "import", source: source.id };
|
|
249
249
|
/**
|
|
250
250
|
* Where a value of the file comes from: every value of another program's file is the import's (whatever marks it
|
|
251
|
-
* carries — never read from a foreign file), every one of the Strom app's the user's
|
|
251
|
+
* carries — never read from a foreign file), every one of the Strom app's the user's family tree's (the user's to
|
|
252
|
+
* guard, not their own change: origin user with `tree`). The hook for the app's own
|
|
252
253
|
* marks (`_STROM_IMPORT Ix [DATE PLAC…]` under a fact, a NAME, a person: spec 066, read by the sync) — only where
|
|
253
254
|
* `fromApp`, never in another program's file.
|
|
254
255
|
*/
|
|
@@ -728,7 +729,7 @@ export function marriedNamesPlan(tree, input, text) {
|
|
|
728
729
|
export function addMarriedNames(tree, plan) {
|
|
729
730
|
tree.withTreeLock(() => {
|
|
730
731
|
for (const a of plan.add) {
|
|
731
|
-
const name = { ...a.name, citations: [{ source: plan.source, locator: `${a.xref.replace(/@/g, "")}${MARNM_LOCATOR}` }], origin: plan.app ? { by: "user" } : { by: "import", source: plan.source } };
|
|
732
|
+
const name = { ...a.name, citations: [{ source: plan.source, locator: `${a.xref.replace(/@/g, "")}${MARNM_LOCATOR}` }], origin: plan.app ? { by: "user", tree: true } : { by: "import", source: plan.source } };
|
|
732
733
|
update(tree, a.person, "person", (p) => (p.names.some((n) => sameName(n, name)) ? p : { ...p, names: [...p.names, name] }), {
|
|
733
734
|
op: "person.name",
|
|
734
735
|
summary: `${a.person} name ${gedcomName(name)} (married) ← ${plan.source}`,
|
|
@@ -874,8 +875,8 @@ export function importStromJson(tree, data, opts) {
|
|
|
874
875
|
const d = fromFlexDate(date);
|
|
875
876
|
if (!d && !place)
|
|
876
877
|
return;
|
|
877
|
-
// the Strom app's values are the user's own (spec 066)
|
|
878
|
-
const ev = { id: tree.allocate("E"), kind, status: "lead", citations: cite(sp, kind), origin: { by: "user" } };
|
|
878
|
+
// the Strom app's values are the user's own family tree's (spec 066): theirs to guard, nothing they confirmed
|
|
879
|
+
const ev = { id: tree.allocate("E"), kind, status: "lead", citations: cite(sp, kind), origin: { by: "user", tree: true } };
|
|
879
880
|
if (d)
|
|
880
881
|
ev.date = d;
|
|
881
882
|
if (place)
|
|
@@ -897,12 +898,12 @@ export function importStromJson(tree, data, opts) {
|
|
|
897
898
|
surname: sp.lastName?.trim() ?? "",
|
|
898
899
|
...(cleanTitle(sp.titleBefore) ? { prefix: cleanTitle(sp.titleBefore) } : {}),
|
|
899
900
|
...(cleanTitle(sp.titleAfter) ? { suffix: cleanTitle(sp.titleAfter) } : {}),
|
|
900
|
-
origin: { by: "user" },
|
|
901
|
+
origin: { by: "user", tree: true },
|
|
901
902
|
},
|
|
902
|
-
...(sp.nameVariants ?? []).map((v) => ({ ...parseName(v), origin: { by: "user" } })),
|
|
903
|
+
...(sp.nameVariants ?? []).map((v) => ({ ...parseName(v), origin: { by: "user", tree: true } })),
|
|
903
904
|
],
|
|
904
905
|
sex: sp.gender === "male" ? "M" : sp.gender === "female" ? "F" : "U",
|
|
905
|
-
...(sp.gender === "male" || sp.gender === "female" ? { sexOrigin: { by: "user" } } : {}),
|
|
906
|
+
...(sp.gender === "male" || sp.gender === "female" ? { sexOrigin: { by: "user", tree: true } } : {}),
|
|
906
907
|
events,
|
|
907
908
|
notes: sp.notes?.trim() ? [note(tree, sp.notes)] : [],
|
|
908
909
|
refs: [{ system: "strom-app", id: sp.id }, ...(sp.refn ? [{ system: "refn", id: sp.refn }] : [])],
|
|
@@ -924,7 +925,7 @@ export function importStromJson(tree, data, opts) {
|
|
|
924
925
|
const events = [];
|
|
925
926
|
const d = fromFlexDate(sp.startDate);
|
|
926
927
|
if (d || sp.startPlace) {
|
|
927
|
-
const ev = { id: tree.allocate("E"), kind: "MARR", status: "lead", citations: [{ source: source.id, locator: `${sp.id} MARR` }], origin: { by: "user" } };
|
|
928
|
+
const ev = { id: tree.allocate("E"), kind: "MARR", status: "lead", citations: [{ source: source.id, locator: `${sp.id} MARR` }], origin: { by: "user", tree: true } };
|
|
928
929
|
if (d)
|
|
929
930
|
ev.date = d;
|
|
930
931
|
if (sp.startPlace)
|