Skip to content

Commit

Permalink
Add script that automatically changes Godot to Redot in all variations
Browse files Browse the repository at this point in the history
- Add Python script that intelligently changes filenames and contents.
  - Makes exceptions for different variations of capitalizations and hyphenation (like
    godot-engine, godotengine, Godot, GODOT, etc.)
  - Distinguishes between names that can be changed immediately versus names that need to
    change later, like subdomains that don't exist yet.
  - The goal was to eliminate every mention of Godot. However since we are aiming to stay
    compatible with Godot, at least some of the unimplemented names will remain so.
  - Removed some content that could only apply to Godot (like mentions of Godot foundation)

- Change ci/cd pipeline scripts (in ./.github) to include the name change in the build
  - Tested successfully on forked repo
  - includes weekly offline docs and class sync
  - Also change contribution and PR hints

- Change README.md to reflect the changes
  - Also add short remark on how to generate the name change locally
  • Loading branch information
adikhoff committed Oct 10, 2024
1 parent 8ce7eba commit dfc82be
Show file tree
Hide file tree
Showing 14 changed files with 421 additions and 69 deletions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ labels: bug
assignees: ''
---

**Your Godot version:**
**Your Redot version:**

**Issue description:**

**URL to the documentation page:**

If you know how to fix the issue you are reporting please
consider opening a pull request. We provide a tutorial on
using git here: https://docs.godotengine.org/en/stable/community/contributing/pr_workflow.html,
writing documentation at https://docs.godotengine.org/en/stable/community/contributing/docs_writing_guidelines.html
and contributing to the class reference here: https://docs.godotengine.org/en/stable/community/contributing/updating_the_class_reference.html
using git here: https://docs.redotengine.org/en/stable/community/contributing/pr_workflow.html,
writing documentation at https://docs.redotengine.org/en/stable/community/contributing/docs_writing_guidelines.html
and contributing to the class reference here: https://docs.redotengine.org/en/stable/community/contributing/updating_the_class_reference.html
16 changes: 8 additions & 8 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
blank_issues_enabled: false

contact_links:
- name: Godot community channels
url: https://godotengine.org/community
- name: Redot community channels
url: https://redotengine.org/community
about: Please ask for technical support on one of the other community channels, not here.

- name: Godot proposals
url: https://github.com/godotengine/godot-proposals
about: Please submit engine feature proposals on the Godot proposals repository, not here.
- name: Redot proposals
url: https://github.com/redot-engine/redot-proposals
about: Please submit engine feature proposals on the Redot proposals repository, not here.

- name: Main Godot repository
url: https://github.com/godotengine/godot
about: Report engine bugs on the main Godot repository
- name: Main Redot repository
url: https://github.com/redot-engine/redot
about: Report engine bugs on the main Redot repository
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/enhancement_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ labels: enhancement
assignees: ''
---

**Your Godot version:**
**Your Redot version:**

**Issue description:**

Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ PRs can target other branches (e.g. `3.2`, `3.5`) if the same change was done in
PRs must not target `stable`, as that branch is updated manually.
The type of content accepted into the documentation is explained here:
https://docs.godotengine.org/en/latest/community/contributing/content_guidelines.html
https://docs.redotengine.org/en/latest/community/contributing/content_guidelines.html
-->
18 changes: 11 additions & 7 deletions .github/workflows/build_offline_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ jobs:
sudo apt update
sudo apt install parallel libwebp7
- name: Migrate to Redot
run: |
python migrate.py . _migrated False
- name: Sphinx - Build HTML
run: make SPHINXOPTS='--color' html
run: make SPHINXOPTS='--color' SPHINXSOURCEDIR='./_migrated' html

- uses: actions/upload-artifact@v4
with:
name: godot-docs-html-${{ matrix.branch }}
name: redot-docs-html-${{ matrix.branch }}
path: _build/html
# Keep the current build and the previous build (in case a scheduled build failed).
# This makes it more likely to have at least one successful build available at all times.
Expand All @@ -46,15 +50,15 @@ jobs:
parallel --will-cite sed -i "s/\\.webp$/\\.png/g" ::: {about,community,contributing,getting_started,tutorials}/**/*.rst
# Remove banners at the top of each page when building `latest`.
sed -i 's/"godot_is_latest": True/"godot_is_latest": False/' conf.py
sed -i 's/"godot_show_article_status": True/"godot_show_article_status": False/' conf.py
sed -i 's/"redot_is_latest": True/"redot_is_latest": False/' conf.py
sed -i 's/"redot_show_article_status": True/"redot_show_article_status": False/' conf.py
make SPHINXOPTS='--color' epub
make SPHINXOPTS='--color' SPHINXSOURCEDIR='./_migrated' epub
- uses: actions/upload-artifact@v4
with:
name: godot-docs-epub-${{ matrix.branch }}
path: _build/epub/GodotEngine.epub
name: redot-docs-epub-${{ matrix.branch }}
path: _build/epub/RedotEngine.epub
# Keep the current build and the previous build (in case a scheduled build failed).
# This makes it more likely to have at least one successful build available at all times.
retention-days: 15
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
bash _tools/format.sh
codespell -I _tools/codespell-ignore.txt -x _tools/codespell-ignore-lines.txt -S tutorials/i18n/locales.rst {about,community,contributing,getting_started,tutorials}/**/*.rst
- name: Migrate to Redot
run: |
python migrate.py . _migrated True
# Use dummy builder to improve performance as we don't need the generated HTML in this workflow.
- name: Sphinx build
run: make SPHINXOPTS='--color -W' dummy
run: make SPHINXOPTS='--color -W' SPHINXSOURCEDIR='./_migrated' dummy
10 changes: 5 additions & 5 deletions .github/workflows/sync_class_ref.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Checkout the engine repository
uses: actions/checkout@v4
with:
repository: 'godotengine/godot'
repository: 'redot-engine/redot-engine'
# Use the appropriate branch for the documentation version.
ref: ${{ env.engine_rev }}
path: './.engine-src'
Expand All @@ -38,7 +38,7 @@ jobs:
cd ./.engine-src
hash=$(git rev-parse HEAD)
hash_short=$(git rev-parse --short HEAD)
echo "Checked out godotengine/godot at $hash"
echo "Checked out redot-engine/redot at $hash"
echo "rev_hash=$hash" >> $GITHUB_OUTPUT
echo "rev_hash_short=$hash_short" >> $GITHUB_OUTPUT
Expand All @@ -59,10 +59,10 @@ jobs:
delete-branch: true

# Configure the commit author.
author: 'Godot Organization <noreply@godotengine.org>'
committer: 'Godot Organization <noreply@godotengine.org>'
author: 'Redot Organization <noreply@redot-url.org>'
committer: 'Redot Organization <noreply@redot-url.org>'

# Configure the pull-request.
title: 'classref: Sync with current ${{ env.engine_rev }} branch (${{ steps.engine.outputs.rev_hash_short }})'
body: 'Update Godot API online class reference to match the engine at https://github.com/godotengine/godot/commit/${{ steps.engine.outputs.rev_hash }} (`${{ env.engine_rev }}`).'
body: 'Update Redot API online class reference to match the engine at https://github.com/redot-engine/redot/commit/${{ steps.engine.outputs.rev_hash }} (`${{ env.engine_rev }}`).'
labels: 'area:class reference,bug,enhancement'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
.env

_build/
_build-old/
_migrated/
env/
__pycache__
*.pyc
Expand Down
52 changes: 32 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,38 @@
# Redot Engine documentation

This repository contains the source files of [Godot Engine](https://godotengine.org)'s documentation, in reStructuredText markup language (reST).
This repository contains the source files of [Redot Engine](https://redotengine.org)'s documentation, in reStructuredText markup language (reST).

They are meant to be parsed with the [Sphinx](https://www.sphinx-doc.org/) documentation builder to build the HTML documentation on [Godot's website](https://docs.godotengine.org).
They are meant to be parsed with the [Sphinx](https://www.sphinx-doc.org/) documentation builder to build the HTML documentation on [Redot's website](https://docs.redotengine.org).

## Download for offline use

To browse the documentation offline, you can download an HTML copy (updated every Monday):
[stable](https://nightly.link/godotengine/godot-docs/workflows/build_offline_docs/master/godot-docs-html-stable.zip),
[latest](https://nightly.link/godotengine/godot-docs/workflows/build_offline_docs/master/godot-docs-html-master.zip),
[3.6](https://nightly.link/godotengine/godot-docs/workflows/build_offline_docs/master/godot-docs-html-3.6.zip). Extract
[stable](https://nightly.link/redot-engine/redot-docs/workflows/build_offline_docs/master/redot-docs-html-stable.zip),
[latest](https://nightly.link/redot-engine/redot-docs/workflows/build_offline_docs/master/redot-docs-html-master.zip),
[3.6](https://nightly.link/redot-engine/redot-docs/workflows/build_offline_docs/master/redot-docs-html-3.6.zip). Extract
the ZIP archive then open the top-level `index.html` in a web browser.

For mobile devices or e-readers, you can also download an ePub copy (updated every Monday):
[stable](https://nightly.link/godotengine/godot-docs/workflows/build_offline_docs/master/godot-docs-epub-stable.zip),
[latest](https://nightly.link/godotengine/godot-docs/workflows/build_offline_docs/master/godot-docs-epub-master.zip),
[3.6](https://nightly.link/godotengine/godot-docs/workflows/build_offline_docs/master/godot-docs-epub-3.6.zip). Extract
the ZIP archive then open the `GodotEngine.epub` file in an e-book reader application.
[stable](https://nightly.link/redot-engine/redot-docs/workflows/build_offline_docs/master/redot-docs-epub-stable.zip),
[latest](https://nightly.link/redot-engine/redot-docs/workflows/build_offline_docs/master/redot-docs-epub-master.zip),
[3.6](https://nightly.link/redot-engine/redot-docs/workflows/build_offline_docs/master/redot-docs-epub-3.6.zip). Extract
the ZIP archive then open the `RedotEngine.epub` file in an e-book reader application.

## Migrating

We are transitioning from Godot to Redot. In this period, a temporary solution is available.
```
python migrate.py . _migrated True
```

After the docs are converted, you can build with
```
sphinx-build -b html ./_migrated/ _build/html
```

## Theming

The Godot documentation uses the default `sphinx_rtd_theme` with many
The Redot documentation uses the default `sphinx_rtd_theme` with many
[customizations](_static/) applied on top. It will automatically switch between
the light and dark theme depending on your browser/OS' theming preference.

Expand All @@ -31,22 +43,22 @@ add-on.

## Contributing

All contributors are welcome to help on the Godot documentation.
All contributors are welcome to help on the Redot documentation.

To get started, head to the [Contributing section](https://docs.godotengine.org/en/latest/contributing/ways_to_contribute.html#contributing-to-the-documentation) of the online manual. There, you will find all the information you need to write and submit changes.
To get started, head to the [Contributing section](https://docs.redotengine.org/en/latest/contributing/ways_to_contribute.html#contributing-to-the-documentation) of the online manual. There, you will find all the information you need to write and submit changes.

Here are some quick links to the areas you might be interested in:

1. [Contributing to the online manual](https://docs.godotengine.org/en/latest/contributing/documentation/contributing_to_the_documentation.html)
2. [Contributing to the class reference](https://docs.godotengine.org/en/latest/contributing/documentation/updating_the_class_reference.html)
3. [Content guidelines](https://docs.godotengine.org/en/latest/contributing/documentation/content_guidelines.html)
4. [Writing guidelines](https://docs.godotengine.org/en/latest/contributing/documentation/docs_writing_guidelines.html)
5. [Building the manual](https://docs.godotengine.org/en/latest/contributing/documentation/building_the_manual.html)
6. [Translating the documentation](https://docs.godotengine.org/en/latest/contributing/documentation/editor_and_docs_localization.html)
1. [Contributing to the online manual](https://docs.redotengine.org/en/latest/contributing/documentation/contributing_to_the_documentation.html)
2. [Contributing to the class reference](https://docs.redotengine.org/en/latest/contributing/documentation/updating_the_class_reference.html)
3. [Content guidelines](https://docs.redotengine.org/en/latest/contributing/documentation/content_guidelines.html)
4. [Writing guidelines](https://docs.redotengine.org/en/latest/contributing/documentation/docs_writing_guidelines.html)
5. [Building the manual](https://docs.redotengine.org/en/latest/contributing/documentation/building_the_manual.html)
6. [Translating the documentation](https://docs.redotengine.org/en/latest/contributing/documentation/editor_and_docs_localization.html)

## License

With the exception of the `classes/` folder, all the content of this repository is licensed under the Creative Commons Attribution 3.0 Unported license ([CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)) and is to be attributed to "Juan Linietsky, Ariel Manzur and the Godot community".
With the exception of the `classes/` folder, all the content of this repository is licensed under the Creative Commons Attribution 3.0 Unported license ([CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)) and is to be attributed to "Juan Linietsky, Ariel Manzur and the Redot community".
See [LICENSE.txt](/LICENSE.txt) for details.

The files in the `classes/` folder are derived from [Godot's main source repository](https://github.com/godotengine/godot) and are distributed under the MIT license, with the same authors as above.
The files in the `classes/` folder are derived from [Redot's main source repository](https://github.com/redot-engine/redot) and are distributed under the MIT license, with the same authors as above.
20 changes: 0 additions & 20 deletions contributing/how_to_contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,6 @@ Because contrary to popular opinion, we need more than just programmers on the p
Fundraising
-----------

- **Donate**

We created the non-profit `Godot Foundation <https://godot.foundation/>`_ to be able to support the Godot Engine in both matters of finance and administration.
In practice, this means the Foundation hires people to work part-time or full-time on the project.
These jobs include engine development as well as related tasks like code reviews, production management, community & marketing efforts, and more.

With as little as 5 EUR per month, you can help us keep going strong.
Currently, we are intending to hire more core developers, as to cover more ground with full-time specialists that supplement and guide volunteer work.

`Join the Development Fund <https://fund.godotengine.org>`_

- **Donation Drives**
Think about your followers on social media, or other communities you are active in.
Use that reach to remind your social environment that even small contributions can make a difference, especially when done by a great number of people at the same time.

Are you a content creator? Consider adding a link to the `Godot Development Fund <https://fund.godotengine.org>`_ to your descriptions.
If you do live streams, perhaps think about organizing a stream with donation incentives.

.. - **Buy Official Merch**
- **Publish Godot Games.**
You heard right, simply publishing a game #MadeWithGodot can positively impact the well-being of this project.
Your personal success elevates the engine to a viable alternative for other developers, growing the community further.
Expand Down
Binary file added favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion img/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Note

The images in this folder aren't referenced anywhere in the manual, but are referenced in the
Godot class reference (both in the editor and on the generated online documentation).
Redot class reference (both in the editor and on the generated online documentation).
Loading

0 comments on commit dfc82be

Please sign in to comment.