diff options
| author | Sam Nystrom <sam@samnystrom.dev> | 2023-10-25 17:43:11 -0400 |
|---|---|---|
| committer | Sam Nystrom <sam@samnystrom.dev> | 2023-10-25 17:43:11 -0400 |
| commit | b68ebb8e338114da3a21991e8423d00fbd83a0b9 (patch) | |
| tree | 692fd6603797732c5599f015e942b4f2e0675206 | |
| parent | 8249239acdf72c330818f2f8b8b320a84ac45d89 (diff) | |
Rewrite man page in mdoc0.3.1
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | Makefile | 16 | ||||
| -rw-r--r-- | README.md | 14 | ||||
| -rw-r--r-- | srtplay.1 | 38 | ||||
| -rw-r--r-- | srtplay.1.scd | 32 |
5 files changed, 47 insertions, 54 deletions
diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 172332b..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/srtplay.1 @@ -1,25 +1,17 @@ .POSIX: +.SUFFIXES: PREFIX=/usr/local BINDIR=$(PREFIX)/bin MANDIR=$(PREFIX)/share/man -all: srtplay srtplay.1 +all: -srtplay: - perl -c srtplay - -srtplay.1: srtplay.1.scd - scdoc < $< > $@ - -clean: - rm -f srtplay.1 - -install: srtplay srtplay.1 +install: install -Dm755 srtplay $(BINDIR)/srtplay install -Dm644 srtplay.1 $(MANDIR)/man1/srtplay.1 uninstall: rm -f $(BINDIR)/srtplay $(MANDIR)/man1/srtplay.1 -.PHONY: all srtplay clean install uninstall +.PHONY: install uninstall @@ -1,24 +1,20 @@ # srtplay -Play .srt subtitle files in a terminal. +Play SRT subtitle files in a terminal. ## Installation -1. Install [Perl](https://perl.org) and [scdoc](https://git.sr.ht/~sircmpwn/scdoc) +1. Install [Perl](https://perl.org) 2. Install the Time::HiRes, Term::ReadKey, and XML::Parser Perl modules -3. `make` -4. `make install` +3. `make install` ## Usage ```sh -srtplay <file>.srt +srtplay <file> ``` -See the [man page](https://git.sr.ht/~stonks3141/srtplay/tree/main/item/srtplay.1.scd) -for further information. - -### TUI key bindings +### Key bindings - `q`, `<Ctrl-C>`: exit the program - `k`, `<space>`: pause or resume playback diff --git a/srtplay.1 b/srtplay.1 new file mode 100644 index 0000000..56d1ee2 --- /dev/null +++ b/srtplay.1 @@ -0,0 +1,38 @@ +.Dd $Mdocdate$ +.Dt SRTPLAY 1 +.Os +.Sh NAME +.Nm srtplay +.Nd text-mode player for SRT subtitle files +.Sh SYNOPSIS +.Nm +.Ar FILE +.Sh DESCRIPTION +.Nm +plays SRT subtitle files in a text-based interface. After running +.Nm +with the name of the subtitle file to play, it displays the elapsed time +as well as the subtitles. The <b>, <i>, and <u> HTML tags are +supported in the subtitles and will be displayed as bold, italic, and +underlined, respectively. Other tags are ignored and stripped from the +output. +.Ss KEY BINDINGS +The following keys may be pressed at any time. +.Bl -hang +.It q, <Ctrl-C> +exit the program +.It k, <space> +pause or resume playback +.It j +fast-backward by 10 seconds +.It l +fast-forward by 10 seconds +.El +.Sh AUTHORS +Maintained by +.An Sam Nystrom +.Mt sam@samnystrom.dev . +Source code is available at +.Lk https://git.sr.ht/~stonks3141/srtplay . +Send patches and bug reports to +.Mt ~stonks3141/public-inbox@lists.sr.ht . diff --git a/srtplay.1.scd b/srtplay.1.scd deleted file mode 100644 index fe5ee9c..0000000 --- a/srtplay.1.scd +++ /dev/null @@ -1,32 +0,0 @@ -srtplay(1) - -# NAME - -srtplay - play .srt subtitle files in a terminal - -# SYNOPSIS - -*srtplay* <_file_>.srt - -# DESCRIPTION - -*srtplay* plays a .srt subtitle file in a TUI (Terminal User Interface). After -running *srtplay* with the name of the subtitle file to play, it displays the -elapsed time as well as the subtitles. The <b>, <i>, and <u> HTML tags are -supported in the subtitles and will be displayed as bold, italic, and -underlined, respectively. - -# KEY BINDINGS - -The following keys may be pressed at any time. - -- *q*, *<Ctrl-C>*: exit the program -- *k*, *<space>*: pause or resume playback -- *j*: fast-backward by 10 seconds -- *l*: fast-forward by 10 seconds - -# AUTHORS - -Maintained by Sam Nystrom <sam@samnystrom.dev>. Source code is available at -https://git.sr.ht/~stonks3141/srtplay. Send patches and bug reports to -~stonks3141/public-inbox@lists.sr.ht. |
