FreeType Docwriter
Docwriter is an API documentation generator for the FreeType Library that extracts and builds Markdown docs from the FreeType header files.
Installation
Run pip install docwriter (see (4) below for an automated virtualenv usage). It requires
Python >= 3.5 to run.
Steps to Generate Docs
-
Ensure
docwriteris installed usingpip. -
Clone the freetype repository from here.
-
The FreeType build system can be used to generate the docs:
sh autogen.sh ./configure make refdoc
-
Alternatively, step 1 and the make target can be replaced with
make refdoc-venv. This installs all requirements automatically in a separate virtual environment. More information onvirtualenvusage can be found here.
Development Usage
-
Clone this repository.
-
Clone the freetype repository from here.
-
Run
pip install -r requirements.txtin your environment (virtualenvrecommended). -
Copy the
include/directory fromfreetypetodocwriter. -
Run in the
docwriterdirectory:python -m docwriter \ --prefix=ft2 \ --title=FreeType-2.13.1 \ --site=reference \ --output=./docs \ ./include/freetype/*.h \ ./include/freetype/config/*.h \ ./include/freetype/cache/*.h
-
The markdown files are generated in
docs/markdown/. Static site can be built by runningmkdocs buildindocs/. Read more about Mkdocs here.
Usage Information
docwriter [-h] [-t T] -o DIR [-p PRE] [-s DIR] [-q | -v] files [files ...]
DocWriter Usage information
positional arguments:
files list of source files to parse, wildcards are allowed
optional arguments:
-h, --help show this help message and exit
-t T, --title T set project title, as in '-t "My Project"'
-o DIR, --output DIR set output directory, as in '-o mydir'
-p PRE, --prefix PRE set documentation prefix, as in '-p ft2'
-s DIR, --site DIR set 'site_dir' in mkdocs.yml [default=site]
-q, --quiet run quietly, show only errors
-v, --verbose increase output verbosity
Running Tests
To test on all supported Python versions:
-
Make sure
toxis installed:pip install tox
-
Ensure that all Python versions that you need to run the tests on are installed.
-
Run tests:
tox
To run specifc tests, use the -e argument. For example,
tox -e py37,py38
will run tests only on Python 3.7 and 3.8 (assuming they are installed). See tox.ini for all available environments.
More information on running specific tox environments can be found here.
Regression Tests
Regression tests require internet access, git, and other FreeType build
dependencies, and are
time-consuming. These tests are largely meant to run on Gitlab CI, but can also be run locally:
tox -e regression
License
This library is licensed under the FreeType License.
History
This library was originally written by David Turner as docmaker which collected and presented
documentation in HTML. It has since been modified multiple times, including a major refactor to
allow multiple output formats. The current docwriter is the biggest rewrite, with lots of changes
and additions that allow it to be more flexible, readable, maintainable and usable.
Release files for docwriter 1.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| docwriter-1.3.3.tar.gz | 70.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| docwriter-1.3.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 98.5 kB
Release files / docwriter-1.3.3.tar.gz
| Download URL | docwriter-1.3.3.tar.gz |
|---|---|
| Size | 70.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07b27d84060776990d228b3a529c3eb269bf00b25ab33ca69f351ace2042e626
|
|
BLAKE2b-256 checksum How to use checksums |
2a113c776a43e12bea7f0aaae47b0fbabff1641b534a7b212742e34b13446750
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.18
|
Release files / docwriter-1.3.3-py3-none-any.whl
| Download URL | docwriter-1.3.3-py3-none-any.whl |
|---|---|
| Size | 28.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d2dd32b4ab365bf3ea1826f777ac2cc2c6a4429156f7471a707ac0725060677a
|
|
BLAKE2b-256 checksum How to use checksums |
433efd256341d7cd38932904d751ed6b80abf2388f3247ffa232ed1add30b213
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.18
|