Configuration support
-
$HOME/.config/silkaj/silkaj.cfg
: currency specific configuration to be done in the hierarchy of the file
Formats
-
toml
: have a look: based onini
, but improved - ini: poezio, BeetleBot
- json: duniter
- opml: pipenv
- yml
Toml is the best by far. tomllib
is available from Py3.11. A replacement with similar API should be found for version < Py3.11
- configparser is available in stdlib and allow configuration management, the best so far, and was already used.
Configurations per currency
- member_id
- wallets
- endpoint: rather than default one
- contact aliases (correspondence between contact_id and a pubkey)
- …
[g1]
member_id = moul
wallets = <pubkey1>:<pubkey2>
endpoint = <hostmame>:<port>
alice = <pubkey>
[g1-test]
member_id = moul-test
wallets = <pubkey1>:<pubkey2>
endpoint = <hostname>:<port>
bob = <pubkey>
Command
silkaj config <attribute> <value>
Behaviours
-
amount
: sum-upmember_id
pluswallets
’ amounts -
id
andwot
: if no arguments specified choosemember_id
-
endpoint
: change endpoint -
diffi
andissuers
: highlight identity with ** or bold text -
[ ](Useless as authentication is mandatory and that this information is here)cert
: certifieur ismember_id
Thoughts
- think about configuration not related to a currency, like:
- language
- when the configuration file is red (at every silkaj launch), then Vim detect that the it as been modified and needs to overwritten.
Documentation
-
document configuration file and behaviors
Configuration managemgent implementation
Click integration
Others
Edited by Moul