Commit Graph

261 Commits

Author SHA1 Message Date
Justus Winter
2580e26ba5
Refactor asset creation. 2024-01-05 15:45:54 +01:00
Justus Winter
03dbe1db84
Editorial changes to example text format.
- Similar to #27.
2024-01-05 15:37:08 +01:00
Justus Winter
79fd3d7333
Editorial changes to example text format.
- Fixes #27.
2024-01-05 15:32:54 +01:00
Justus Winter
f81d6f09af
Use our custom manual page generator during build time.
- Previously, there were two ways of generating manual pages.
    We used to use the upstream clap_mangen crate, but decided to
    develop our own custom formatter.  However, we didn't quite switch
    to it, keeping the old mechanism in place and adding our new
    solution to sq, activated by a hidden environment variable.

  - This patch drops the upstream formatter, and uses the custom
    formatter during build time.  First, our custom code can be
    tweaked easily to suit our needs, and switching back to the
    upstream solution is easy enough should it better suit our needs.
    Second, generating manual pages at build time should help
    cross-building environments.
2024-01-05 13:56:32 +01:00
Justus Winter
cf16123967
Always emit option subsections, list global options last. 2024-01-05 13:45:17 +01:00
Justus Winter
14717e210b
Restructure manual pages.
- Previously, the top-level manpage contained all leaf commands in the
    synopsis, their descriptions, and their examples.  This made the
    page unwieldy.

  - Instead, only list direct subcommands in overview pages, and
    generate one overview page per non-leaf command.
2024-01-05 13:45:16 +01:00
Justus Winter
02b043559a
Represent the commands as a tree instead of a flattened tree.
- This doesn't change the output, except for fixing the order of
    subcommands in the SYNOPSIS.
2024-01-05 12:32:36 +01:00
Justus Winter
bf256f250d
Move the generating functions to the struct Command. 2024-01-05 12:10:20 +01:00
Justus Winter
d1b70a2c41
Use a BTreeMap instead of a HashMap for deterministic output. 2024-01-05 11:48:16 +01:00
Justus Winter
d929cd0100
Align functions building manpages.
- This doesn't change the output.
2024-01-05 11:43:53 +01:00
Justus Winter
ad567d5c04
Track whether commands are leaves and filter accordingly.
- This doesn't change the output.
2024-01-05 11:27:21 +01:00
Justus Winter
d0767969ce
Rename type. 2024-01-04 19:13:09 +01:00
Justus Winter
5be0d39b05
Qualify clap's types. 2024-01-04 19:07:42 +01:00
Justus Winter
6e56915e0c
Insert missing space in subcommand synopsis. 2024-01-04 19:02:20 +01:00
Justus Winter
545035093f
Fix documentation. 2024-01-04 19:02:14 +01:00
Justus Winter
428372d65b
Turn comments into function documentation. 2024-01-04 18:17:29 +01:00
Justus Winter
9cb519771a
Rename subcommand dispatcher functions. 2024-01-04 18:16:59 +01:00
Justus Winter
1e3b2b0b25
Use a BTreeMap instead of a HashMap for deterministic output. 2024-01-04 17:16:39 +01:00
Justus Winter
ec933036dd
Buffer certs and use the correct armor label in sq keyring.
- See #14.
2024-01-04 17:16:26 +01:00
Justus Winter
55321a2769
Don't suggest to omit a mandatory option.
- Provide two distinct default help texts for our CLI types: for
    optional and required arguments.
2024-01-04 16:21:45 +01:00
Justus Winter
5a809f77d6
Improve ergonomics of sq key userid add.
- Make the input and one user id argument mandatory.

  - Fixes #104.
2024-01-04 16:02:25 +01:00
Justus Winter
70eb478987
Dump certs if we see a bad signature in the sq-certify tests.
- See #9.
2024-01-04 15:01:19 +01:00
Justus Winter
4db9d09dac
Constrain to valid messages when merging signatures.
- Fixes #65.
2024-01-04 14:05:18 +01:00
Justus Winter
b79ff91ddf
Fix joining of packets that contain secrets.
- Fixes 56dba759fd.
2024-01-04 13:34:08 +01:00
Justus Winter
2acae1311c
Fix detection of inline-signed messages. 2024-01-04 13:34:08 +01:00
Justus Winter
bd4e645bfc
Make label detection more robust, use packet tag instead of kind.
- For packet joining, we don't need to be able to parse the packet.
    Hence, it is enough to look at the tag, which will cover e.g
    packets with unsupported versions.
2024-01-04 13:34:08 +01:00
Justus Winter
e0fab7a234
Take the path from the packet parser instead of computing it. 2024-01-04 13:34:07 +01:00
Justus Winter
8314b47c51
Refactor dispatching logic. 2024-01-04 12:03:55 +01:00
Justus Winter
3e3980b161
Identify bare revocation certificates as such. 2024-01-04 11:17:19 +01:00
Justus Winter
1dfbe5cc70
Identify compound revocation certificates as such. 2024-01-04 10:57:16 +01:00
Justus Winter
c6b29ec13f
Include public key in revocation cert, adjust Armor label.
- Fixes #53.
2024-01-04 10:45:28 +01:00
Justus Winter
b24b9b898e
Merge certificates used to verify signatures.
- Fixes #79.
2024-01-04 10:33:13 +01:00
Justus Winter
012f4500ac
Validate the Autocrypt header against the From header. 2024-01-03 17:47:12 +01:00
Justus Winter
86f599542c
Remove the Autocrypt feature, making it mandatory.
- We once made the Autocrypt feature optional in order to squeeze a
    sq update into a freeze without requiring new dependencies.
    However, having features has a cost too (see e.g. #137), and we
    generally try to keep the number of exposed features down.  And,
    the sequoia-autocrypt is one of the least demanding crates to
    package.
2024-01-03 17:14:46 +01:00
Justus Winter
1ebdd0c904
Rework generation of documentation. 2024-01-03 16:54:44 +01:00
Justus Winter
c55070e269
Rework generation of man pages. 2024-01-03 16:50:08 +01:00
Justus Winter
f5eafe9291
Rework generation of shell completions. 2024-01-03 16:42:53 +01:00
Justus Winter
cfc6fdd43a
Fix generation of shell completions and man pages.
- Fixes #163.
2024-01-03 16:06:48 +01:00
Justus Winter
ed5137657b
Fix usage generation.
- Fix escaping of help output.
2024-01-03 15:34:23 +01:00
Justus Winter
6c71e434a8
Factor out the JSON formatting. 2024-01-03 15:02:31 +01:00
Justus Winter
89b8bae767
Remove unused function. 2024-01-03 14:48:51 +01:00
Justus Winter
ee5da79290
Move OutputVersion to cli::output, and use in the cli definition.
- Fixes #13.
2024-01-03 14:28:51 +01:00
Justus Winter
6c040cfcc5
Move OutputFormat to cli::output, derive ValueEnum, and use in cli.
- See #13.
2024-01-03 14:14:33 +01:00
Justus Winter
d69c02a4de
Rename file. 2024-01-03 13:58:17 +01:00
Justus Winter
a80429cfd7
Factor out type conversion. 2023-12-20 16:15:12 +01:00
Justus Winter
e976062186
Sort global options to the bottom in help listings. 2023-12-20 16:15:12 +01:00
Justus Winter
ff9443bf96
Unify handling of encrypt --mode and key generate --can-encrypt.
- See #109.
2023-12-19 16:03:49 +01:00
Justus Winter
fa57bbe66e
Move split and join to commands/packets.rs.
- See #129.
2023-12-19 15:02:00 +01:00
Justus Winter
f04eb709c5
Release 0.32.0. 2023-12-15 22:15:38 +01:00
Justus Winter
d22c812e58
Update all dependencies. 2023-12-15 22:15:38 +01:00