Skip to main content

Make links to the Godot API references

This is a small tool to create links to the Godot Help API's and store them as a JSON file in the following format:

{
    "animationplayer": "https://docs.godotengine.org/en/stable/classes/class_animationplayer.html", 
    "directionallight": "https://docs.godotengine.org/en/stable/classes/class_directionallight.html", 
    "joint2d": "https://docs.godotengine.org/en/stable/classes/class_joint2d.html",
    "collisionobject2d": "https://docs.godotengine.org/en/stable/classes/class_collisionobject2d.html",
    "physicsbody": "https://docs.godotengine.org/en/stable/classes/class_physicsbody.html",
    "visibilitynotifier2d": "https://docs.godotengine.org/en/stable/classes/class_visibilitynotifier2d.html",
       .
       .
       .
}

The Json file can then be used as a list, dictionary etc. to link the Godot class name with its associated help page on the godot website.

Prerequisites

The program relies upon the GhApi library and instructions for its installation and use; it will fail to install if the GhApi library is not already installed. Instruction for the installation of GhApi can be found at https://ghapi.fast.ai

Installing

You can install the Godot api reference maker package with pip:

# On Linux
python3 -m pip install godot-api-refs

# On Windows, if you installed Python 3.7+, you can use:
python -m pip install godot-api-refs

I do not have access to a MacOS box so cannot test if it installs and runs OK in that environment. However, the program is quite simple so it should prove no problem for a standard python environment.

Running the program

The program can be run using

python -m godot_api_refs

This will generate the Godot class links from the stable branch and store them in the file godot_api_calls.json in the current working directory

The progam can be invoked with -h which will give the following output:

usage: python -m godot_api_ref [options]

Given a godot-docs branch it scans the class folder and creates a JSON file linking the Godot class name with the API reference

optional arguments:
  -h, --help        show this help message and exit
  --token TOKEN     optional github access token (default "" may only gives 60 reads/hour)
  --branch BRANCH   optional branch for the class files (default: stable)
  -v, --verbose     Set the verbosity level. For example -vv sets verbosity to level 2. Default: 0.
  --check-branches  print out a list of the Godot document branches then exit without making the links

The Godot API list can be read from branches other than the stable branch if you require it by using the --branch option (for example --branch master will load links to the latest API documentation. )

The option --check-branches is an aid to show what branches are available on github; it will print out a simple list then exit.

The option --token allows the user to supply an github user token. This is available in case the user has exhausted their calls to the github api using unauthenticated requests.

The output file will be godot_api_calls.json and will be placed in current working directory.

Metadata

Release files for godot-api-refs 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for godot-api-refs 0.1.3
File Size Uploaded Provenance Actions
godot-api-refs-0.1.3.tar.gz 4.9 kB Without provenance Details for godot-api-refs-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for godot-api-refs 0.1.3
File Interpreter ABI Platform Actions
godot_api_refs-0.1.3-py3-none-any.whl Python 3 none any Details for godot_api_refs-0.1.3-py3-none-any.whl

Total release size: 10.2 kB

Release files / godot-api-refs-0.1.3.tar.gz

Download URL godot-api-refs-0.1.3.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dd009be1ce89fbf7374823f020da7dabca6b5f29ec58848d2dad26645cc508cb
BLAKE2b-256 checksum
How to use checksums
208ddcd4e0f5e8337d415d69a9d5307d739faaa8a8397fe1f064f603d9c1cca6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release files / godot_api_refs-0.1.3-py3-none-any.whl

Download URL godot_api_refs-0.1.3-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76aa668c279a5c47fee5b901837e996b9c46e9e1f7407bfb9c0f0490c029cbf7
BLAKE2b-256 checksum
How to use checksums
4199f1d57989ec7ea99d995922a25ef799427be72ddf326a9343d68138ea1e70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Security for godot-api-refs 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page