Added markdown docs from docs folder to readthedocs output
This commit is contained in:
parent
242af5c7a3
commit
0b6f8a05d8
@ -14,3 +14,5 @@ sphinx:
|
||||
python:
|
||||
version: 3.7
|
||||
system_packages: true
|
||||
install:
|
||||
- requirements: sphinx-docs/requirements.txt
|
||||
|
@ -1,4 +1,4 @@
|
||||
# The internal structure of RISCemu
|
||||
# Internal Structure
|
||||
|
||||
## Loading assembly files:
|
||||
In order to load an assembly file, you need to instantiate a CPU with the capabilities you want. Loading an assembly
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Syscalls:
|
||||
# Syscalls
|
||||
|
||||
Performing a syscall is quite simple:
|
||||
```risc-v asm
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
echo "Generating docs!"
|
||||
|
||||
|
||||
if ! command -v 'sphinx-apidoc'; then
|
||||
source venv/bin/activate
|
||||
pip install sphinx
|
||||
@ -15,6 +16,10 @@ if [[ $1 == 'generate' ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# delete old help folder
|
||||
rm -rf sphinx-docs/source/help
|
||||
cp -r docs sphinx-docs/source/help
|
||||
|
||||
PYTHONPATH=. sphinx-apidoc -e -f -o sphinx-docs/source riscemu riscemu/colors.py riscemu/__main__.py
|
||||
|
||||
rm sphinx-docs/source/modules.rst
|
||||
|
3
sphinx-docs/.gitignore
vendored
3
sphinx-docs/.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
build
|
||||
source/riscemu*.rst
|
||||
source/modules.rst
|
||||
source/modules.rst
|
||||
source/help
|
1
sphinx-docs/requirements.txt
Normal file
1
sphinx-docs/requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
recommonmark
|
@ -21,7 +21,6 @@ import subprocess
|
||||
if os.getenv('READTHEDOCS', False) and not os.path.exists('riscemu.rst'):
|
||||
subprocess.check_call(['../../generate-docs.sh', 'generate'])
|
||||
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = 'RiscEmu'
|
||||
@ -31,20 +30,20 @@ author = 'Anton Lydike'
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = '0.1.0'
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc'
|
||||
'sphinx.ext.autodoc',
|
||||
'recommonmark'
|
||||
]
|
||||
|
||||
# autodoc options
|
||||
autodoc_default_options = {
|
||||
'members': True,
|
||||
'member-order': 'bysource',
|
||||
'members': True,
|
||||
'member-order': 'bysource',
|
||||
'special-members': '__init__',
|
||||
}
|
||||
|
||||
@ -54,8 +53,16 @@ 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 = []
|
||||
# Markdown support
|
||||
|
||||
from recommonmark.parser import CommonMarkParser
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = ['.rst', '.md']
|
||||
|
||||
source_parsers = {
|
||||
'.md': CommonMarkParser,
|
||||
}
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
||||
@ -64,6 +71,8 @@ exclude_patterns = []
|
||||
#
|
||||
html_theme = 'alabaster'
|
||||
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# 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".
|
||||
@ -71,7 +80,6 @@ html_static_path = ['_static']
|
||||
|
||||
sys.path.insert(0, os.path.abspath('../../'))
|
||||
|
||||
|
||||
if os.getenv('READTHEDOCS', False):
|
||||
import sphinx_rtd_theme
|
||||
|
||||
|
@ -4,15 +4,24 @@
|
||||
contain the root `toctree` directive.
|
||||
|
||||
RiscEmu Documentation!
|
||||
===================================
|
||||
======================
|
||||
|
||||
Check this project out on github_.
|
||||
|
||||
.. _github: https://github.com/antonlydike/riscemu
|
||||
|
||||
Help:
|
||||
=====
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
help/*
|
||||
|
||||
|
||||
Package structure:
|
||||
=================
|
||||
==================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 5
|
||||
@ -28,3 +37,26 @@ Other links:
|
||||
* :ref:`search`
|
||||
|
||||
|
||||
License:
|
||||
========
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Anton Lydike
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
Loading…
Reference in New Issue
Block a user