time-link / timelink-py

Timelink Python Package
MIT License
3 stars 0 forks source link

Store comments and multiple entries as json #9

Open joaquimrcarvalho opened 7 months ago

joaquimrcarvalho commented 7 months ago

The kleio notation allows for multiple entries. comments and original wording in fields:

 property$McDonalds Farm/includes=house; barn; well; corn field

n$cristina%cª#possibly Catarina

In MHK multiple entries were transformed in comma separated string (using Java Vector.toString()) and comments and original wording were appended to the "obs" field (prefixed with "#" and "%") in the entity record.

In Timelink-py a json field could be added to the entity record, and the structure of this extra information kept:

   {"_fields":["name1", "name2"],
   "name1":{
      "core":["entry1","entry2"], 
      "comment":["entry1","entry2"], 
      "original":["entry1","entry2"]
   },
   "name2": 
   {"core":["entry1","entry2"],
    "comment":["entry1","entry2"], 
    "original":["entry1","entry2"]}
   }
joaquimrcarvalho commented 7 months ago

See also issue #3

joaquimrcarvalho commented 1 month ago

This is partially implemented by adding "extra_info" to the "obs" field during import:

In the kleio file:

             ls$nascimento/Siegenburg, Baviera, diocese de Regensburg%Ratisbonne# @wikidata:Q503945/17011030

After import, as rendered by to_kleio()

     ls$nascimento/Siegenburg, Baviera, diocese de Regensburg/17011030
        /obs=extra_info: {"value": {"comment": "@wikidata:Q503945", "original": "Ratisbonne"}}