README.md
1<!--
2SPDX-FileCopyrightText: 2021 GNOME Foundation
3
4SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later
5-->
6
7GI-DocGen: Documentation tool for GObject-based libraries
8-------------------------------------------------------------------------------
9
10GI-DocGen is a document generator for GObject-based libraries. GObject is
11the base type system of the GNOME project. GI-Docgen reuses the
12introspection data generated by GObject-based libraries to generate the API
13reference of these libraries, as well as other ancillary documentation.
14
15## Installation
16
17### Running GI-DocGen uninstalled
18
19You can run GI-DocGen from its repository, by calling:
20
21```
22./gi-docgen.py
23```
24
25GI-DocGen will automatically detect this case.
26
27### Installing GI-DocGen via pip
28
29To install GI-DocGen, you will need to have the following pieces of software
30available on your computer:
31
32 - Python 3.6, or later
33 - pip
34
35Run the following command:
36
37```
38pip3 install --user gi-docgen
39```
40
41After running the command above, make sure to have the `~/.local/bin`
42directory listed in your `$PATH` environment variable.
43
44To update GI-DocGen, run the following command:
45
46```
47pip3 install --user --upgrade gi-docgen
48```
49
50## Usage
51
52First, read [the GI-DocGen tutorial](https://gnome.pages.gitlab.gnome.org/gi-docgen/tutorial.html).
53
54The documentation for GI-DocGen is [available online](https://gnome.pages.gitlab.gnome.org/gi-docgen/).
55
56The `examples` directory in the repository contains simple project files for
57various GNOME libraries.
58
59## Disclaimer
60
61GI-DocGen is **not** a general purpose documentation tool for C libraries.
62
63While GI-DocGen can be used to generate API references for most GObject/C
64libraries that expose introspection data, its main goal is to generate the
65reference for GTK and its immediate dependencies. Any and all attempts at
66making this tool more generic, or to cover more use cases, will be weighted
67heavily against its primary goal.
68
69GI-DocGen is still in development. The recommended use of GI-DocGen is to
70add it as a sub-project to your [Meson build system](https://mesonbuild.com),
71and vendor it when releasing dist archives.
72
73You should **not** depend on a system-wide installation until GI-DocGen is
74declared stable.
75
76If you need a general purpose documentation tool, I strongly recommend:
77
78 - [HotDoc](https://hotdoc.github.io/)
79 - [Doxygen](https://www.doxygen.nl/index.html)
80 - [GTK-Doc](https://gitlab.gnome.org/GNOME/gtk-doc/)
81
82## Copyright and Licensing terms
83
84Copyright 2021 GNOME Foundation
85
86GI-DocGen is released under the terms of the Apache License, version 2.0, or
87under the terms of the GNU General Publice License, either version 3.0 or,
88at your option, any later version.
89