docs and examples polish

This commit is contained in:
Will McGugan
2022-10-20 14:55:07 +01:00
parent e620011a5d
commit 4f4696e832
3 changed files with 62 additions and 20 deletions

View File

@@ -25,18 +25,59 @@ You can install Textual via PyPI.
If you plan on developing Textual apps, then you should install `textual[dev]`. The `[dev]` part installs a few extra dependencies for development.
```
pip install "textual[dev]==0.2.0b7"
pip install "textual[dev]"
```
If you only plan on _running_ Textual apps, then you can drop the `[dev]` part:
```
pip install textual==0.2.0b7
pip install textual
```
!!! important
## Demo
Once you have Textual installed, run the following to get an impression of what it can do:
```bash
python -m textual
```
If Textual is installed you should see the following:
```{.textual path="src/textual/demo.py" columns="127" lines="53" press="enter,_,_,_,_,_,_,tab,w,i,l,l"}
```
## Examples
The Textual repository comes with a number of example apps. To try out the examples, first clone the Textual repository:
=== "HTTPS"
```bash
git clone https://github.com/Textualize/textual.git
```
=== "SSH"
```bash
git clone git@github.com:Textualize/textual.git
```
=== "GitHub CLI"
```bash
gh repo clone Textualize/textual
```
With the repository cloned, navigate to the `/examples/` directory where you fill find a number of Python files you can run from the command line:
```bash
cd textual/examples/
python code_browser.py ../
```
There may be a more recent beta version since the time of writing. Check the [release history](https://pypi.org/project/textual/#history) for a more recent version.
## Textual CLI

View File

@@ -35,13 +35,13 @@ If you want to try the finished Stopwatch app and follow along with the code, fi
=== "HTTPS"
```bash
git clone -b css https://github.com/Textualize/textual.git
git clone https://github.com/Textualize/textual.git
```
=== "SSH"
```bash
git clone -b css git@github.com:Textualize/textual.git
git clone git@github.com:Textualize/textual.git
```
=== "GitHub CLI"