mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
docs and examples polish
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user