From 4deecd658f18ed49d8b1a468e105c0d7cc4873cc Mon Sep 17 00:00:00 2001 From: David King Date: Fri, 9 Jul 2021 12:36:33 +0100 Subject: docs: Add g-ir-doc-tool man page --- docs/g-ir-doc-tool.1 | 74 ++++++++++++++++++++++++++++++++++++ docs/meson.build | 2 +- docs/website/tools/Makefile | 4 +- docs/website/tools/g-ir-doc-tool.rst | 65 +++++++++++++++++++++++++++++++ docs/website/tools/index.rst | 4 ++ 5 files changed, 146 insertions(+), 3 deletions(-) create mode 100644 docs/g-ir-doc-tool.1 create mode 100644 docs/website/tools/g-ir-doc-tool.rst diff --git a/docs/g-ir-doc-tool.1 b/docs/g-ir-doc-tool.1 new file mode 100644 index 00000000..dabec8f2 --- /dev/null +++ b/docs/g-ir-doc-tool.1 @@ -0,0 +1,74 @@ +.\" Man page generated from reStructuredText. +. +.TH G-IR-DOC-TOOL 1 "" "" "" +.SH NAME +g-ir-doc-tool \- Documentation builder +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.SH SYNOPSIS +.sp +\fBg\-ir\-doc\-tool\fP [OPTION...] GIRFILE +.SH DESCRIPTION +.sp +g\-ir\-doc\-tool builds library documentation directly from .gir files. The output +is adjusted according to which programming language you\(aqre generating docs for. +.SH OPTIONS +.INDENT 0.0 +.TP +.B \-\-help +Show help options +.TP +.BI \-\-output\fB= DIRECTORY +Save the resulting output in DIRECTORY. +.TP +.BI \-\-format\fB= FORMAT +Output format. One of devdocs, mallard or sections. +.TP +.BI \-\-language\fB= LANGUAGE +Output language. One of c, python, or gjs. +.TP +.BI \-\-add\-include\-path\fB= DIRECTORY +Adds a directory which will be used to find includes inside the GIR format. +.TP +.B \-\-version +Show program\(aqs version number and exit +.TP +.B \-\-write\-sections\-file +Backwards\-compatible equivalent to \-f sections. +.UNINDENT +.SH BUGS +.sp +Report bugs at \fI\%https://gitlab.gnome.org/GNOME/gobject\-introspection/issues\fP +.SH HOMEPAGE AND CONTACT +.sp +\fI\%https://gi.readthedocs.io/\fP +.SH AUTHORS +.sp +David King +.\" Generated by docutils manpage writer. +. diff --git a/docs/meson.build b/docs/meson.build index 6c335874..84cae8c1 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -1,4 +1,4 @@ -install_man('g-ir-compiler.1', 'g-ir-generate.1', 'g-ir-scanner.1') +install_man('g-ir-compiler.1', 'g-ir-doc-tool.1', 'g-ir-generate.1', 'g-ir-scanner.1') install_data('gir-1.2.rnc', install_dir: join_paths(get_option('datadir'), 'gir-1.0')) if get_option('gtk_doc') diff --git a/docs/website/tools/Makefile b/docs/website/tools/Makefile index 6fb8baff..eb352eeb 100644 --- a/docs/website/tools/Makefile +++ b/docs/website/tools/Makefile @@ -1,6 +1,6 @@ # update man pages -all: ../../g-ir-compiler.1 ../../g-ir-generate.1 ../../g-ir-scanner.1 +all: ../../g-ir-compiler.1 ../../g-ir-doc-tool.1 ../../g-ir-generate.1 ../../g-ir-scanner.1 ../../%.1:%.rst rst2man $< > $@ @@ -8,4 +8,4 @@ all: ../../g-ir-compiler.1 ../../g-ir-generate.1 ../../g-ir-scanner.1 .PHONY: clean clean: - rm -f ../../g-ir-compiler.1 ../../g-ir-generate.1 ../../g-ir-scanner.1 + rm -f ../../g-ir-compiler.1 ../../g-ir-doc-tool.1 ../../g-ir-generate.1 ../../g-ir-scanner.1 diff --git a/docs/website/tools/g-ir-doc-tool.rst b/docs/website/tools/g-ir-doc-tool.rst new file mode 100644 index 00000000..535ca059 --- /dev/null +++ b/docs/website/tools/g-ir-doc-tool.rst @@ -0,0 +1,65 @@ +============= +g-ir-doc-tool +============= + +--------------------- +Documentation builder +--------------------- + +:Manual section: 1 + + +SYNOPSIS +======== + +**g-ir-doc-tool** [OPTION...] GIRFILE + + +DESCRIPTION +=========== + +g-ir-doc-tool builds library documentation directly from .gir files. The output +is adjusted according to which programming language you're generating docs for. + + +OPTIONS +======= + +--help + Show help options + +--output=DIRECTORY + Save the resulting output in DIRECTORY. + +--format=FORMAT + Output format. One of devdocs, mallard or sections. + +--language=LANGUAGE + Output language. One of c, python, or gjs. + +--add-include-path=DIRECTORY + Adds a directory which will be used to find includes inside the GIR format. + +--version + Show program's version number and exit + +--write-sections-file + Backwards-compatible equivalent to -f sections. + + +BUGS +==== + +Report bugs at https://gitlab.gnome.org/GNOME/gobject-introspection/issues + + +HOMEPAGE and CONTACT +==================== + +https://gi.readthedocs.io/ + + +AUTHORS +======= + +David King diff --git a/docs/website/tools/index.rst b/docs/website/tools/index.rst index 44897b6c..df56e804 100644 --- a/docs/website/tools/index.rst +++ b/docs/website/tools/index.rst @@ -8,12 +8,16 @@ Command Line Tools :maxdepth: 1 g-ir-compiler + g-ir-doc-tool g-ir-generate g-ir-scanner :doc:`g-ir-compiler` Typelib compiler +:doc:`g-ir-doc-tool` + Documentation builder + :doc:`g-ir-generate` Typelib generator -- cgit v1.2.1