mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-29 21:04:57 +01:00
Use sphinx for documentation
This commit is contained in:
parent
df25afd5ed
commit
8bd390d396
14 changed files with 144 additions and 8 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -13,9 +13,12 @@ zathura.pc
|
||||||
gcov/
|
gcov/
|
||||||
*.swp
|
*.swp
|
||||||
version.h
|
version.h
|
||||||
doc/
|
./doc/_build
|
||||||
*.tmp
|
*.tmp
|
||||||
zathura.1
|
zathura.1
|
||||||
zathurarc.5
|
zathurarc.5
|
||||||
.version-checks/
|
.version-checks/
|
||||||
dbus-interface-definitions.c
|
dbus-interface-definitions.c
|
||||||
|
.ycm_extra_conf.py
|
||||||
|
.ropeproject
|
||||||
|
compile_commands.json
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -99,7 +99,6 @@ clean:
|
||||||
${PROJECT}-debug \
|
${PROJECT}-debug \
|
||||||
.depend \
|
.depend \
|
||||||
${PROJECT}.pc \
|
${PROJECT}.pc \
|
||||||
doc \
|
|
||||||
version.h \
|
version.h \
|
||||||
version.h.tmp \
|
version.h.tmp \
|
||||||
dbus-interface-definitions.c \
|
dbus-interface-definitions.c \
|
||||||
|
@ -111,6 +110,7 @@ ifneq "$(wildcard ${RSTTOMAN})" ""
|
||||||
endif
|
endif
|
||||||
$(QUIET)$(MAKE) -C tests clean
|
$(QUIET)$(MAKE) -C tests clean
|
||||||
$(QUIET)$(MAKE) -C po clean
|
$(QUIET)$(MAKE) -C po clean
|
||||||
|
$(QUIET)$(MAKE) -C doc clean
|
||||||
|
|
||||||
${PROJECT}-debug: ${DOBJECTS}
|
${PROJECT}-debug: ${DOBJECTS}
|
||||||
$(ECHO) CC -o $@
|
$(ECHO) CC -o $@
|
||||||
|
@ -156,7 +156,7 @@ dist: clean build-manpages
|
||||||
$(QUIET)rm -rf ${PROJECT}-${VERSION}
|
$(QUIET)rm -rf ${PROJECT}-${VERSION}
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
$(QUIET)doxygen Doxyfile
|
$(QUIET)make -C doc
|
||||||
|
|
||||||
gcov: clean
|
gcov: clean
|
||||||
$(QUIET)CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage" LDFLAGS="${LDFLAGS} -fprofile-arcs" ${MAKE} $(PROJECT)
|
$(QUIET)CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage" LDFLAGS="${LDFLAGS} -fprofile-arcs" ${MAKE} $(PROJECT)
|
||||||
|
|
3
README
3
README
|
@ -31,6 +31,9 @@ WITH_MAGIC=0.
|
||||||
If you pass these flags as a command line argument to make, you have to ensure
|
If you pass these flags as a command line argument to make, you have to ensure
|
||||||
to pass the same flags when executing the install target.
|
to pass the same flags when executing the install target.
|
||||||
|
|
||||||
|
If you want to build zathuras documentation, please install all python
|
||||||
|
dependencies from the ./doc/requirements.txt file.
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
To build and install zathura:
|
To build and install zathura:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# General information
|
# General information
|
||||||
PROJECT_NAME = zathura
|
PROJECT_NAME = zathura
|
||||||
OUTPUT_DIRECTORY = ./doc/
|
OUTPUT_DIRECTORY = ./_build/doxygen/
|
||||||
OUTPUT_LANGUAGE = English
|
OUTPUT_LANGUAGE = English
|
||||||
TAB_SIZE = 2
|
TAB_SIZE = 2
|
||||||
EXTRACT_ALL = YES
|
EXTRACT_ALL = YES
|
||||||
|
@ -16,15 +16,15 @@ WARNINGS = YES
|
||||||
WARN_IF_UNDOCUMENTED = YES
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
|
|
||||||
# Input files
|
# Input files
|
||||||
INPUT =
|
INPUT = ../
|
||||||
EXCLUDE = ./tests
|
EXCLUDE = ./tests ./doc
|
||||||
FILE_PATTERNS = *.h *.c
|
FILE_PATTERNS = *.h *.c
|
||||||
RECURSIVE = YES
|
RECURSIVE = YES
|
||||||
|
|
||||||
# Output files
|
# Output files
|
||||||
GENERATE_HTML = YES
|
GENERATE_HTML = NO
|
||||||
GENERATE_LATEX = NO
|
GENERATE_LATEX = NO
|
||||||
GENERATE_RTF = NO
|
GENERATE_RTF = NO
|
||||||
GENERATE_XML = NO
|
GENERATE_XML = YES
|
||||||
|
|
||||||
SOURCE_BROWSER = YES
|
SOURCE_BROWSER = YES
|
28
doc/Makefile
Normal file
28
doc/Makefile
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# See LICENSE file for license and copyright information
|
||||||
|
#
|
||||||
|
include ../config.mk
|
||||||
|
include ../common.mk
|
||||||
|
include config.mk
|
||||||
|
|
||||||
|
ifeq ($(shell which $(SPHINX_BIN) >/dev/null 2>&1; echo $$?), 1)
|
||||||
|
$(error The '$(SPHINX_BIN)' command was not found.)
|
||||||
|
endif
|
||||||
|
|
||||||
|
all: init html man
|
||||||
|
|
||||||
|
init:
|
||||||
|
$(QUIET)mkdir -p $(SPHINX_BUILDDIR)/
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(QUIET)rm -rf $(SPHINX_BUILDDIR)/
|
||||||
|
|
||||||
|
html: doxygen
|
||||||
|
$(QUIET)$(SPHINX_BIN) -b html $(SPHINX_OPTS) $(SPHINX_BUILDDIR)/html
|
||||||
|
|
||||||
|
man: doxygen
|
||||||
|
$(QUIET)$(SPHINX_BIN) -b man $(SPHINX_OPTS) $(SPHINX_BUILDDIR)/man
|
||||||
|
|
||||||
|
doxygen:
|
||||||
|
$(QUIET)$(DOXYGEN_BIN) Doxyfile
|
||||||
|
|
||||||
|
.PHONY: clean html man
|
2
doc/api/index.rst
Normal file
2
doc/api/index.rst
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
API and Development
|
||||||
|
===================
|
53
doc/conf.py
Normal file
53
doc/conf.py
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# See LICENSE file for license and copyright information
|
||||||
|
|
||||||
|
import sphinx_rtd_theme
|
||||||
|
|
||||||
|
# -- General configuration ------------------------------------------------
|
||||||
|
|
||||||
|
extensions = ['sphinx.ext.todo', 'breathe']
|
||||||
|
source_suffix = '.rst'
|
||||||
|
master_doc = 'index'
|
||||||
|
templates_path = ['_templates']
|
||||||
|
exclude_patterns = ['_build']
|
||||||
|
|
||||||
|
pygments_style = 'sphinx'
|
||||||
|
|
||||||
|
|
||||||
|
# -- Project configuration ------------------------------------------------
|
||||||
|
|
||||||
|
project = 'zathura'
|
||||||
|
copyright = '2014, pwmt.org'
|
||||||
|
version = '0.2.7'
|
||||||
|
release = '0.2.7'
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for HTML output ----------------------------------------------
|
||||||
|
|
||||||
|
html_theme = 'sphinx_rtd_theme'
|
||||||
|
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||||
|
html_static_path = ['_static']
|
||||||
|
htmlhelp_basename = 'zathuradoc'
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for manual page output ---------------------------------------
|
||||||
|
|
||||||
|
man_pages = [
|
||||||
|
('index', 'zathura', 'zathura Documentation', ['pwmt.org'], 1)
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for breathe ---------------------------------------
|
||||||
|
|
||||||
|
breathe_projects = { "zathura": "_build/doxygen/xml" }
|
||||||
|
breathe_default_project = "zathura"
|
||||||
|
breathe_build_directory = "_build"
|
||||||
|
breathe_projects_source = {
|
||||||
|
"zathura": "../"
|
||||||
|
}
|
||||||
|
breathe_domain_by_extension = {
|
||||||
|
"h" : "c",
|
||||||
|
"c" : "c"
|
||||||
|
}
|
7
doc/config.mk
Normal file
7
doc/config.mk
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# See LICENSE file for license and copyright information
|
||||||
|
|
||||||
|
SPHINX_BIN = sphinx-build
|
||||||
|
SPHINX_BUILDDIR = _build
|
||||||
|
SPHINX_OPTS = -d $(SPHINX_BUILDDIR)/doctrees .
|
||||||
|
|
||||||
|
DOXYGEN_BIN = doxygen
|
2
doc/configuration/index.rst
Normal file
2
doc/configuration/index.rst
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Configuration
|
||||||
|
=============
|
2
doc/faq.rst
Normal file
2
doc/faq.rst
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
FAQ
|
||||||
|
===
|
25
doc/index.rst
Normal file
25
doc/index.rst
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
.. zathura documentation master file, created by
|
||||||
|
sphinx-quickstart on Tue Apr 8 18:33:05 2014.
|
||||||
|
You can adapt this file completely to your liking, but it should at least
|
||||||
|
contain the root `toctree` directive.
|
||||||
|
|
||||||
|
Welcome to zathura's documentation!
|
||||||
|
===================================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
:numbered:
|
||||||
|
|
||||||
|
installation/index
|
||||||
|
usage/index
|
||||||
|
configuration/index
|
||||||
|
api/index
|
||||||
|
faq
|
||||||
|
|
||||||
|
Indices and tables
|
||||||
|
==================
|
||||||
|
|
||||||
|
* :ref:`genindex`
|
||||||
|
* :ref:`modindex`
|
||||||
|
* :ref:`search`
|
||||||
|
|
2
doc/installation/index.rst
Normal file
2
doc/installation/index.rst
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Installation
|
||||||
|
============
|
7
doc/requirements.txt
Normal file
7
doc/requirements.txt
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Jinja2==2.7.2
|
||||||
|
MarkupSafe==0.19
|
||||||
|
Pygments==1.6
|
||||||
|
Sphinx==1.2.2
|
||||||
|
breathe==1.2.0
|
||||||
|
docutils==0.11
|
||||||
|
sphinx-rtd-theme==0.1.6
|
2
doc/usage/index.rst
Normal file
2
doc/usage/index.rst
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Usage
|
||||||
|
=====
|
Loading…
Reference in a new issue