Permalink
Browse files

Add ffcast(1) man page.

  • Loading branch information...
lolilolicon committed Oct 21, 2011
1 parent 569639b commit 4e805a2d51f82202bf6e1ee0a400105005cbe3e8
Showing with 179 additions and 5 deletions.
  1. +13 −5 Makefile
  2. +166 −0 ffcast.1.pod
View
@@ -3,7 +3,7 @@ VERSION = $(shell git describe)
SRC = ${wildcard *.c}
OBJ = ${SRC:.c=.o}
-DISTFILES = Makefile README.asciidoc ffcast.bash xrectsel.c
+DISTFILES = Makefile README.asciidoc ffcast.1.pod ffcast.bash xrectsel.c
PREFIX ?= /usr
MANPREFIX ?= ${PREFIX}/share/man
@@ -12,22 +12,30 @@ CPPFLAGS := -DVERSION=\"${VERSION}\" ${CPPFLAGS}
CFLAGS := --std=c99 -g -pedantic -Wall -Wextra -Wno-variadic-macros ${CFLAGS}
LDFLAGS := -lX11 ${LDFLAGS}
-all: ${OUT}
+all: ${OUT} doc
${OUT}: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS}
+doc: ffcast.1
+
+ffcast.1: ffcast.1.pod
+ pod2man --center="FFcast Manual" --name="FFCAST" --release="ffcast ${VERSION}" --section=1 $< > $@
+
strip: ${OUT}
strip --strip-all ${OUT}
-install: xrectsel ffcast.bash
+install: ffcast.1 ffcast.bash xrectsel
install -D -m755 xrectsel ${DESTDIR}${PREFIX}/bin/xrectsel
install -D -m755 ffcast.bash ${DESTDIR}${PREFIX}/bin/ffcast
+ install -D -m755 ffcast.1 ${DESTDIR}${PREFIX}/man1/ffcast.1
uninstall:
@echo removing executable file from ${DESTDIR}${PREFIX}/bin
rm -f ${DESTDIR}${PREFIX}/bin/xrectsel
rm -f ${DESTDIR}${PREFIX}/bin/ffcast
+ @echo removing man page from ${DESTDIR}${PREFIX}/man1/ffcast.1
+ rm -f ${DESTDIR}${PREFIX}/man1/ffcast.1
dist: clean
mkdir ffcast-${VERSION}
@@ -38,6 +46,6 @@ dist: clean
rm -rf ffcast-${VERSION}
clean:
- ${RM} ${OUT} ${OBJ}
+ ${RM} ${OUT} ${OBJ} ffcast.1
-.PHONY: clean dist install uninstall
+.PHONY: clean dist doc install uninstall
View
@@ -0,0 +1,166 @@
+=head1 NAME
+
+ffcast - screencast an interactively selected region
+
+=head1 SYNOPSIS
+
+=over 4
+
+=item B<ffcast> [<options>] [<geospec>] B<%> [<command> [<args>]]
+
+=item B<ffcast> [<options>] [<geospec>] [<command> [<args>] [B<-->] [<args>]]
+
+=back
+
+=head1 DESCRIPTION
+
+ffcast is a thin glue between interactive region selection and command line
+tools that accept numerical geometry parameters. It makes passing geometry
+parameters to command line tools as easy as a mouse click. Screencasting
+tools are typical examples of such command line tools.
+
+Typically, ffcast prompts the user to select a screen region and injects the
+geometry parameters thereof into the arguments of I<E<lt>commandE<gt>>, and
+then executes the resultant command line.
+
+The first form is called the B<format string syntax>. Format strings in
+I<E<lt>argsE<gt>> are substituted with the corresponding geometry parameters.
+See B<L<FORMAT STRINGS|/FORMAT STRINGS>>.
+
+The second form is called the B<double hyphen syntax>. Only a limited set of
+commands are recognized. A set of geometry-related arguments specific to
+I<E<lt>commandE<gt>> are inserted in place of the first argument that is
+`B<-->', or if `B<-->' is not found, immediately after I<E<lt>commandE<gt>>.
+I<E<lt>argsE<gt>> are left as they are specified.
+
+If I<E<lt>commandE<gt>> is not given, a default B<ffmpeg> command line is
+used.
+
+=head1 OPTIONS
+
+Any of the I<E<lt>optionsE<gt>> can be repeated. They are parsed and applied
+in the order they are specified.
+
+=over 4
+
+=item B<-b>
+
+Include borders of windows to be selected.
+
+=item B<-h>
+
+Print help message, then exit. When used with B<-v>, print long help.
+
+=item B<-l>
+
+List commands recognized by the B<double hyphen syntax>, then exit.
+
+=item B<-m>
+
+Trim both dimensions of the selected region to be divisible by B<16>. By
+default, both dimensions are trimmed to be divisible by B<2>, which is
+required by B<ffmpeg>. This switch may improve video quality.
+
+=item B<-p>
+
+Print geometry of the selected region and exit without executing
+I<E<lt>commandE<gt>>. The dimensions are not trimmed.
+
+=item B<-q>
+
+Be less verbose.
+
+=item B<-s>
+
+Prompt to select a region.
+
+=item B<-v>
+
+Be more verbose.
+
+=item B<-w>
+
+Prompt to select a window.
+
+=back
+
+=head1 FORMAT STRINGS
+
+The B<format string syntax> defines the following format strings:
+
+=over 4
+
+=item B<%d>
+
+B<DISPLAY>
+
+=item B<%h>
+
+Height
+
+=item B<%w>
+
+Width
+
+=item B<%x>
+
+Left offset
+
+=item B<%y>
+
+Top offset
+
+=item B<%X>
+
+Right offset
+
+=item B<%Y>
+
+Bottom offset
+
+=item B<%%>
+
+A literal %
+
+=back
+
+=head1 GEOMETRY SPECIFICATION
+
+The I<E<lt>geospecE<gt>> specifies a geometry in one of the following forms:
+
+=over 4
+
+=item S<I<x>B<,>I<y> I<X>B<,>I<Y>>
+
+I<x>, I<y>, I<X> and I<Y> are the left, top, right and bottom offsets,
+respectively.
+
+=item I<w>B<x>I<h>B<+>I<x>B<+>I<y>
+
+I<w>, I<h>, I<x> and I<y> are the width, height and left and right offsets,
+respectively.
+
+=back
+
+=head1 ENVIRONMENT
+
+=over 4
+
+=item B<DISPLAY>
+
+To get the default host and display number.
+
+=back
+
+=head1 AUTHOR
+
+lolilolicon E<lt>lolilolicon@gmail.comE<gt>
+
+=head1 SEE ALSO
+
+B<ffmpeg(1)>
+
+=cut
+
+=for comment
+vim:ft=pod:spell:spelllang=en_us:cc=78:

0 comments on commit 4e805a2

Please sign in to comment.