https://git.schokokeks.org/derivepassphrase.git/tree/9b9febbf4861ef7d6917367965677a58fd7ce1ad Recent commits to derivepassphrase.git (9b9febbf4861ef7d6917367965677a58fd7ce1ad) 2025-01-11T20:06:57+01:00 tag:gitlist.org,2012:commit/9b9febbf4861ef7d6917367965677a58fd7ce1ad Add changelog entry for export handler interface harmonization 2025-01-11T20:06:57+01:00 Marco Ricci software@the13thletter.info <pre>&lt;/pre&gt; tag:gitlist.org,2012:commit/d25cdbdd2494feabfb29e8d8a6d8f695475bf7a2 Test the export handler dispatcher as well as the handlers directly 2025-01-11T19:04:57+01:00 Marco Ricci software@the13thletter.info <pre>For each test calling an export handler directly, also perform the test when calling the export handler dispatcher. &lt;/pre&gt; tag:gitlist.org,2012:commit/0ecb8a91d39b699816e21d6e215878ddc50252e3 Harmonize the interface for both vault config export handlers 2025-01-11T19:04:57+01:00 Marco Ricci software@the13thletter.info <pre>Harmonize the interface for the `storeroom` and the `vault_native` config export handlers. Specifically, introduce a common interface `exporter.ExportVaultConfigDataFunction` which all such handlers must adhere to, as well as a registry of handlers and a decorator for registering handlers immediately upon definition. A new top-level function `exporter.export_vault_config_data` adhering to this interface will dispatch to the correct implementation, based on the handler registry; its use is recommended over calling the handlers directly. Though it is not encoded in the programmatic interface definition, the intent is to use common exceptions and exception messages for common failure modes. (The intended meanings of the exceptions are listed in the docstring of `exporter.export_vault_config_data`.) Specifically, introduce a new error message constant for when a given handler name is not registered in the registry, and an exception class `exporter.NotAVaultConfigError` for when the target path cannot be decrypted and decoded in the requested vault config encoding format with the given or inferred storage master key. Also update some outdated or wrong aspects of the handler docstrings. Additionally, the registry is empty upon definition to avoild circular imports. A separate call to the `exporter.find_vault_config_data_handlers` function is necessary to populate the standard set of handlers. `exporter.export_vault_config_data` will call this automatically. Because of this updated interface, the `vault_native.export_vault_native_data` handler no longer supports specifying multiple formats to try. The caller in `derivepassphrase.cli` already handles trying multiple formats natively, but additionally no longer dispatches to the handler functions itself, relying on `exporter.export_vault_config_data` for this task instead. Finally, update the tests to include the handler registry, the decorator, the change of parameter names and the change in handling attempting multiple formats. &lt;/pre&gt; tag:gitlist.org,2012:commit/a9bd473172968db23d6b79c7a12ad7bdb9203d3c Accept all bytes-like objects as byte strings in the export subcommand 2025-01-11T19:04:57+01:00 Marco Ricci software@the13thletter.info <pre>This is a breaking API change, because some function return types have been widened. &lt;/pre&gt; tag:gitlist.org,2012:commit/f2585c5ec1b1cb0f5bc7a2d924e294497696d9d6 Fix tests for rephrased "Cannot update the %s settings" message 2025-01-11T18:51:01+01:00 Marco Ricci software@the13thletter.info <pre>The rephrasing was introduced in 1b29904d789be7742119bfa06ce11aa5b7ffb6f9. &lt;/pre&gt; tag:gitlist.org,2012:commit/70be2295f958ed99bac34e2adc469d6d94a68a11 Fix translation string formatting of preformatted paragraphs 2025-01-11T16:33:03+01:00 Marco Ricci software@the13thletter.info <pre>Due to a sign error, the paragraph content was being dropped. And since we now actively include translation strings with preformatted paragraphs, include coverage tracking for this case. &lt;/pre&gt; tag:gitlist.org,2012:commit/fe7b6349a5c5781a4d1b1ecf16d976e43d0e7f95 Make debug and info messages from exporter subcommands translatable 2025-01-11T16:28:48+01:00 Marco Ricci software@the13thletter.info <pre>We add all debug and info messages from the `derivepassphrase export vault` subcommand to the translatable strings enums. We also improve several debug messages from the "inline calculation" style to the more easily translatable "tabular listing of relevant data" style. Two unimportant info messages were dropped: * Attempting to parse as v0.2 configuration * Attempting to parse as v0.3 configuration &lt;/pre&gt; tag:gitlist.org,2012:commit/a8c8e836c3a10834415a51e15a8cfadb1c752334 Overhaul all other manpages and copyedit everything for consistency 2025-01-11T15:38:02+01:00 Marco Ricci software@the13thletter.info <pre>The top-level `derivepassphrase` command, and the subcommands `export` and `export vault` now have proper manpages (both manpage and online formats) similar to `derivepassphrase vault`. All manpages document the `--help`, `--version`, `--debug`, `--verbose` and `--quiet` options. If a command only delegates to subcommands, a SUBCOMMANDS section is now present, and the DESCRIPTION section has the subcommand listing deduplicated. The COMPATIBILITY section details compatibility only for this command, and refers to subcommand manpages as necessary. The new manpages do not tabulate their diagnostics yet, nor do they include examples. &lt;/pre&gt; tag:gitlist.org,2012:commit/50a83cf2b55863760234c34f54c0ed8e69d30ac2 Move manpage directory out of docs, to top-level 2025-01-08T14:52:31+01:00 Marco Ricci software@the13thletter.info <pre>The `docs` directory contains sources for the documentation website, to be uploaded to the WWW. While also "online" documentation (in the sense that they are browsable on the customer's computer system), manpages are not typically distributed online (in the WWW sense). Besides, the `docs` directory already contains a rendering of the manpage. &lt;/pre&gt; tag:gitlist.org,2012:commit/2b1ca491019b2366b079155ad2a40353814c21e2 Merge topic branch 'usage-fixes' into master 2025-01-07T23:42:07+01:00 Marco Ricci software@the13thletter.info <pre>* t/usage-fixes: Incorporate revised wording from the manpage into the README &lt;/pre&gt;