Skip to main content

Create API documentation in reStructuredText from Godot GDScript files

Project description

GDScript reStructuredText Docs Maker

gdscript2rest is a tool to document your Godot gdscript files into reStructuredText (.rst) files and to create an index of the generated files if required.

The code is based on the gdscript-docs-maker code from GDQuest and, in as far as the initial stages of the conversion are concerned, it is a direct copy of their code with a few notable exceptions:

  • This version only provides reStructuredText (.rst) output - if you require markdown or Hugo output then please follow the above link and use the original version.
  • As there is no facility to create markdown or Hugo files the -f/--format and -a/--author options in the original are no longer available.
  • Multi-line comments in the code are concatenated to single line comments unless there are multiple line breaks, in which case the line breaks are preserved. This is to give, hopefully, a better flow of the description text.

Usage

A JSON file of the Godot projects docstrings has to be created first using either the generate-reference script on homepage or the original at gdscript-docs-maker code. Both locations have instructions on how to do this.

Once the JSON file has been created then the reStructuredText documents can be created by running

python -m gdscript2rest [options] $JSON-dump.json

where $JSON-dump.json is the file created by generate-reference.

The above command will generate the files required and place them in a folder called export that is a sub folder of the Current Working Directory.

Running

python3 -m gdscript2rest -h

will give full program usage with detailing options for tailoring the output location and generating an index file.

My Homepage has full instructions, a mini tutorial wiki's as well as a wiki on creating a Sphinx based webpage of your Games API.

Don't hesitate to raise issues or ask questions and if you like this tool then please spread the word!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gdscript2rest-0.4.0.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gdscript2rest-0.4.0-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file gdscript2rest-0.4.0.tar.gz.

File metadata

  • Download URL: gdscript2rest-0.4.0.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for gdscript2rest-0.4.0.tar.gz
Algorithm Hash digest
SHA256 060ef42507803ba8ca015fbe92c7317d300d25596fcbabcef528938be1b16165
MD5 cb119856e4924b28a8641954c66ba0b4
BLAKE2b-256 b28d92575a999868cb45ad1d5377b0e68254b1dcb2afe0c4a3dae210f774cf2e

See more details on using hashes here.

File details

Details for the file gdscript2rest-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: gdscript2rest-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for gdscript2rest-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 93dcb28e151961fb6de8bcf5048ba3da0ce8f0047d3502c39730c854a39e6633
MD5 ef2d162f6bc7d8fa1f7f50c88cb19221
BLAKE2b-256 96fc8c8bf17abb7cc5aacd593fac895f229fb8260a3fa56a8d9290c8cc99bec5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page