Timelink, formerly known as MHK (Micro History with Kleio) is an information system designed for processing person related information collected from historical sources.
This explains how to create a MHK user in a local computer with the sources directory linked from a git repository
First you need to have a git repository for sources files.
If you are starting a new project it is recommended you create a directory with the standard layout for source files, by using the directory template. See this info.
If you have existing sources you can either create a new standard directory as above or keep the original files in place and share the directory with git. See new git repository from existing files
You will need the URL of the git repository and a personal access token. See the documentation above on how to create a repository and a Personal access token.
You must choose a name for the local sources directory.
The directory will be created in the mhk-home/sources/ directory
For instance mysources
mhk sources clone URL TOKEN DIR
For instance
mhk sources clone https://github.com/joaquimrcarvalho/soure-fontes.git 336b0.. mysources
cd ~/mhk-home/sources/mysources
git log
……….
mhk user create myuser --database myuser --level 3 --sources mysources
This will ask for a password
Restart mhk
mhk stop mhk start
You can have mhk automatically checking if there are new sources ready for import. This is useful in an installation that is publishing a public database.
For an installation used for data entry with the timelink VSCode extension, auto import can generate many unnecessary imports. If used set a long delay between checks.
mhk user properties myuser set mhk.import.auto yes
Also set a reasonable interval to run the checks, in seconds, for instance every 2 minutes
mhk user properties myuser set mhk.import.auto.delay 120
If you want to keep your repository synchronised with the remote repository on GitHub or similar you can have mhk to do a periodical auto pull.
Note this only makes sense if you are sitting up a replica and the sources are being updated by someone else and you just want to keep your local copy in sync.
mhk user properties myuser set mhk.git.pull.auto yes
You can also set the delay between pulls in minutes
mhk user properties myuser set mhk.git.pull.auto.delay 5
USER=myuser; DB=mydb; SOURCES=mysources
mhk user create $USER --database $DB --level 3 --sources $SOURCES
mhk user properties $USER set mhk.import.auto yes-with-warnings; \
mhk user properties $USER set mhk.import.auto.delay 120; \
mhk user properties $USER set mhk.git.pull.auto yes; \
mhk user properties $USER set mhk.git.pull.auto.delay 10; \
mhk user properties $USER set mhk.import.pull.before yes; \
mhk user properties $USER set mhk.admin $USER; \
mhk user properties $USER set mhk.import.authority.backup yes
If you want to have automatic synchronization of identification files do
mhk user properties $USER set mhk.import.authority.backup yes