Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs plugin #536

Merged
merged 9 commits into from
May 24, 2022
Merged

docs plugin #536

merged 9 commits into from
May 24, 2022

Conversation

willmcgugan
Copy link
Collaborator

@willmcgugan willmcgugan commented May 23, 2022

  • Added a command to textual cli to run a textual app.

You can now run an app like this:

textual run basic.py

Where you may previously have done this:

python basic.py

Why? Well it allows setting things from the CLI which previously you could only set via env vars. Not everyone knows how to set env vars, particularly on Windows, and I don't want to have to educate people.

It also allows for a little less boilerplate in examples in docs. i.e. we won't have to repeat this:

  app = MyApp(css_path="app.css")
  if __name__ == "__main__:
      app.run()
  • Added a mkdocs extension to insert SVG screenshots in docs.

Screenshot 2022-05-23 at 17 33 13

Screen.Recording.2022-05-23.at.17.29.54.mov
  • Added a "headless" mode for the above, so we don't need to take over the terminal to get screenshots

@@ -4,8 +4,27 @@ Textual is framework for rapidly creating _text user interfaces_ (TUIs from here

A TUI is an application that lives within a terminal, which can have mouse and keyboard support and user interface elements like windows and panels, but is rendered purely with text. They have a number of advantages over GUI applications: they can be launched from the command line, and return to the command line, and they work over ssh.

## Foo
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just using this file as a test for now.

Copy link

@olivierphi olivierphi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These docs are going to be so good! 😍


#rich = {git = "git@github.com:willmcgugan/rich", rev = "link-id"}
rich = "^12.4.3"
#rich = {path="../rich", develop=true}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, I didn't know it was possible to do this! Quite handy for local development indeed 🤩

src/textual/_doc.py Show resolved Hide resolved
src/textual/app.py Show resolved Hide resolved
@darrenburns
Copy link
Member

Very cool 👏

src/textual/cli/cli.py Outdated Show resolved Hide resolved
@willmcgugan willmcgugan merged commit 7cd0e89 into css May 24, 2022
@willmcgugan willmcgugan deleted the docs-update branch May 24, 2022 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants