Skip to content

Commit

Permalink
Finish switch to tree views as library
Browse files Browse the repository at this point in the history
  • Loading branch information
aksiome committed Dec 21, 2024
1 parent ba5f9bc commit 3e2d591
Show file tree
Hide file tree
Showing 27 changed files with 45 additions and 139 deletions.
1 change: 0 additions & 1 deletion docs/_static/icons/dir/audio.svg

This file was deleted.

36 changes: 0 additions & 36 deletions docs/_static/icons/dir/folder.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/dir/image.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/dir/json.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/dir/mcfunction.svg

This file was deleted.

36 changes: 0 additions & 36 deletions docs/_static/icons/dir/mcmeta.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/dir/nbt.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/dir/yml.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/nbt/any.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/nbt/bool.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/nbt/byte-array.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/nbt/byte.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/nbt/compound.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/nbt/double.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/nbt/float.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/nbt/int-array.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/nbt/int.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/nbt/list.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/nbt/long-array.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/nbt/long.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/nbt/number.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/nbt/short.svg

This file was deleted.

1 change: 0 additions & 1 deletion docs/_static/icons/nbt/string.svg

This file was deleted.

20 changes: 2 additions & 18 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import os

from sphinx_treeview import DecoratorType, imagesToDecoratorIcons

# -- Project information -----------------------------------------------------

project = "Bookshelf"
Expand All @@ -14,11 +12,11 @@
extensions = [
"myst_parser",
"sphinx_copybutton",
"sphinx_copybutton",
"sphinx_design",
"sphinx_minecraft",
"sphinx_togglebutton",
"sphinx_treeview",
"sphinx_copybutton",
"sphinx_minecraft",
]

exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
Expand All @@ -44,20 +42,6 @@
"tasklist",
]

# -- TreeView options -------------------------------------------------------

stv_disable_default_decorators = True
stv_decorators = [
DecoratorType(
name="dir",
icons=imagesToDecoratorIcons("_static/icons/dir", "icons/dir"),
),
DecoratorType(
name="nbt",
icons=imagesToDecoratorIcons("_static/icons/nbt", "icons/nbt"),
),
]

# -- Options for HTML output -------------------------------------------------

html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
Expand Down
44 changes: 22 additions & 22 deletions docs/contribute/tree-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Bookshelf respects a certain tree structure which can be similar to Java package

:::::{grid} 1 2 2 2
::::{grid-item}
:columns: 12 6 7 7
:columns: 12 6 6 6

**Module Requirements:**

Expand All @@ -27,31 +27,31 @@ Bookshelf respects a certain tree structure which can be similar to Java package

- A feature is equal to a unique utility, so we should not hesitate to decompose its features in order to make it more readable and to promote reusability.

In addition to these few constraints, the Bookshelf contributor is free to organise their files as they wishes as long as it remains coherent, understandable and it respects the global structure.
In addition to these few constraints, contributors are free to organize their files as they wish as long as it remains coherent and it respects the global structure.
::::
::::{grid-item}
:columns: 12 6 5 5
:columns: 12 6 6 6

:::{treeview}
- {dir}`folder` modules
- {dir}`folder` \<module\>
- {dir}`folder` data/\<module\>
- {dir}`folder` function
- {dir}`folder` \<feature1\>
- {dir}`mcfunction` \<feature1\>.mcfunction
- {dir}`mcfunction` ...
- {dir}`mcfunction` \<feature2\>.mcfunction
- {dir}`mcfunction` \_\_load\_\_.mcfunction
- {dir}`mcfunction` \_\_unload\_\_.mcfunction
- {dir}`folder` \<predicate|loot_table|...\>
- {dir}`json` \<feature1\>.json
- {dir}`json` ...
- {dir}`folder` tags
- {dir}`folder` function
- {dir}`json` \<feature1\>.json
- {dir}`json` ...
- {dir}`json` module.json
- {dir}`folder` ...
- {mcdir}`folder` modules
- {mcdir}`folder` \<module\>
- {mcdir}`folder` data/\<module\>
- {mcdir}`folder` function
- {mcdir}`folder` \<feature1\>
- {mcdir}`mcfunction` \<feature1\>.mcfunction
- {mcdir}`mcfunction` ...
- {mcdir}`mcfunction` \<feature2\>.mcfunction
- {mcdir}`mcfunction` \_\_load\_\_.mcfunction
- {mcdir}`mcfunction` \_\_unload\_\_.mcfunction
- {mcdir}`folder` \<predicate|loot_table|...\>
- {mcdir}`json` \<feature1\>.json
- {mcdir}`json` ...
- {mcdir}`folder` tags
- {mcdir}`folder` function
- {mcdir}`json` \<feature1\>.json
- {mcdir}`json` ...
- {mcdir}`json` module.json
- {mcdir}`folder` ...
:::
::::
:::::
23 changes: 19 additions & 4 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ docs = [
"sphinx-autobuild>=2024.10.3",
"sphinx-copybutton>=0.5.2",
"sphinx-design>=0.6.1",
"sphinx-minecraft>=1.0.0",
"sphinx-togglebutton>=0.3.2",
"sphinx-treeview>=0.1.3",
"sphinx-treeview>=1.0.0",
"sphinx>=8.1.3",
"sphinx-minecraft>=1.0.0",
]

[project.scripts]
Expand Down

0 comments on commit 3e2d591

Please sign in to comment.