Tutorial

This package combines different scripts that aide in working with computers ranging from Windows 10 to Linux to Ubuntu to automate regular, repetitive and error prone tasks.

Building Documentation

The documentation for this repository has been extensively commented as well as the API - importing from SciPy.

Sphinx Configuration

Configuration file for the Sphinx documentation builder.

Sphinx Configuration File

This file does only contain a selection of the most common options. For a full list see the documentation:

URL

http://www.sphinx-doc.org/en/master/config

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.:

sys.path.insert(0, os.path.abspath('.'))

However, the filetype mapping came about in 1.8 so make sure to add that needs-sphinx=version bit

Also note the setup() function modeled off of parameters described in the official documentation.

conf.setup(app)[source]

Add custom css styling.

Warning for path names.

Don’t use os.path.abspath() if you need to extend this. Pathmames that have a . in them will be interpreted as packages and crash the build. I.E. the following won’t work.:

/data/data/com.termux/

Make

Expedite documentation builds.

We attempt to automate documentation builds with this module.

Still need to add an option to recursively move the html files out of the currently git-ignored directory _build/html/ into this directory.

Update the options you can give to the parser:

  1. remove python path

  2. Add open in browser as an option

  3. Fix the output for the commands argument when this is run with sys.argv == 0

class make.DocBuilder(num_jobs=1, verbosity=0, warnings_are_errors=False)[source]

Bases: object

Class to wrap the different commands of this script.

All public methods of this class can be called as parameters of the script.

builder

The filetype make invokes sphinx-build to create.

Type

str

_open_browser(self, single_doc_html)[source]

Open a browser tab showing the single doc html option.

sphinx_build(self, kind='html')[source]

Build docs.

Parameters

kind ({'html', 'latex'}) – Kind of docs to build.

Examples

>>> DocBuilder(num_jobs=4).sphinx_build('html')
make._parse_arguments(cmds=None)[source]

Parse user arguments.

Parameters

cmd (str) – Arguments provided by the user.

Returns

user_args – Argumemts as they’ve been interpreted by argparse.

Return type

argparse.NameSpace

See also

docutils.core

Shows a few good methods on how to programatically publish docs.

make.main()[source]

Set everything up.

make.termux_hack()[source]

Android permissions don’t allow viewing files in app specific files.