From e9e22b762dc5aeb0c3f199209198e5f020443586 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 18 Jun 2025 19:08:47 -0400 Subject: [PATCH] docs: Make this format a little prettier-friendly. --- GNUmakefile | 8 ++++---- docs/usage.md | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 046dd888..4e6e9ad9 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1485,14 +1485,14 @@ help: ## Display this help message. docs: debug docs: ## Build HTML docs. - @echo '# CLI Usage' > docs/usage.md + @echo '# CLI Usage\n' > docs/usage.md @echo "## tildefriends -h" >> docs/usage.md - @echo '```' >> docs/usage.md + @echo '\n```' >> docs/usage.md @out/debug/tildefriends -h >> docs/usage.md @echo '```' >> docs/usage.md @for command in $$(out/debug/tildefriends -h | grep -Po '[A-Za-z_]*(?= - )'); do - @ echo "## tildefriends $$command -h" >> docs/usage.md - @ echo '```' >> docs/usage.md + @ echo "\n## tildefriends $$command -h" >> docs/usage.md + @ echo '\n```' >> docs/usage.md @ out/debug/tildefriends $$command -h >> docs/usage.md @ echo '```' >> docs/usage.md @done diff --git a/docs/usage.md b/docs/usage.md index 5a690257..4d647779 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -1,5 +1,7 @@ # CLI Usage + ## tildefriends -h + ``` Usage: out/debug/tildefriends command [command-options] commands: @@ -20,7 +22,9 @@ commands: verify - Verify a feed. test - Test SSB. ``` + ## tildefriends run -h + ``` out/debug/tildefriends run [options] @@ -60,7 +64,9 @@ options -v, --verbose Log raw messages. -h, --help Show this usage information. ``` + ## tildefriends sandbox -h + ``` Usage: out/debug/tildefriends sandbox [options] @@ -69,7 +75,9 @@ options: -h, --help Show this usage information. -f, --fd File descriptor with which to communicate with parent process. ``` + ## tildefriends import -h + ``` out/debug/tildefriends import [options] [paths...] @@ -79,7 +87,9 @@ options: -d, --db-path db_path SQLite database path (default: /home/cory/.local/share/tildefriends/db.sqlite). -h, --help Show this usage information. ``` + ## tildefriends export -h + ``` out/debug/tildefriends export [options] [paths...] @@ -91,7 +101,9 @@ options: paths Paths of apps to export (example: /~core/ssb /~user/app). ``` + ## tildefriends publish -h + ``` out/debug/tildefriends publish [options] @@ -103,7 +115,9 @@ options: -c, --content json JSON content of message to publish. -h, --help Show this usage information. ``` + ## tildefriends private -h + ``` out/debug/tildefriends private [options] @@ -116,7 +130,9 @@ options: -t, --text text Private post text. -h, --help Show this usage information. ``` + ## tildefriends create_invite -h + ``` out/debug/tildefriends get_sequence [options] @@ -130,7 +146,9 @@ options: -e, --expires seconds How long this invite is valid in seconds (-1 for indefinitely, default: 1 hour). -h, --help Show this usage information. ``` + ## tildefriends get_sequence -h + ``` out/debug/tildefriends get_sequence [options] @@ -140,7 +158,9 @@ options: -i, --identity identity Account from which to get latest sequence number. -h, --help Show this usage information. ``` + ## tildefriends get_identity -h + ``` out/debug/tildefriends get_identity [options] @@ -149,7 +169,9 @@ options: -d, --db-path db_path SQLite database path (default: /home/cory/.local/share/tildefriends/db.sqlite). -h, --help Show this usage information. ``` + ## tildefriends get_profile -h + ``` out/debug/tildefriends get_profile [options] @@ -159,7 +181,9 @@ options: -i, --identity identity Account for which to get profile information. -h, --help Show this usage information. ``` + ## tildefriends get_contacts -h + ``` out/debug/tildefriends get_contacts [options] @@ -169,7 +193,9 @@ options: -i, --identity identity Account from which to get contact information. -h, --help Show this usage information. ``` + ## tildefriends has_blob -h + ``` out/debug/tildefriends has_blob [options] @@ -179,7 +205,9 @@ options: -b, --blob_id blob_id ID of blob to query. -h, --help Show this usage information. ``` + ## tildefriends get_blob -h + ``` out/debug/tildefriends store_blob [options] @@ -190,7 +218,9 @@ options: -o, --output file_path Location to write the retrieved blob. -h, --help Show this usage information. ``` + ## tildefriends store_blob -h + ``` out/debug/tildefriends store_blob [options] @@ -200,7 +230,9 @@ options: -f, --file file_path Path to file to add to the blob store. -h, --help Show this usage information. ``` + ## tildefriends verify -h + ``` out/debug/tildefriends import [options] [paths...] @@ -211,7 +243,9 @@ options: -d, --db-path db_path SQLite database path (default: /home/cory/.local/share/tildefriends/db.sqlite). -h, --help Show this usage information. ``` + ## tildefriends test -h + ``` out/debug/tildefriends test [options]