You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-26Lines changed: 43 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,30 +1,45 @@
1
1
# GDScript Docs Maker
2
2
3
+
[](https://github.com/GDQuest/gdscript-docs-maker)[](https://hub.docker.com/repository/docker/gdquest/gdscript-docs-maker)
Docs Maker is a set of tools to convert documentation you write inside your code to an online or offline code reference in the markdown format.
7
+
# Introduction
6
8
7
-
If you make plugins or a framework for Godot, GDScript Docs Maker will help you save a lot of time documenting your code.
9
+
GDScript Docs Maker is a set of tools to convert documentation you write inside your code to an online or offline code reference in the [markdown](https://daringfireball.net/projects/markdown/syntax) or [hugo](https://gohugo.io/) format. If you make plugins or a framework for Godot, GDScript Docs Maker will generate API reference documentation from your code.
8
10
9
11
It creates documents following Godot's built-in class reference. You can see an example with our [Godot Steering Toolkit documentation](https://www.gdquest.com/docs/godot-steering-toolkit/reference/)
10
12
11
13
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
12
14
13
-
**Table of Contents**
14
-
15
-
-[Installing](#installing)
16
-
-[Getting Started](#getting-started)
17
-
-[Writing your code reference](#writing-your-code-reference)
18
-
-[Generating the markdown files](#generating-the-markdown-files)
19
-
-[Hugo output](#hugo-output)
15
+
-[Usage](#usage)
16
+
*[Using the container image](#using-the-container-image)
17
+
*[Local installation](#local-installation)
18
+
*[Writing your code reference](#writing-your-code-reference)
19
+
*[Generating the markdown files](#generating-the-markdown-files)
20
+
*[Hugo output](#hugo-output)
20
21
-[The manual way](#the-manual-way)
21
-
-[Converting JSON](#converting-json)
22
+
+[Converting JSON](#converting-json)
22
23
23
24
<!-- markdown-toc end -->
24
25
25
-
**Note**: This program requires Godot 3.2+ and Python 3.7+ to work.
26
+
# Usage
27
+
28
+
GDScript Docs Maker can be either used using the official [Docker image](https://hub.docker.com/r/gdquest/gdscript-docs-maker) or by installing it locally. For the docker image, only [Docker](https://www.docker.com/get-started) is required.
29
+
30
+
For the local installation, Godot 3.2+ and Python 3.7+ are required.
31
+
32
+
## Using the container image
33
+
34
+
To generate your API documentation, you mount the path of your game and the path of the output into the container and run it like this:
Although to use the shell script that simplifies creating the reference, `generate_reference`, you need to clone this repository. More on that below.
40
55
41
-
## Getting Started
42
-
43
-
In this section, you will learn to use the program to generate a code reference quickly.
44
-
45
-
This involves two steps. You need to:
46
-
47
-
1. Write docstrings inside your GDScript code.
48
-
2. Use one of the shell programs that ships with this add-on.
49
-
50
-
### Writing your code reference
56
+
## Writing your code reference
51
57
52
58
Docstring or doc-comments in GDScript don't have any special markup.
53
59
@@ -80,7 +86,7 @@ extends GSAISpecializedAgent
80
86
class_name GSAIKinematicBody2DAgent
81
87
```
82
88
83
-
###Generating the markdown files
89
+
## Generating the markdown files
84
90
85
91
We wrote two shell scripts to automate the steps in generating a code reference: `./generate_reference` for Linux or MacOS, and `./generate_reference.bat` for Windows.
86
92
@@ -97,12 +103,23 @@ $project_directory -- path to your Godot project directory.
97
103
This directory or one of its subdirectories should contain a
98
104
project.godot file.
99
105
100
-
Flags:
106
+
Options:
101
107
102
108
-h/--help -- Display this help message.
103
109
-o/--output-directory -- directory path to output the documentation into.
104
-
-f/--format -- Either `markdown` or `hugo`. If `hugo`, the output document includes a TOML front-matter at the top. Default: `markdown`.
110
+
-d/--directory -- Name of a directory to find files and generate the code reference in the Godot project.
111
+
You can use the option multiple times to generate a reference for multiple directories.
112
+
-f/--format -- Either `markdown` or `hugo`. If `hugo`, the output document includes a TOML front-matter
113
+
at the top. Default: `markdown`.
105
114
-a/--author -- If --format is `hugo`, controls the author property in the TOML front-matter.
0 commit comments