diff --git a/assets/src/ba_data/python/ba/__init__.py b/assets/src/ba_data/python/ba/__init__.py index a773a787..1f32e5bf 100644 --- a/assets/src/ba_data/python/ba/__init__.py +++ b/assets/src/ba_data/python/ba/__init__.py @@ -18,7 +18,7 @@ from _ba import ( newnode, playsound, printnodes, printobjects, pushcall, quit, rowwidget, safecolor, screenmessage, scrollwidget, set_analytics_screen, charstr, textwidget, time, timer, open_url, widget, clipboard_is_supported, - clipboard_has_text, clipboard_get_text, clipboard_set_text) + clipboard_has_text, clipboard_get_text, clipboard_set_text, getdata) from ba._activity import Activity from ba._plugin import PotentialPlugin, Plugin, PluginSubsystem from ba._actor import Actor diff --git a/assets/src/pdoc/templates/index.html.jinja2 b/assets/src/pdoc/templates/index.html.jinja2 index d049542b..efc2fba5 100644 --- a/assets/src/pdoc/templates/index.html.jinja2 +++ b/assets/src/pdoc/templates/index.html.jinja2 @@ -9,19 +9,29 @@ {% endblock %} {% if search %} - + {% endif %}
-

header woo-hoo

- Welcome to blah blah blah, some bold text, create an - issue - if something in this docs feels incorrect or can be improved blah blah - - some code hooray - -
- TODO: add some normal text here. +

Welcome to Ballistica Documentations!

+ Last updated for Ballistica {{ ba_version }} + (build {{ ba_build }}) +
+

+ Here you can find information about Python classes/functions + used by Ballistica. + Fell free to create an + + issue + or send a + PR + if something in this docs feels incorrect or can be improved. + Note that bastd's docs may look a little terrible + right + now, hope that's temporary. :) +

{% if search %} {% include "search.html.jinja2" %} diff --git a/tools/batools/docs.py b/tools/batools/docs.py index e12c7177..f47587c9 100755 --- a/tools/batools/docs.py +++ b/tools/batools/docs.py @@ -75,6 +75,7 @@ def parse_docs_attrs(attrs: list[AttributeInfo], docs: str) -> str: def generate(projroot: str) -> None: """Main entry point.""" + from batools.version import get_current_version import pdoc # Make sure we're running from the dir above this script. @@ -87,7 +88,11 @@ def generate(projroot: str) -> None: outdirname = (Path(projroot) / 'build' / 'docs_html').absolute() sys.path.append(str(pythondir)) + version, build_number = get_current_version() + try: + pdoc.render.env.globals['ba_version'] = version + pdoc.render.env.globals['ba_build'] = build_number pdoc.render.configure(search=True, show_source=True, template_directory=templatesdir)