diff options
author | Wolfgang Müller | 2024-10-26 20:59:35 +0200 |
---|---|---|
committer | Wolfgang Müller | 2024-11-06 21:29:59 +0100 |
commit | ec4750b5e2f801fec7e1100299114483d4a04f4e (patch) | |
tree | 6f4f36d43f25ae69c022aa1bf1ac08cf3a2fae48 /later.1 | |
parent | 9e7ede5afcbc99a3670ee8232ecfbce79da0dde8 (diff) | |
download | later-ec4750b5e2f801fec7e1100299114483d4a04f4e.tar.gz |
Use getopt-based parser for command-line arguments
Upcoming commits will want to make use of bespoke argument handling
alongside subcommands and using Python's argparse proved unable to
easily handle that kind of complexity. Therefore switch to the more
basic getopt-based parser with which we can implement our own logic.
Without argparse we're no longer bound to having an autogenerated help
listing, so stop mentioning that in the manual. Instead have later(1)
output a concise usage listing when given an unknown argument.
Since we'll be adding more commands to later(1) in the future, also
specify an explicit "list" command.
Diffstat (limited to 'later.1')
-rw-r--r-- | later.1 | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -1,4 +1,4 @@ -.Dd September 20, 2024 +.Dd October 26, 2024 .Dt LATER 1 .Os .Sh NAME @@ -6,12 +6,11 @@ .Nd list mpv's watch_later entries .Sh SYNOPSIS .Nm -.Op Fl u | \-update-titles -.Nm -.Fl h | \-help +.Op options +.Op Ic list .Sh DESCRIPTION .Nm -lists all watch_later entries as saved by +is a program to manage watch_later entries as created by .Xr mpv 1 . .Pp In order to display file names and URLs for an entry, the @@ -19,12 +18,17 @@ In order to display file names and URLs for an entry, the option must be set in .Xr mpv 1 . .Pp -The options are as follows: +The following options can be given for any command: .Bl -tag -width "-h, --update-titles" .It Fl u , Fl \-update-titles update titles of videos using yt-dlp -.It Fl h , Fl \-help -show a concise help message +.El +.Pp +The commands are as follows: +.Bl -tag -width Ds +.It Sy list +Lists all watch_later entries. +This command is implied if there are no remaining arguments. .El .Sh FILES .Bl -tag -width "1" |