Skip to content

Commit 474b6c3

Browse files
committed
Initial commit adding the sphinx build system and a bit of content
0 parents  commit 474b6c3

File tree

5 files changed

+174
-0
lines changed

5 files changed

+174
-0
lines changed

.github/workflows/documentation.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Docs
2+
on: [push, pull_request, workflow_dispatch]
3+
permissions:
4+
contents: write
5+
jobs:
6+
docs:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: actions/setup-python@v3
11+
- name: Install dependencies
12+
run: |
13+
pip install sphinx sphinx_rtd_theme
14+
- name: Sphinx build
15+
run: |
16+
sphinx-build doc _build
17+
- name: Deploy
18+
uses: peaceiris/actions-gh-pages@v3
19+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
20+
with:
21+
publish_branch: gh-pages
22+
github_token: ${{ secrets.GITHUB_TOKEN }}
23+
publish_dir: _build/
24+
force_orphan: true

Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

conf.py

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
# import os
14+
# import sys
15+
# sys.path.insert(0, os.path.abspath('.'))
16+
17+
18+
# -- Project information -----------------------------------------------------
19+
20+
project = 'libosmio'
21+
copyright = '2023, RedNicStone'
22+
author = 'RedNicStone'
23+
24+
25+
# -- General configuration ---------------------------------------------------
26+
27+
# Add any Sphinx extension module names here, as strings. They can be
28+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
29+
# ones.
30+
extensions = [
31+
]
32+
33+
# Add any paths that contain templates here, relative to this directory.
34+
templates_path = ['_templates']
35+
36+
# List of patterns, relative to source directory, that match files and
37+
# directories to ignore when looking for source files.
38+
# This pattern also affects html_static_path and html_extra_path.
39+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
40+
41+
42+
# -- Options for HTML output -------------------------------------------------
43+
44+
# The theme to use for HTML and HTML Help pages. See the documentation for
45+
# a list of builtin themes.
46+
#
47+
html_theme = 'sphinx_book_theme'
48+
#html_logo = "_static/logo-wide.svg"
49+
html_title = "libosmio documentation"
50+
html_copy_source = True
51+
#html_favicon = "_static/logo-square.svg"
52+
html_last_updated_fmt = ""
53+
54+
55+
html_sidebars = {
56+
"reference/blog/*": [
57+
"navbar-logo.html",
58+
"search-field.html",
59+
"postcard.html",
60+
"recentposts.html",
61+
"tagcloud.html",
62+
"categories.html",
63+
"archives.html",
64+
"sbt-sidebar-nav.html",
65+
]
66+
}
67+
68+
# Add any paths that contain custom static files (such as style sheets) here,
69+
# relative to this directory. They are copied after the builtin static files,
70+
# so a file named "default.css" will overwrite the builtin "default.css".
71+
html_static_path = ['_static']
72+
html_css_files = ["custom.css"]
73+
74+
html_theme_options = {
75+
"repository_url": "https://github.com/RedNicStone/libosmio",
76+
"use_repository_button": True,
77+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
libosmio's API design
3+
=====================
4+
5+
This page was created to help new users understand how libosmio works.
6+
It will give you a good idea of how the API works, as well as some insight in how API calls are resolved internally.
7+
8+
The design of the osmio ecosystem has been heavily inspired by the Vulkan graphics API at almost every place.
9+
While knowledge of the Vulkan API may help you understand how osmio's API is structured, it is certainly not required.
10+
11+
Language compliance
12+
-------------------
13+
14+
While libosmio's implementations are not restricted to a specific language, the API has been made compliant with C99.
15+
Even though earlier iterations were designed for C++ specifically, C99 has been chosen for wider compiler support on embedded devices.
16+
17+
.. note::
18+
Whether you use C++, C or any other C-like language in your project, you will be able to use libosmio.
19+
20+
Library handles
21+
---------------
22+
23+
Osmio uses opaque handles in many of its API functions.
24+
These are to be treated like any other pointer, so you can copy and move them as much as you like.
25+
Lifetime of a libosmio handle starts when it is created using a `osCreate...()` function and ends on `osDestroy...()`.
26+
27+
.. important::
28+
The raw data behind the handle is purposefully opaque as it is implementation-defined, so interfacing with it should be avoided outside of the library implementation.
29+
30+
31+
32+

index.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
libosmio Docs - Main branch
3+
===========================
4+
5+
Welcome to the official documentation of the osmio project, a fast and universal library for low level communication.
6+
This document contains everything you need to know about libosmio, from how to open an interface to implementing your own ICDs.
7+
If you are just starting out with the osmio ecosystem, I recommend that you read the :ref:´introduction page <doc_about>´.
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
12+
content/getting_started/api_architecture
13+
14+
15+
16+
Indices and tables
17+
==================
18+
19+
* :ref:`genindex`
20+
* :ref:`modindex`
21+
* :ref:`search`

0 commit comments

Comments
 (0)