bumped version number, fixed back button, build command struct docs

This commit is contained in:
2026-03-17 21:48:17 +11:00
parent 7460d784b6
commit 44c37f84e6
5 changed files with 20 additions and 8 deletions

View File

@@ -105,11 +105,24 @@ def build(args):
f.write("```\n") f.write("```\n")
f.write("`Using \"python\" as the syntax highlighting language seems to work well with Ground.`") f.write("`Using \"python\" as the syntax highlighting language seems to work well with Ground.`")
with open(os.path.join(docs_folder, "myStruct_struct.md"), "w") as f:
f.write("# -myStruct\n")
f.write("Describe your struct briefly. (Comments are example values)\n\n")
f.write("```python\n")
f.write("struct -myStruct\n")
f.write("\tinit &myField -string # \"example value\"\n")
f.write("\tinit &myField2 -int # 1234\n")
f.write("\tinit &myField3 -bool # true\n")
f.write("endstruct\n")
f.write("```")
with open(os.path.join(build_dir, "SUMMARY.md"), "w") as f: with open(os.path.join(build_dir, "SUMMARY.md"), "w") as f:
f.write("# mylib\n") f.write("# mylib\n")
f.write("Introduce your module here!\n\nThis file will serve as an index page for all your docs.\n\n") f.write("Introduce your module here!\n\nThis file will serve as an index page for all your docs.\n\n")
f.write("## Subtitle (use this for categories)\n") f.write("## Functions\n")
f.write("- [mylib_MyFunction](docs/my_function.md)\n\n") f.write("- [mylib_MyFunction](docs/my_function.md)\n\n")
f.write("## Structs\n")
f.write("- [-myStruct](docs/myStruct_struct.md)\n\n")
f.write("## Changelog\n") f.write("## Changelog\n")
f.write("### v0.0.1 (latest)\n") f.write("### v0.0.1 (latest)\n")
f.write("- Initial release.\n") f.write("- Initial release.\n")

View File

@@ -56,12 +56,15 @@ class DocsApp(App):
if event.button.id == "back": if event.button.id == "back":
await self.query_one(MarkdownViewer).back() await self.query_one(MarkdownViewer).back()
async def on_ready(self):
await self.query_one(MarkdownViewer).go(self.inital_markdown_path)
def compose(self) -> ComposeResult: def compose(self) -> ComposeResult:
with open(self.inital_markdown_path, "r") as f: with open(self.inital_markdown_path, "r") as f:
markdown = f.read() markdown = f.read()
yield Header() yield Header()
yield MarkdownViewer(markdown) yield MarkdownViewer("")
with Horizontal(id="bottom"): with Horizontal(id="bottom"):
yield Button(label="Back", id="back", flat=True, variant="error") yield Button(label="Back", id="back", flat=True, variant="error")

View File

@@ -12,7 +12,7 @@ from .build import build
def parse_arguments(): def parse_arguments():
# create our subcommands and args # create our subcommands and args
arg_parser = argparse.ArgumentParser(prog="Digpkg", description="The package manager for the Ground programming language.") arg_parser = argparse.ArgumentParser(prog="Digpkg", description="The package manager for the Ground programming language.", epilog="Version 1.2")
sub_parsers = arg_parser.add_subparsers(dest="command") sub_parsers = arg_parser.add_subparsers(dest="command")
# install command # install command

View File

@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup( setup(
name="digpkg", name="digpkg",
version="1.1", version="1.2",
packages=find_packages(), packages=find_packages(),
install_requires=[ install_requires=[
"textual>=7.3.0", "textual>=7.3.0",

View File

@@ -1,4 +0,0 @@
extern "math"
call !math_RandomDouble 1.0 10.0 &var
println $var