OTPRunner 0.2.0__tar.gz

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.
Files changed (51) hide show
  1. otprunner-0.2.0/.gitignore +11 -0
  2. otprunner-0.2.0/CHANGELOG.md +18 -0
  3. otprunner-0.2.0/CONTRIBUTING.md +53 -0
  4. otprunner-0.2.0/LICENSE +674 -0
  5. otprunner-0.2.0/PKG-INFO +119 -0
  6. otprunner-0.2.0/README.md +78 -0
  7. otprunner-0.2.0/docs/design.md +121 -0
  8. otprunner-0.2.0/docs/usage.md +99 -0
  9. otprunner-0.2.0/pyproject.toml +64 -0
  10. otprunner-0.2.0/scripts/i18n.sh +21 -0
  11. otprunner-0.2.0/scripts/migration-dump.py +100 -0
  12. otprunner-0.2.0/src/otprunner/__init__.py +7 -0
  13. otprunner-0.2.0/src/otprunner/__main__.py +5 -0
  14. otprunner-0.2.0/src/otprunner/adding.py +96 -0
  15. otprunner-0.2.0/src/otprunner/camera.py +185 -0
  16. otprunner-0.2.0/src/otprunner/capture.py +230 -0
  17. otprunner-0.2.0/src/otprunner/cli.py +259 -0
  18. otprunner-0.2.0/src/otprunner/clipboard.py +66 -0
  19. otprunner-0.2.0/src/otprunner/config.py +78 -0
  20. otprunner-0.2.0/src/otprunner/data/otprunner-small.svg +8 -0
  21. otprunner-0.2.0/src/otprunner/data/otprunner.svg +9 -0
  22. otprunner-0.2.0/src/otprunner/dbusutil.py +51 -0
  23. otprunner-0.2.0/src/otprunner/demo.py +34 -0
  24. otprunner-0.2.0/src/otprunner/dialogs.py +110 -0
  25. otprunner-0.2.0/src/otprunner/doctor.py +133 -0
  26. otprunner-0.2.0/src/otprunner/exporting.py +92 -0
  27. otprunner-0.2.0/src/otprunner/i18n.py +73 -0
  28. otprunner-0.2.0/src/otprunner/importer.py +88 -0
  29. otprunner-0.2.0/src/otprunner/install.py +196 -0
  30. otprunner-0.2.0/src/otprunner/locale/es/LC_MESSAGES/otprunner.mo +0 -0
  31. otprunner-0.2.0/src/otprunner/locale/es/LC_MESSAGES/otprunner.po +752 -0
  32. otprunner-0.2.0/src/otprunner/locale/otprunner.pot +739 -0
  33. otprunner-0.2.0/src/otprunner/migration.py +175 -0
  34. otprunner-0.2.0/src/otprunner/notify.py +29 -0
  35. otprunner-0.2.0/src/otprunner/otpauth.py +151 -0
  36. otprunner-0.2.0/src/otprunner/runner.py +438 -0
  37. otprunner-0.2.0/src/otprunner/store/__init__.py +32 -0
  38. otprunner-0.2.0/src/otprunner/store/base.py +81 -0
  39. otprunner-0.2.0/src/otprunner/store/kwallet.py +87 -0
  40. otprunner-0.2.0/src/otprunner/store/memory.py +21 -0
  41. otprunner-0.2.0/src/otprunner/store/secretservice.py +163 -0
  42. otprunner-0.2.0/tests/conftest.py +11 -0
  43. otprunner-0.2.0/tests/test_adding.py +52 -0
  44. otprunner-0.2.0/tests/test_camera.py +46 -0
  45. otprunner-0.2.0/tests/test_exporting.py +61 -0
  46. otprunner-0.2.0/tests/test_i18n.py +92 -0
  47. otprunner-0.2.0/tests/test_install.py +50 -0
  48. otprunner-0.2.0/tests/test_migration.py +63 -0
  49. otprunner-0.2.0/tests/test_otpauth.py +97 -0
  50. otprunner-0.2.0/tests/test_runner.py +244 -0
  51. otprunner-0.2.0/tests/test_store.py +81 -0
@@ -0,0 +1,11 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ build/
5
+ dist/
6
+ .venv/
7
+ .pytest_cache/
8
+ .idea/
9
+ .vscode/
10
+ .local/
11
+ test.opt
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ ## 0.2.0 (2026-11-24)
4
+
5
+ First public release, rewritten from a personal script.
6
+
7
+ - Secrets in the system keystore: native KWallet on KDE, Secret Service elsewhere.
8
+ - KRunner: `otp` lists the commands; filters show matching accounts and the commands that
9
+ start with the text; long lists are trimmed so the commands stay visible.
10
+ - Codes shown only on the selected line by default (`show_codes`).
11
+ - Add accounts from KRunner or the CLI: QR code on screen, clipboard (link or image), camera.
12
+ - Import and export `otpauth://` and Google Authenticator `otpauth-migration://`; a single
13
+ account exports as `otpauth://`; several, as transfer codes shown together in one window.
14
+ - Links stored exactly as received; same secret replaces the link and keeps the name.
15
+ - CLI with the same commands as the runner; `doctor` diagnostics.
16
+ - DBus activation through a systemd user unit; idle exit.
17
+ - English and Spanish interface.
18
+ - Icon.
@@ -0,0 +1,53 @@
1
+ # Contributing
2
+
3
+ Bug reports, translations and pull requests are welcome. If you fork OTPRunner to change
4
+ something, consider sending the change back here so everyone gets it.
5
+
6
+ ## Development
7
+
8
+ ```bash
9
+ git clone https://github.com/baquilla/otprunner && cd otprunner
10
+ uv venv && uv pip install -e '.[dev]' # or: python -m venv .venv && .venv/bin/pip install -e '.[dev]'
11
+ pytest
12
+ ```
13
+
14
+ To try your working copy in KRunner, install it in editable mode and register it:
15
+
16
+ ```bash
17
+ pipx install -e . --force
18
+ otprunner install
19
+ ```
20
+
21
+ To watch the runner while you use KRunner: `systemctl --user stop otprunner` and run
22
+ `otprunner serve -v` in a terminal. `otprunner serve --demo` does the same with made-up
23
+ accounts, which is handy for screenshots.
24
+
25
+ ## Layout
26
+
27
+ | Module | Role |
28
+ |---|---|
29
+ | `runner.py` | KRunner DBus service: matches and actions |
30
+ | `cli.py` | Command line |
31
+ | `otpauth.py`, `migration.py` | `otpauth://` accounts and codes; Google `otpauth-migration://` codec |
32
+ | `importer.py`, `adding.py` | Parsing links, adding and updating accounts |
33
+ | `store/` | Keystore backends (KWallet, Secret Service, in-memory for tests) |
34
+ | `capture.py`, `camera.py`, `clipboard.py`, `dialogs.py`, `notify.py` | Desktop integration, each trying the available tools in order |
35
+ | `install.py`, `doctor.py` | Installation and diagnostics |
36
+
37
+ ## Translations
38
+
39
+ gettext, with English as the source language; catalogs are in `src/otprunner/locale/`.
40
+
41
+ ```bash
42
+ scripts/i18n.sh update # after changing strings: extract and update the .po files
43
+ scripts/i18n.sh init fr # start a new language
44
+ scripts/i18n.sh compile # build the .mo files (they are shipped in the package)
45
+ ```
46
+
47
+ The tests fail if a string is left untranslated or a `.mo` file is out of date.
48
+
49
+ ## Guidelines
50
+
51
+ - Never log, print or commit secrets. Test data uses made-up secrets.
52
+ - Visible text says *OTPRunner* (use `APP_NAME`); technical identifiers stay `otprunner`.
53
+ - Prefer small, focused changes, each with its test.