mirror of https://github.com/kiwix/libkiwix.git
Merge pull request #640 from kiwix/docs
Add basic documentation for libkiwix.
This commit is contained in:
commit
fa8d0f8e07
|
@ -0,0 +1,2 @@
|
||||||
|
api
|
||||||
|
xml
|
|
@ -0,0 +1,72 @@
|
||||||
|
# Configuration file for the Sphinx documentation builder.
|
||||||
|
#
|
||||||
|
# This file only contains a selection of the most common options. For a full
|
||||||
|
# list see the documentation:
|
||||||
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||||
|
|
||||||
|
# -- Path setup --------------------------------------------------------------
|
||||||
|
|
||||||
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
|
#
|
||||||
|
import os
|
||||||
|
# import sys
|
||||||
|
# sys.path.insert(0, os.path.abspath('.'))
|
||||||
|
|
||||||
|
|
||||||
|
# -- Project information -----------------------------------------------------
|
||||||
|
|
||||||
|
project = 'libkiwix'
|
||||||
|
copyright = '2021, libzim-team'
|
||||||
|
author = 'libzim-team'
|
||||||
|
|
||||||
|
|
||||||
|
# -- General configuration ---------------------------------------------------
|
||||||
|
|
||||||
|
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||||
|
|
||||||
|
# Add any Sphinx extension module names here, as strings. They can be
|
||||||
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||||
|
# ones.
|
||||||
|
extensions = [
|
||||||
|
'breathe',
|
||||||
|
'exhale'
|
||||||
|
]
|
||||||
|
|
||||||
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
|
templates_path = ['_templates']
|
||||||
|
|
||||||
|
# List of patterns, relative to source directory, that match files and
|
||||||
|
# directories to ignore when looking for source files.
|
||||||
|
# This pattern also affects html_static_path and html_extra_path.
|
||||||
|
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||||
|
|
||||||
|
|
||||||
|
if not on_rtd:
|
||||||
|
html_theme = 'sphinx_rtd_theme'
|
||||||
|
|
||||||
|
# Add any paths that contain custom static files (such as style sheets) here,
|
||||||
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
|
html_static_path = ['_static']
|
||||||
|
|
||||||
|
breathe_projects = {
|
||||||
|
"libkiwix": "./xml"
|
||||||
|
}
|
||||||
|
breathe_default_project = 'libkiwix'
|
||||||
|
|
||||||
|
exhale_args = {
|
||||||
|
"containmentFolder": "./api",
|
||||||
|
"rootFileName": "ref_api.rst",
|
||||||
|
"rootFileTitle": "Reference API",
|
||||||
|
"doxygenStripFromPath":"..",
|
||||||
|
"treeViewIsBootstrap": True,
|
||||||
|
"createTreeView" : True,
|
||||||
|
"exhaleExecutesDoxygen": True,
|
||||||
|
"exhaleDoxygenStdin": "INPUT = ../include"
|
||||||
|
}
|
||||||
|
|
||||||
|
primary_domain = 'cpp'
|
||||||
|
|
||||||
|
highlight_language = 'cpp'
|
|
@ -0,0 +1,14 @@
|
||||||
|
.. libkiwix documentation master file, created by
|
||||||
|
sphinx-quickstart on Fri Jul 24 15:40:50 2020.
|
||||||
|
You can adapt this file completely to your liking, but it should at least
|
||||||
|
contain the root `toctree` directive.
|
||||||
|
|
||||||
|
Welcome to libzim's documentation!
|
||||||
|
==================================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
:caption: Contents:
|
||||||
|
|
||||||
|
usage
|
||||||
|
api/ref_api
|
|
@ -0,0 +1,7 @@
|
||||||
|
|
||||||
|
sphinx = find_program('sphinx-build', native:true)
|
||||||
|
|
||||||
|
sphinx_target = run_target('doc',
|
||||||
|
command: [sphinx, '-bhtml',
|
||||||
|
meson.current_source_dir(),
|
||||||
|
meson.current_build_dir()])
|
|
@ -0,0 +1,3 @@
|
||||||
|
breathe
|
||||||
|
exhale
|
||||||
|
sphinx<4
|
|
@ -0,0 +1,17 @@
|
||||||
|
Libkiwix programming
|
||||||
|
====================
|
||||||
|
|
||||||
|
Introduction
|
||||||
|
------------
|
||||||
|
|
||||||
|
libkiwix is written in C++. To use the library, you need the include files of libkiwix have
|
||||||
|
to link against libzim.
|
||||||
|
|
||||||
|
Errors are handled with exceptions. When something goes wrong, libzim throws an error,
|
||||||
|
which is always derived from std::exception.
|
||||||
|
|
||||||
|
All classes are defined in the namespace kiwix.
|
||||||
|
|
||||||
|
libkiwix is a set of tools to manage zim files and provide some common functionnality.
|
||||||
|
While libkiwix has some wrappers around libzim classes, they are deprecated and will be removed
|
||||||
|
in the future.
|
|
@ -78,6 +78,9 @@ subdir('scripts')
|
||||||
subdir('static')
|
subdir('static')
|
||||||
subdir('src')
|
subdir('src')
|
||||||
subdir('test')
|
subdir('test')
|
||||||
|
if get_option('doc')
|
||||||
|
subdir('docs')
|
||||||
|
endif
|
||||||
|
|
||||||
pkg_requires = ['libzim', 'icu-i18n', 'pugixml', 'libcurl', 'libmicrohttpd', 'xapian-core']
|
pkg_requires = ['libzim', 'icu-i18n', 'pugixml', 'libcurl', 'libmicrohttpd', 'xapian-core']
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
option('wrapper', type:'array', choices:['java', 'android'], value:[],
|
option('wrapper', type:'array', choices:['java', 'android'], value:[],
|
||||||
description: 'The wrapper to generate.')
|
description: 'The wrapper to generate.')
|
||||||
|
option('doc', type : 'boolean', value : false,
|
||||||
|
description : 'Build the documentations.')
|
||||||
|
|
Loading…
Reference in New Issue