summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.si>2024-01-26 16:45:46 +0100
committerTimotej Lazar <timotej.lazar@araneo.si>2024-01-26 16:45:46 +0100
commit6fdcb01012f13770fe5c574608532513b2fadeac (patch)
tree293cabd66c00349880a399f11b6f68d3433a91e5
parent7c1c763927d4c4e2414867bee5192b792e03f34c (diff)
Rename project
-rw-r--r--README.md16
-rwxr-xr-xmarginaltool (renamed from margfools)4
-rw-r--r--marginaltool.desktop (renamed from margfools.desktop)4
3 files changed, 12 insertions, 12 deletions
diff --git a/README.md b/README.md
index c54d551..ee94cc9 100644
--- a/README.md
+++ b/README.md
@@ -1,34 +1,34 @@
-# margfools
+# marginaltool
Python script to replace [MargTools](https://businessconnect.margis.si/output/#orodja). Can be used to sign documents with [GovernmentConnect](https://margis.si/produkti/government-connect/).
## Usage
-Run `margfools -h` for a synopsis of command‐line arguments. Allowed arguments are
+Run `marginaltool -h` for a synopsis of command‐line arguments. Allowed arguments are
- margfools [-h] [-e {file,pkcs11}] [-k KEYFILE] [-c CERTFILE] [-i <KEY ID>] URL
+ marginaltool [-h] [-e {file,pkcs11}] [-k KEYFILE] [-c CERTFILE] [-i <KEY ID>] URL
To use a signing key and certificate stored in PEM files, install `openssl` and run
- margfools -e file -k KEYFILE -c CERTFILE bc-digsign://sign?…
+ marginaltool -e file -k KEYFILE -c CERTFILE bc-digsign://sign?…
To sign using a PIV-II smartcard such as the Yubikey, install `pkcs11-tool` from [OpenSC](https://github.com/OpenSC/OpenSC) and run
- margfools -e pkcs11 -i <KEY ID> bc-digsign://sign?…
+ marginaltool -e pkcs11 -i <KEY ID> bc-digsign://sign?…
The script will prompt for the PIN to unlock the smartcard. To find the key ID, run
pkcs11-tool -O
-To use `margfools` from the web app, set it as the default program for `x-scheme-handler/bc-digsign` URLs, or copy the `margfools.desktop` file to `~/.local/share/applications/` and run
+To use `marginaltool` from the web app, set it as the default program for `x-scheme-handler/bc-digsign` URLs, or copy the `marginaltool.desktop` file to `~/.local/share/applications/` and run
- xdg-mime default margfools.desktop x-scheme-handler/bc-digsign
+ xdg-mime default marginaltool.desktop x-scheme-handler/bc-digsign
For this to work, the script must be configured as described below.
## Configuration
-Settings can be saved on a per‐site basis in `~/.margfools` using the [configparser](https://docs.python.org/3/library/configparser.html) format.
+Settings can be saved on a per‐site basis in `~/.marginaltool` using the [configparser](https://docs.python.org/3/library/configparser.html) format.
[DEFAULT]
engine = pkcs11
diff --git a/margfools b/marginaltool
index 6f6d8d5..27730d3 100755
--- a/margfools
+++ b/marginaltool
@@ -20,9 +20,9 @@ def init(args):
args.start_token = args.params["startSigningToken"][0]
args.url = args.params['baseUrl'][0]
- # if missing, get options from section [url] in ~/.margfools
+ # if missing, get options from section [url] in config
config = configparser.ConfigParser()
- config.read(os.path.expanduser('~') + '/.margfools')
+ config.read(os.path.expanduser('~') + '/.marginaltool')
if not args.engine:
args.engine = config.get(args.url, 'engine', fallback='file')
diff --git a/margfools.desktop b/marginaltool.desktop
index f4cfe14..668c276 100644
--- a/margfools.desktop
+++ b/marginaltool.desktop
@@ -1,6 +1,6 @@
[Desktop Entry]
-Name=margfools
-Exec=margfools %u
+Name=marginaltool
+Exec=marginaltool %u
Type=Application
Terminal=true
MimeType=x-scheme-handler/bc-digsign;