-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #640 from kiwix/docs
Add basic documentation for libkiwix.
- Loading branch information
Showing
8 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
api | ||
xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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()]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
breathe | ||
exhale | ||
sphinx<4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
option('wrapper', type:'array', choices:['java', 'android'], value:[], | ||
description: 'The wrapper to generate.') | ||
option('doc', type : 'boolean', value : false, | ||
description : 'Build the documentations.') |