diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index c9e3a2f3d612..9af868693774 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -6,7 +6,7 @@ labels: bug
assignees: ''
---
-**Your Godot version:**
+**Your Redot version:**
**Issue description:**
@@ -14,6 +14,6 @@ assignees: ''
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
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 9b01966e08a1..d8eabd1e1d41 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -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
diff --git a/.github/ISSUE_TEMPLATE/enhancement_request.md b/.github/ISSUE_TEMPLATE/enhancement_request.md
index d6b2f3caa93a..d7c3aed25a60 100644
--- a/.github/ISSUE_TEMPLATE/enhancement_request.md
+++ b/.github/ISSUE_TEMPLATE/enhancement_request.md
@@ -6,7 +6,7 @@ labels: enhancement
assignees: ''
---
-**Your Godot version:**
+**Your Redot version:**
**Issue description:**
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 62e3e211d3ba..b37c87b763e2 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -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
-->
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 43100e8b1c54..51f0b5beaa91 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -30,7 +30,7 @@ jobs:
- name: Migrate to Redot
run: |
- python migrate.py . _migrated False
+ 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
diff --git a/.github/workflows/sync_class_ref.yml b/.github/workflows/sync_class_ref.yml
index f4d1afeb9b58..08d823e484db 100644
--- a/.github/workflows/sync_class_ref.yml
+++ b/.github/workflows/sync_class_ref.yml
@@ -6,7 +6,7 @@ on:
schedule:
# Run it at night (European time) every Saturday.
# The offset is there to try and avoid the high load times.
- - cron: '45 * * * *'
+ - cron: '15 3 * * 6'
# Make sure jobs cannot overlap.
concurrency:
diff --git a/README.md b/README.md
index fbd2ba22fa5a..8f3f8d181e60 100644
--- a/README.md
+++ b/README.md
@@ -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.
@@ -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.
diff --git a/contributing/how_to_contribute.rst b/contributing/how_to_contribute.rst
index 477339567318..e9603a72b0e4 100644
--- a/contributing/how_to_contribute.rst
+++ b/contributing/how_to_contribute.rst
@@ -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 `_ 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 `_
-
-- **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 `_ 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.
diff --git a/favicon.png b/favicon.png
new file mode 100644
index 000000000000..38cbcdf12dfb
Binary files /dev/null and b/favicon.png differ
diff --git a/img/README.md b/img/README.md
index 41d69da1f478..b687c6aaaabb 100644
--- a/img/README.md
+++ b/img/README.md
@@ -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).
diff --git a/img/docs_logo.svg b/img/docs_logo.svg
index fe52d3e695eb..f957d787505e 100644
--- a/img/docs_logo.svg
+++ b/img/docs_logo.svg
@@ -1 +1,35 @@
-
+
+
+
+
diff --git a/migrate.py b/migrate.py
index 672578953af8..217f7bb90713 100644
--- a/migrate.py
+++ b/migrate.py
@@ -21,13 +21,12 @@
if necessary, and then save them to the output directory (default _migrated)
From there, the docs can be built in the normal way.
-
-(I know it's pretty ugly. It's temporary)
"""
import fnmatch
import os
from shutil import copyfile
+import shutil
import sys
import codecs
from distutils.dir_util import copy_tree
@@ -41,25 +40,23 @@
# Mappings that will currently lead to nowhere. Can be treated as a todo list.
mappings_unimplemented = [
# Non existing urls
- ('https://docs.godotengine.org', 'https://docs.redot-url-todo.org'),
- ('https://godotengine.org', 'https://redot-url-todo.org'),
('https://hosted.weblate.org/projects/godot-engine/godot-docs', 'https://hosted.weblate.org/projects/redot-engine/redot-docs'),
('https://hosted.weblate.org/engage/godot-engine/', 'https://hosted.weblate.org/engage/redot-engine/'),
- ('https://chat.godotengine.org/', 'https://chat.redot-url-todo.org/'),
- ('https://nightly.link/godotengine/godot-docs/workflows/build_offline_docs/master/godot', 'https://nightly.link/redot-url-todo/redot-docs/workflows/build_offline_docs/master/redot'),
- ('https://editor.godotengine.org', 'https://editor.redot-url-todo.org'),
('https://store.steampowered.com/app/404790/Godot_Engine/', 'https://store.steampowered.com/app/TODO'),
- ('https://flathub.org/apps/details/org.godotengine.Godot', 'https://flathub.org/apps/details/org.redot-url-todo.Redot'),
- ('https://forum.godotengine.org/', 'https://forum.redot-url-todo.org/'),
+ ('https://flathub.org/apps/details/org.godotengine.Godot', 'https://flathub.org/apps/details/org.redot-engine.Redot'),
('https://godot.foundation', 'https://redot.foundation'),
- ('https://fund.godotengine.org', 'https://fund.redot-url-todo.org'),
('https://hosted.weblate.org/projects/godot-engine/godot/', 'https://hosted.weblate.org/projects/redot-engine/redot/'),
('https://hosted.weblate.org/projects/godot-engine/', 'https://hosted.weblate.org/projects/redot-engine/'),
('https://hosted.weblate.org/browse/godot-engine', 'https://hosted.weblate.org/browse/redot-engine'),
- ('https://repo1.maven.org/maven2/org/godotengine/godot/', 'https://repo1.maven.org/maven2/org/redot-url-todo/redot/'),
+ ('https://repo1.maven.org/maven2/org/godotengine/godot/', 'https://repo1.maven.org/maven2/org/redot-engine/redot/'),
+ # Non existing internal urls
+ ('https://chat.godotengine.org/', 'https://chat.redotengine.org/'),
+ ('https://editor.godotengine.org', 'https://editor.redotengine.org'),
+ ('https://forum.godotengine.org/', 'https://forum.redotengine.org/'),
+ ('https://fund.godotengine.org', 'https://fund.redotengine.org'),
# The following mappings probably require changes to the core engine
('GodotEngine.epub', 'RedotEngine.epub'),
- ('godotengine.org/license', 'redot-url-todo.org/license'),
+ ('godotengine.org/license', 'redotengine.org/license'),
('AsGodotDictionary', 'AsRedotDictionary'),
('GODOT_', 'REDOT_'),
('-godot-', '-redot-'),
@@ -76,7 +73,7 @@
('config/godot/', 'config/redot/'),
('share/godot/', 'share/redot/'),
(' godot_', ' redot_'),
- ('org.godotengine.Godot', 'org.redot-url-todo.Redot'),
+ ('org.godotengine.Godot', 'org.redotengine.Redot'),
('godot-ios-plugins', 'redot-ios-plugins'),
('godot-syntax-themes', 'redot-syntax-themes'),
('godot_skin', 'redot_skin'),
@@ -103,17 +100,26 @@
('``Godot', '``Redot'),
('godot/modules', 'redot/modules'),
('godot_binary', 'redot_binary'),
- ('godotengine.org', 'redot-url-todo.org'),
+ ('godotengine.org', 'redotengine.org'),
('godot-source', 'redot-source'),
('godot/bin', 'redot/bin'),
('gdb godot', 'gdb redot'),
('GODOT', 'REDOT'),
('USERNAME/godot', 'USERNAME/redot'),
- ('', ''),
- ('', ''),
- ('', ''),
- ('', ''),
- ('', ''),
+ ('godot-xr', 'redot-xr'),
+ ('godotisawesome', 'redotisawesome'),
+ ('godot-cpp', 'redot-cpp'),
+ ('GodotCPP', 'RedotCPP'),
+ ('namespace godot', 'namespace redot'),
+ ('godot_cpp', 'redot_cpp'),
+ ('GodotObject', 'RedotObject'),
+ ('GodotBot', 'RedotBot'),
+ ('GodotPlugin', 'RedotPlugin'),
+ ('org.godotengine', 'org.redotengine'),
+ ('/godot>', '/redot>'),
+ ('repos/godotengine/godot', 'repos/redot-engine/redot'),
+ ('godot demo', 'redot demo'),
+ ('godotsharp', 'redotsharp'),
]
# Mappings that should work on first migration
@@ -121,7 +127,11 @@
# Table breakers
('| ``"Please include this when reporting the bug on: https://github.com/godotengine/godot/issues"`` |', '| ``"Please include this when reporting the bug on: https://github.com/redot-engine/godot/issues"``|'),
('https://github.com/godotengine/godot/pull/40364>`_ for more. |', 'https://github.com/redot-engine/redot/pull/40364>`_ for more. |'),
+ # Almost existing urls
+ ('https://docs.godotengine.org', 'https://docs.redotengine.org'),
+ ('https://godotengine.org', 'https://redotengine.org'),
# Existing urls
+ ('https://nightly.link/godotengine/godot-docs/workflows/build_offline_docs/master/godot', 'https://nightly.link/redot-engine/redot-docs/workflows/build_offline_docs/master/redot'),
('https://github.com/godotengine/godot-docs/issues', 'https://github.com/redot-engine/redot-docs/issues'),
('https://github.com/godotengine/godot/blob/master', 'https://github.com/redot-engine/redot/blob/master'),
('https://raw.githubusercontent.com/godotengine/godot/master', 'https://raw.githubusercontent.com/redot-engine/redot/master'),
@@ -155,14 +165,45 @@
('godot.gif', 'redot.gif'),
('godot.jpg', 'redot.jpg'),
('godot.png', 'redot.png'),
- ('', ''),
- ('', ''),
+ ('"godot_', '"redot_'),
+ ('"godotengine"', '"redotengine"'),
+ ('GodotEngine', 'RedotEngine'),
+ ('godot-giscus', 'redot-giscus'),
+ ('"godotengine/', '"redotengine/'),
+ ('godot_is_latest', 'redot_is_latest'),
+ ('godot-edit-guideline', 'redot-edit-guideline'),
+ ('_godot_', '_redot_'),
+ ('to_godot', 'to_redot'),
+ ('godot.html', 'redot.html'),
+ ('by-godot', 'by-redot'),
]
filename_mappings = [
('godot', 'redot'),
]
+static_dirs = [
+ '**/img',
+ '**/files',
+ '_extensions',
+ '_static',
+ '_styleguides',
+ '_templates',
+ '_tools',
+]
+
+alphanumeric = [
+ 'py',
+ 'md',
+ 'css',
+ 'txt',
+ 'css',
+ 'js',
+ 'html',
+ 'csv',
+ 'rst',
+]
+
# force stdout encoding so it won't fail on print statements
if (sys.stdout.encoding != encoding):
sys.stdout = codecs.getwriter(encoding)(sys.stdout.buffer, 'strict')
@@ -171,21 +212,36 @@
def is_target(filename):
return any(filename.lower().endswith(m) for m in filename_masks)
-def migrate(inputDirectory, outputDirectory, includeUnimplemented):
- outputsig = os.path.join('.', outputDirectory)
- for root, dirs, files in os.walk(inputDirectory):
- # ignore output path
- if (root.startswith(outputsig)):
- continue
+def generateOutputName(root, fileName, outputDirectory):
+ on = os.path.join('.', outputDirectory, root, fileName)
+ on = convertContent(on, filename_mappings)
+ ensureDirExists(on)
+ return on
- items = filter(is_target, files)
- for item in items:
- convertFile(root, item, outputDirectory, includeUnimplemented)
+def convertContent(content, mappings):
+ for mapping in mappings:
+ search, replace = mapping
+ if (search != ''):
+ content = content.replace(search, replace)
+ return content
+
+def ensureDirExists(outputName):
+ dirname = os.path.dirname(outputName)
+ try:
+ os.makedirs(dirname)
+ except FileExistsError:
+ pass
+
+def copyFile(root, filename, outputDirectory):
+ inputName = os.path.join(root, filename)
+ outputName = generateOutputName(root, inputName.replace('.\\', '').replace('./', ''), outputDirectory)
+
+ print(f'Copying "{inputName}" to "{outputName}"')
+ shutil.copyfile(inputName, outputName)
def convertFile(root, filename, outputDirectory, includeUnimplemented):
inputName = os.path.join(root, filename)
- outputName = os.path.join('.', outputDirectory, inputName.replace('.\\', '').replace('./', ''))
- outputName = convertContent(outputName, filename_mappings)
+ outputName = generateOutputName(root, filename, outputDirectory)
print(f'Converting "{inputName}" to "{outputName}"')
with open(inputName, mode = 'r', encoding = encoding) as input:
@@ -198,46 +254,35 @@ def convertFile(root, filename, outputDirectory, includeUnimplemented):
with open(outputName, mode = 'w', encoding = encoding) as output:
output.write(data)
-def copyFile(root, filename, outputDirectory):
- inputName = os.path.join(root, filename)
- outputName = os.path.join('.', outputDirectory, inputName.replace('.\\', '').replace('./', ''))
- outputName = convertContent(outputName, filename_mappings)
-
- print(f'Copying "{inputName}" to "{outputName}"')
- with open(inputName, mode = 'r', encoding = encoding) as input:
- data = input.read()
- ensureDirExists(outputName)
- with open(outputName, mode = 'w', encoding = encoding) as output:
- output.write(data)
-
-def copyStaticDirs(inputDirectory, outputDirectory, identifier):
- outputsig = os.path.join('.', outputDirectory)
+def copyGlobalDir(inputDirectory, inputMask, outputDirectory):
for root, dirs, files in os.walk(inputDirectory):
- # ignore output path
- if (root.startswith(outputsig)):
- continue
- if (identifier in root):
+ if (inputMask in root and outputDirectory not in root):
for f in files:
inputName = os.path.join(root, f)
- outputName = os.path.join('.', outputDirectory, root, f)
- outputName = convertContent(outputName, filename_mappings)
+ outputName = generateOutputName(root, f, outputDirectory)
ensureDirExists(outputName)
print(f"Copying {inputName} to {outputName}")
copyfile(inputName, outputName)
-def convertContent(content, mappings):
- for mapping in mappings:
- search, replace = mapping
- if (search != ''):
- content = content.replace(search, replace)
- return content
+def convertStaticDir(inputDirectory, outputDirectory):
+ for root, dirs, files in os.walk(inputDirectory):
+ if (outputDirectory not in root and '__' not in root):
+ for f in files:
+ if (f.split('.')[1] in alphanumeric):
+ convertFile(root, f, outputDirectory, True)
+ else:
+ copyFile(root, f, outputDirectory)
-def ensureDirExists(outputName):
- dirname = os.path.dirname(outputName)
- try:
- os.makedirs(dirname)
- except FileExistsError:
- pass
+def migrate(inputDirectory, outputDirectory, includeUnimplemented):
+ outputsig = os.path.join('.', outputDirectory)
+ for root, dirs, files in os.walk(inputDirectory):
+ # ignore output path
+ if (root.startswith(outputsig)):
+ continue
+
+ items = filter(is_target, files)
+ for item in items:
+ convertFile(root, item, outputDirectory, includeUnimplemented)
inputDir = defaultInputDirectory
outputDir = defaultOutputDirectory
@@ -255,11 +300,17 @@ def ensureDirExists(outputName):
print(f"Input directory: {inputDir}, output directory: {outputDir}, include unimplemented: {includeUnimplemented}")
migrate(inputDir, outputDir, includeUnimplemented)
-copyFile(inputDir, 'conf.py', outputDir)
-copyFile(inputDir, 'robots.txt', outputDir)
+
+print("Copying config files...")
+convertFile(inputDir, 'conf.py', outputDir, includeUnimplemented)
+convertFile(inputDir, 'robots.txt', outputDir, includeUnimplemented)
print("Copying static directories...")
-copy_tree(os.path.join(inputDir, '_extensions'), os.path.join(outputDir, '_extensions'))
-copy_tree(os.path.join(inputDir, '_static'), os.path.join(outputDir, '_static'))
-copyStaticDirs(inputDir, outputDir, 'img')
-copyStaticDirs(inputDir, outputDir, 'files')
+
+for dir in static_dirs:
+ if ('**' in dir):
+ print(f"Copying dirs with mask {dir}")
+ copyGlobalDir(inputDir, dir.split('/')[1], outputDir)
+ else:
+ print(f"Converting dir {dir}")
+ convertStaticDir(dir, outputDir)
print("Done")