bumped version number, fixed back button, build command struct docs
This commit is contained in:
15
dig/build.py
15
dig/build.py
@@ -105,11 +105,24 @@ def build(args):
|
||||
f.write("```\n")
|
||||
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:
|
||||
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("## Subtitle (use this for categories)\n")
|
||||
f.write("## Functions\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("### v0.0.1 (latest)\n")
|
||||
f.write("- Initial release.\n")
|
||||
|
||||
@@ -55,13 +55,16 @@ class DocsApp(App):
|
||||
async def on_button_pressed(self, event: Button.Pressed):
|
||||
if event.button.id == "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:
|
||||
with open(self.inital_markdown_path, "r") as f:
|
||||
markdown = f.read()
|
||||
|
||||
yield Header()
|
||||
yield MarkdownViewer(markdown)
|
||||
yield MarkdownViewer("")
|
||||
|
||||
with Horizontal(id="bottom"):
|
||||
yield Button(label="Back", id="back", flat=True, variant="error")
|
||||
|
||||
@@ -12,7 +12,7 @@ from .build import build
|
||||
|
||||
def parse_arguments():
|
||||
# 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")
|
||||
|
||||
# install command
|
||||
|
||||
Reference in New Issue
Block a user