mirror of
https://codeberg.org/Reuh/feather.git
synced 2025-10-27 10:09:32 +00:00
docs: improve cli help message
This commit is contained in:
parent
5635b0acd6
commit
70a26e418f
1 changed files with 11 additions and 2 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import asyncio
|
import asyncio
|
||||||
|
import textwrap
|
||||||
|
|
||||||
from feather.config import Config
|
from feather.config import Config
|
||||||
from feather.feather import FeatherApp
|
from feather.feather import FeatherApp
|
||||||
|
|
@ -10,12 +11,20 @@ from feather.feather import FeatherApp
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
prog="feather",
|
prog="feather",
|
||||||
description="file-based RSS reader client"
|
description="file-based RSS reader client",
|
||||||
|
formatter_class=argparse.RawTextHelpFormatter
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"action",
|
"action",
|
||||||
choices=("sync", "sync-up", "sync-down", "daemon", "regenerate", "clear-data"),
|
choices=("sync", "sync-up", "sync-down", "daemon", "regenerate", "clear-data"),
|
||||||
help="sync: perform a full synchronization with the server; sync-up: only synchronize local changes to the server (e.g. articles read locally); sync-down: only synchronize remote change from the server (e.g. new articles or articles read from another device); daemon: start in daemon mode (will keep performing synchronizations periodically until process is stopped); regenerate: regenerate all HTML files from the local data; clear-data: remove all local data",
|
help=textwrap.dedent("""\
|
||||||
|
sync: perform a full synchronization with the server
|
||||||
|
sync-up: only synchronize local changes to the server (e.g. articles read locally)
|
||||||
|
sync-down: only synchronize remote change from the server (e.g. new articles or articles read from another device)
|
||||||
|
daemon: start in daemon mode (will keep performing synchronizations periodically until process is stopped)
|
||||||
|
regenerate: regenerate all HTML files from the local data
|
||||||
|
clear-data: remove all local data
|
||||||
|
"""),
|
||||||
)
|
)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue