[gnome-battery-bench] Add a manual page for gbb.
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-battery-bench] Add a manual page for gbb.
- Date: Mon, 5 Jan 2015 13:01:45 +0000 (UTC)
commit dd0d0951f359f9fdf4790954d63e438186f7eaf9
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Fri Jan 2 17:12:25 2015 -0500
Add a manual page for gbb.
Add a basic manual page for the gbb command line client. The asciidoc
and xmlto tools must be installed for the manual page to be built.
.gitignore | 2 +
Makefile.am | 2 +-
configure.ac | 5 +++
docs/Makefile.am | 17 ++++++++++
docs/asciidoc.conf | 18 ++++++++++
docs/gbb.txt | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 134 insertions(+), 1 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b01358c..f7e8d95 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,8 @@ depcomp
/config.h
/config.h.in
gbb
+gbb.1
+gbb.html
gnome-battery-bench
gnome-battery-bench-helper
install-sh
diff --git a/Makefile.am b/Makefile.am
index 4e0cbb4..9af841b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1 +1 @@
-SUBDIRS=data src tests
+SUBDIRS=data docs src tests
diff --git a/configure.ac b/configure.ac
index f2b1389..e70b81a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,10 @@ PKG_CHECK_MODULES([HELPER], [$base_packages polkit-gobject-1])
PKG_CHECK_MODULES([COMMANDLINE], [$base_packages $x_packages json-glib-1.0])
PKG_CHECK_MODULES([APPLICATION], [$base_packages $x_packages gtk+-3.0 json-glib-1.0])
+AC_PATH_PROG(ASCIIDOC, asciidoc, "")
+AC_PATH_PROG(XMLTO, xmlto, "")
+AM_CONDITIONAL(BUILD_DOCS, [ ASCIIDOC != x -a XMLTO != x ])
+
GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable glib_compile_resources gio-2.0`
AC_SUBST(GLIB_COMPILE_RESOURCES)
@@ -41,6 +45,7 @@ AC_SUBST(AM_CFLAGS)
AC_CONFIG_FILES([
Makefile
data/Makefile
+ docs/Makefile
src/Makefile
tests/Makefile
])
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644
index 0000000..f43d9f1
--- /dev/null
+++ b/docs/Makefile.am
@@ -0,0 +1,17 @@
+CLEANFILES =
+EXTRA_DIST =
+
+man1_MANS = gbb.1
+
+EXTRA_DIST += asciidoc.conf gbb.txt
+CLEANFILES += gbb.html gbb.1
+
+%.xml: %.txt
+ $(AM_V_GEN) $(ASCIIDOC) -f $(srcdir)/asciidoc.conf -d manpage -b docbook -o $@ $<
+
+%.html: %.txt
+ $(AM_V_GEN) $(ASCIIDOC) -f $(srcdir)/asciidoc.conf -d manpage -o $@ $<
+
+%.1: %.xml
+ $(AM_V_GEN) $(XMLTO) man $<
+
diff --git a/docs/asciidoc.conf b/docs/asciidoc.conf
new file mode 100644
index 0000000..9eb1c64
--- /dev/null
+++ b/docs/asciidoc.conf
@@ -0,0 +1,18 @@
+ifdef::doctype-manpage[]
+ifdef::backend-docbook[]
+[header]
+template::[header-declarations]
+<refentry>
+<refmeta>
+<refentrytitle>{mantitle}</refentrytitle>
+<manvolnum>{manvolnum}</manvolnum>
+<refmiscinfo class="source">GNOME Battery Bench Manual</refmiscinfo>
+<refmiscinfo class="version"></refmiscinfo>
+<refmiscinfo class="manual">GNOME Battery Bench Manual</refmiscinfo>
+</refmeta>
+<refnamediv>
+ <refname>{manname}</refname>
+ <refpurpose>{manpurpose}</refpurpose>
+</refnamediv>
+endif::backend-docbook[]
+endif::doctype-manpage[]
diff --git a/docs/gbb.txt b/docs/gbb.txt
new file mode 100644
index 0000000..1c95eb7
--- /dev/null
+++ b/docs/gbb.txt
@@ -0,0 +1,91 @@
+gbb(1)
+======
+
+NAME
+----
+gbb - Command line integration client for GNOME Battery Bench
+
+SYNOPSIS
+--------
+[verse]
+'gbb monitor'
+'gbb play <filename>'
+'gbb play-local <filename>'
+'gbb record' [-o | --output <output file]
+'gbb test' [-o | --output <output file] [--duration <hours>h<minutes>m<seconds>s] [--min-battery <percent>]
[--screen-brightness <percent>] <test-id>
+
+DESCRIPTION
+------------
+
+'gbb' is a command line client which is provided as part of the GNOME Battery Bench system.
+For interactive exploration and testing, the GNOME Battery Bench application provides a
+more polished interface, but gbb can be used for automating tests ('gbb tests'), developing
+new tests ('gbb record', and 'gbb play'), and debugging the GNOME Battery Bench application code
+('gbb monitor').
+
+For more information about GNOME Battery Bench, see the GNOME Battery Bench
+http://git.gnome.org/browse/gnome-battery-bench/plain/README[README file]
+
+COMMANDS
+--------
+
+monitor
+~~~~~~~
+
+'gbb monitor'
+
+Monitors the current battery usage, and prints statistics to standard out. This is a tool
+for developing gbb and isn't very useful.
+
+play
+~~~~
+
+'gbb play' <filename>
+
+Replays an event log recorded with 'gbb record'. This is mostly meant to try out an
+event log that you recorded without having to create a full test and install it
+the per-user or system-wide test directories.
+
+play-local
+~~~~~~~~~~
+
+'gbb play-local' <filename>
+
+Exactly the same as 'gbb play', but instead of talking to gnome-battery-bench-helper
+over D-BUS, it assumes that the current user has privileges to simulate events
+via '/dev/uinput'.
+
+record
+~~~~~~
+
+'gbb record' [-o | --output <output file>]
+
+Records events to standard output, or if '--output' is specified, to the given file.
+
+test
+~~~~
+
+Runs the specified test. Tests are looked for in '/usr/share/gnome-battery-bench/tests'
+and in '~/.config/gnome-battery-bench/.tests'.
+
+'gbb test' [-o | --output <output file] [--duration <hours>h<minutes>m<seconds>s] [--min-battery <percent>]
[--screen-brightness <percent>] <test-id>
+
+--output;;
+ Specifies the output filename. If not specified, the output will be written in
+ '~/.local/share/gnome-batttery-bench/logs', and will be visible in the list of
+ historical runs in the user interface.
+
+--duration;;
+ Specifies how long to run the test for. Any or all of hours, minutes, and seconds
+ can be specified - e.g. '1h', '1h10m', '10m3s', '100s'.
+
+--min-battery;;
+ Specifies that the test will run until the battery reaches the specified percentage.
+ Exclusive with the '--duration' argument
+
+--screen-brightness;;
+ Sets the brightness of the backlight during the test
+
+Author
+------
+Written by Owen Taylor <otaylor fishsoup net>.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]