[A] Added doc files
This commit is contained in:
parent
dc7640a9e4
commit
66694a7a9c
2495
docs/Doxyfile
Normal file
2495
docs/Doxyfile
Normal file
File diff suppressed because it is too large
Load Diff
31
docs/Makefile
Normal file
31
docs/Makefile
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# Minimal makefile for Sphinx documentation
|
||||||
|
#
|
||||||
|
|
||||||
|
# You can set these variables from the command line.
|
||||||
|
SPHINXOPTS =
|
||||||
|
SPHINXBUILD = sphinx-build
|
||||||
|
SPHINXPROJ = libfort
|
||||||
|
SOURCEDIR = .
|
||||||
|
BUILDDIR = _build
|
||||||
|
|
||||||
|
|
||||||
|
doxygen: ../lib/*.h ../lib/*.hpp
|
||||||
|
doxygen Doxyfile
|
||||||
|
|
||||||
|
# Put it first so that "make" without argument is like "make help".
|
||||||
|
help:
|
||||||
|
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
|
.PHONY: help Makefile
|
||||||
|
|
||||||
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||||
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||||
|
|
||||||
|
##%: Makefile
|
||||||
|
## @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
|
html: doxygen Makefile
|
||||||
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
169
docs/conf.py
Normal file
169
docs/conf.py
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# libfort documentation build configuration file, created by
|
||||||
|
# sphinx-quickstart on Sat May 5 13:10:07 2018.
|
||||||
|
#
|
||||||
|
# This file is execfile()d with the current directory set to its
|
||||||
|
# containing dir.
|
||||||
|
#
|
||||||
|
# Note that not all possible configuration values are present in this
|
||||||
|
# autogenerated file.
|
||||||
|
#
|
||||||
|
# All configuration values have a default; values that are commented out
|
||||||
|
# serve to show the default.
|
||||||
|
|
||||||
|
# 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('.'))
|
||||||
|
|
||||||
|
|
||||||
|
# -- General configuration ------------------------------------------------
|
||||||
|
|
||||||
|
# If your documentation needs a minimal Sphinx version, state it here.
|
||||||
|
#
|
||||||
|
# needs_sphinx = '1.0'
|
||||||
|
|
||||||
|
# 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']
|
||||||
|
#extensions = []
|
||||||
|
|
||||||
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
|
templates_path = ['_templates']
|
||||||
|
|
||||||
|
# The suffix(es) of source filenames.
|
||||||
|
# You can specify multiple suffix as a list of string:
|
||||||
|
#
|
||||||
|
# source_suffix = ['.rst', '.md']
|
||||||
|
source_suffix = '.rst'
|
||||||
|
|
||||||
|
# The master toctree document.
|
||||||
|
master_doc = 'index'
|
||||||
|
|
||||||
|
# General information about the project.
|
||||||
|
project = u'libfort'
|
||||||
|
copyright = u'2018, Seleznev Anton'
|
||||||
|
author = u'Seleznev Anton'
|
||||||
|
|
||||||
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
|
# |version| and |release|, also used in various other places throughout the
|
||||||
|
# built documents.
|
||||||
|
#
|
||||||
|
# The short X.Y version.
|
||||||
|
version = u'0.1'
|
||||||
|
# The full version, including alpha/beta/rc tags.
|
||||||
|
release = u'0.1'
|
||||||
|
|
||||||
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
|
# for a list of supported languages.
|
||||||
|
#
|
||||||
|
# This is also used if you do content translation via gettext catalogs.
|
||||||
|
# Usually you set "language" from the command line for these cases.
|
||||||
|
language = None
|
||||||
|
|
||||||
|
# List of patterns, relative to source directory, that match files and
|
||||||
|
# directories to ignore when looking for source files.
|
||||||
|
# This patterns also effect to html_static_path and html_extra_path
|
||||||
|
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||||
|
|
||||||
|
# The name of the Pygments (syntax highlighting) style to use.
|
||||||
|
pygments_style = 'sphinx'
|
||||||
|
|
||||||
|
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||||
|
todo_include_todos = False
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for HTML output ----------------------------------------------
|
||||||
|
|
||||||
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
|
# a list of builtin themes.
|
||||||
|
#
|
||||||
|
html_theme = 'alabaster'
|
||||||
|
|
||||||
|
# Theme options are theme-specific and customize the look and feel of a theme
|
||||||
|
# further. For a list of options available for each theme, see the
|
||||||
|
# documentation.
|
||||||
|
#
|
||||||
|
# html_theme_options = {}
|
||||||
|
|
||||||
|
# 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']
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for HTMLHelp output ------------------------------------------
|
||||||
|
|
||||||
|
# Output file base name for HTML help builder.
|
||||||
|
htmlhelp_basename = 'libfortdoc'
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for LaTeX output ---------------------------------------------
|
||||||
|
|
||||||
|
latex_elements = {
|
||||||
|
# The paper size ('letterpaper' or 'a4paper').
|
||||||
|
#
|
||||||
|
# 'papersize': 'letterpaper',
|
||||||
|
|
||||||
|
# The font size ('10pt', '11pt' or '12pt').
|
||||||
|
#
|
||||||
|
# 'pointsize': '10pt',
|
||||||
|
|
||||||
|
# Additional stuff for the LaTeX preamble.
|
||||||
|
#
|
||||||
|
# 'preamble': '',
|
||||||
|
|
||||||
|
# Latex figure (float) alignment
|
||||||
|
#
|
||||||
|
# 'figure_align': 'htbp',
|
||||||
|
}
|
||||||
|
|
||||||
|
# Grouping the document tree into LaTeX files. List of tuples
|
||||||
|
# (source start file, target name, title,
|
||||||
|
# author, documentclass [howto, manual, or own class]).
|
||||||
|
latex_documents = [
|
||||||
|
(master_doc, 'libfort.tex', u'libfort Documentation',
|
||||||
|
u'Seleznev Anton', 'manual'),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for manual page output ---------------------------------------
|
||||||
|
|
||||||
|
# One entry per manual page. List of tuples
|
||||||
|
# (source start file, name, description, authors, manual section).
|
||||||
|
man_pages = [
|
||||||
|
(master_doc, 'libfort', u'libfort Documentation',
|
||||||
|
[author], 1)
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for Texinfo output -------------------------------------------
|
||||||
|
|
||||||
|
# Grouping the document tree into Texinfo files. List of tuples
|
||||||
|
# (source start file, target name, title, author,
|
||||||
|
# dir menu entry, description, category)
|
||||||
|
texinfo_documents = [
|
||||||
|
(master_doc, 'libfort', u'libfort Documentation',
|
||||||
|
author, 'libfort', 'One line description of project.',
|
||||||
|
'Miscellaneous'),
|
||||||
|
]
|
||||||
|
|
||||||
|
# -- Options for breathe --------------------------------------------------
|
||||||
|
|
||||||
|
import subprocess, os
|
||||||
|
|
||||||
|
read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
|
||||||
|
|
||||||
|
if read_the_docs_build:
|
||||||
|
subprocess.call('doxygen Doxyfile', shell = True)
|
||||||
|
|
||||||
|
#breathe_projects = {"libfort": "doxyxml/xml"}
|
||||||
|
#breathe_projects = {"libfort": "xml"}
|
||||||
|
breathe_projects = {"libfort": "xml"}
|
||||||
|
breathe_default_project = "libfort"
|
||||||
|
|
79
docs/index.md
Normal file
79
docs/index.md
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
# LIBFORT
|
||||||
|
|
||||||
|
These pages contain the API documentation of **libfort** - simple library to create formatted tables for console applications.
|
||||||
|
|
||||||
|
- @link fort.h `libfort C API` @endlink
|
||||||
|
- Functions
|
||||||
|
- Table lifetime management
|
||||||
|
- @link ft_create_table ft_create_table @endlink -- create table
|
||||||
|
- @link ft_destroy_table ft_destroy_table @endlink -- destroy table
|
||||||
|
- Table navigation
|
||||||
|
- @link ft_set_cur_cell ft_set_cur_cell @endlink -- set current cell
|
||||||
|
- @link ft_ln ft_ln @endlink -- move current position to the first cell of the next row
|
||||||
|
- @link ft_cur_row ft_cur_row @endlink -- get current row
|
||||||
|
- @link ft_cur_col ft_cur_col @endlink -- get current column
|
||||||
|
- Fill table with content
|
||||||
|
- @link ft_printf ft_printf @endlink -- fill cells according to the format string
|
||||||
|
- @link ft_printf_ln ft_printf_ln @endlink -- fill cells according to the format string and move to the next line
|
||||||
|
- @link ft_write ft_write @endlink -- fill cells with the specified strings
|
||||||
|
- @link ft_write ft_write_ln @endlink -- fill cells with the specified strings and move to the next line
|
||||||
|
- @link ft_nwrite ft_nwrite @endlink -- fill cells with the specified strings
|
||||||
|
- @link ft_nwrite ft_nwrite_ln @endlink -- fill cells with the specified strings and move to the next line
|
||||||
|
- @link ft_row_write ft_row_write @endlink -- fill cells with the strings from the array
|
||||||
|
- @link ft_row_write_ln ft_row_write_ln @endlink -- fill cells with the strings from the array and move to the next line
|
||||||
|
- @link ft_table_write ft_table_write @endlink -- fill cells with the strings from the 2D array
|
||||||
|
- @link ft_table_write_ln ft_table_write_ln @endlink -- fill cells with the strings from the 2D array and move to the next line
|
||||||
|
- @link ft_add_separator ft_add_separator @endlink -- add horizontal separator
|
||||||
|
- Modify appearance of the table
|
||||||
|
- @link ft_set_default_border_style ft_set_default_border_style @endlink -- set default border style for all new created tables
|
||||||
|
- @link ft_set_border_style ft_set_border_style @endlink -- modify border style of the table
|
||||||
|
- @link ft_set_default_cell_option ft_set_default_cell_option @endlink -- set default cell option for all new created tables
|
||||||
|
- @link ft_set_cell_option ft_set_cell_option @endlink -- set cell option for the table
|
||||||
|
- @link ft_set_default_tbl_option ft_set_default_tbl_option @endlink -- set default table option for all new created tables
|
||||||
|
- @link ft_set_tbl_option ft_set_tbl_option @endlink -- set table option for the table
|
||||||
|
- @link ft_set_cell_span ft_set_cell_span @endlink -- set cell span
|
||||||
|
- Others
|
||||||
|
- @link ft_set_memory_funcs ft_set_memory_funcs @endlink -- set memory allocation functions for the library
|
||||||
|
- Data structures and types
|
||||||
|
- @link ft_table_t ft_table_t @endlink -- table handler
|
||||||
|
- @link ft_border_chars ft_border_chars @endlink -- structure describing border appearance
|
||||||
|
- @link ft_text_alignment ft_text_alignment @endlink -- alignment of cell content
|
||||||
|
- @link ft_row_type ft_row_type @endlink -- alignment of cell content
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```text
|
||||||
|
FT_BASIC_STYLE FT_SIMPLE_STYLE
|
||||||
|
|
||||||
|
+------+--------------------------+------+--------+
|
||||||
|
| Rank | Title | Year | Rating | Rank Title Year Rating
|
||||||
|
+------+--------------------------+------+--------+ ------ -------------------------- ------ --------
|
||||||
|
| 1 | The Shawshank Redemption | 1994 | 9.5 | 1 The Shawshank Redemption 1994 9.5
|
||||||
|
| 2 | 12 Angry Men | 1957 | 8.8 | 2 12 Angry Men 1957 8.8
|
||||||
|
| 3 | It's a Wonderful Life | 1946 | 8.6 | 3 It's a Wonderful Life 1946 8.6
|
||||||
|
+------+--------------------------+------+--------+ ------ -------------------------- ------ --------
|
||||||
|
| 4 | 2001: A Space Odyssey | 1968 | 8.5 | 4 2001: A Space Odyssey 1968 8.5
|
||||||
|
| 5 | Blade Runner | 1982 | 8.1 | 5 Blade Runner 1982 8.1
|
||||||
|
+------+--------------------------+------+--------+
|
||||||
|
```
|
||||||
|
```text
|
||||||
|
FT_PLAIN_STYLE FT_DOT_STYLE
|
||||||
|
|
||||||
|
-------------------------------------------------
|
||||||
|
Rank Title Year Rating
|
||||||
|
-------------------------------------------------
|
||||||
|
1 The Shawshank Redemption 1994 9.5
|
||||||
|
2 12 Angry Men 1957 8.8
|
||||||
|
3 It's a Wonderful Life 1946 8.6
|
||||||
|
-------------------------------------------------
|
||||||
|
4 2001: A Space Odyssey 1968 8.5
|
||||||
|
5 Blade Runner 1982 8.1
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@author Seleznev Anton
|
||||||
|
@see https://github.com/seleznevae/libfort to download the source code
|
23
docs/index.rst
Normal file
23
docs/index.rst
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
.. libfort documentation master file, created by
|
||||||
|
sphinx-quickstart on Sat May 5 13:10:07 2018.
|
||||||
|
You can adapt this file completely to your liking, but it should at least
|
||||||
|
contain the root `toctree` directive.
|
||||||
|
|
||||||
|
Welcome to libfort's documentation!
|
||||||
|
===================================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
:caption: Contents:
|
||||||
|
|
||||||
|
introduction
|
||||||
|
reference
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Indices and tables
|
||||||
|
==================
|
||||||
|
|
||||||
|
* :ref:`genindex`
|
||||||
|
* :ref:`modindex`
|
||||||
|
* :ref:`search`
|
5
docs/introduction.rst
Normal file
5
docs/introduction.rst
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Introduction
|
||||||
|
============
|
||||||
|
|
||||||
|
The C library `libfort` provides data structures and functions
|
||||||
|
to generate tables.
|
6
docs/reference.rst
Normal file
6
docs/reference.rst
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Reference
|
||||||
|
=========
|
||||||
|
|
||||||
|
.. doxygenstruct:: ft_border_chars
|
||||||
|
.. doxygenfunction:: ft_create_table
|
||||||
|
.. doxygenfunction:: ft_destroy_table
|
Loading…
Reference in New Issue
Block a user