summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--all.do2
-rw-r--r--clean.do2
-rw-r--r--install.do2
-rw-r--r--srtplay.172
-rw-r--r--srtplay.1.do3
-rw-r--r--srtplay.1.scd32
6 files changed, 111 insertions, 2 deletions
diff --git a/all.do b/all.do
index ebe6d64..6767369 100644
--- a/all.do
+++ b/all.do
@@ -1 +1 @@
-haredo srtplay
+haredo srtplay srtplay.1
diff --git a/clean.do b/clean.do
index 7cff50f..ae247ac 100644
--- a/clean.do
+++ b/clean.do
@@ -1 +1 @@
-rm -f srtplay
+rm -f srtplay srtplay.1
diff --git a/install.do b/install.do
index 0f393b6..8d08b3d 100644
--- a/install.do
+++ b/install.do
@@ -1,6 +1,8 @@
PREFIX="${PREFIX:-/usr}"
BINDIR="${BINDIR:-$PREFIX/bin}"
+MANDIR="${MANDIR:-$PREFIX/share/man}"
if haredo all; then
install -Dm755 ./srtplay "$BINDIR"/srtplay
+ install -Dm755 ./srtplay.1 "$MANDIR"/man1/srtplay.1
fi
diff --git a/srtplay.1 b/srtplay.1
new file mode 100644
index 0000000..0a25754
--- /dev/null
+++ b/srtplay.1
@@ -0,0 +1,72 @@
+.\" Generated by scdoc 1.11.2
+.\" Complete documentation for this program is not available as a GNU info page
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.nh
+.ad l
+.\" Begin generated content:
+.TH "srtplay" "1" "2023-06-23"
+.P
+.SH NAME
+.P
+srtplay - play .\&srt subtitle files in a terminal user interface
+.P
+.SH SYNOPSIS
+.P
+\fBsrtplay\fR <\fIfile\fR>.\&srt
+.P
+.SH DESCRIPTION
+.P
+\fBsrtplay\fR plays a .\&srt subtitle file in a TUI (Terminal User Interface).\& After
+running \fBsrtplay\fR with the name of the subtitle file to play, it displays the
+elapsed time as well as the subtitles.\& The <b>, <i>, and <u> XML tags are
+supported in the subtitles and will be displayed as bold, italic, and
+underlined, respectively.\&
+.P
+.SH KEYBINDINGS
+.P
+The following keys will execute an action when pressed at any time.\&
+.P
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+\fBq\fR: exit the program
+.RE
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+\fBj\fR: fast-backward by 10 seconds
+.RE
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+\fBk\fR: pause or resume playback
+.RE
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+\fBl\fR: fast-forward by 10 seconds
+
+.RE
+.P
+.SH AUTHORS
+.P
+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.\&
diff --git a/srtplay.1.do b/srtplay.1.do
new file mode 100644
index 0000000..d054395
--- /dev/null
+++ b/srtplay.1.do
@@ -0,0 +1,3 @@
+if haredo ++ "$1".scd; then
+ scdoc < "$1".scd > "$3"
+fi
diff --git a/srtplay.1.scd b/srtplay.1.scd
new file mode 100644
index 0000000..c4038e9
--- /dev/null
+++ b/srtplay.1.scd
@@ -0,0 +1,32 @@
+srtplay(1)
+
+# NAME
+
+srtplay - play .srt subtitle files in a terminal user interface
+
+# 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> XML tags are
+supported in the subtitles and will be displayed as bold, italic, and
+underlined, respectively.
+
+# KEYBINDINGS
+
+The following keys will execute an action when pressed at any time.
+
+- *q*: exit the program
+- *j*: fast-backward by 10 seconds
+- *k*: pause or resume playback
+- *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.