Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/4surix/pitwi
Module to make app in terminal/console with user interface.
https://github.com/4surix/pitwi
gui interface terminal
Last synced: 13 days ago
JSON representation
Module to make app in terminal/console with user interface.
- Host: GitHub
- URL: https://github.com/4surix/pitwi
- Owner: 4surix
- Created: 2021-02-11T22:13:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-08T23:51:31.000Z (almost 3 years ago)
- Last Synced: 2024-10-10T09:31:05.654Z (26 days ago)
- Topics: gui, interface, terminal
- Language: Python
- Homepage:
- Size: 83 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pitwi
[![PyPI](https://img.shields.io/pypi/v/pitwi)](https://pypi.org/project/pitwi/)
[![GitHub issues](https://img.shields.io/github/issues/4surix/pitwi)](https://github.com/4surix/pitwi/issues)
[![Download](https://img.shields.io/pypi/dm/pitwi)](https://pypi.org/project/pitwi/)
![Version python](https://img.shields.io/pypi/pyversions/pitwi)Librairy for create user interface in terminal/console with XML, CSS and Python.
# Aperçu
## Only Python :
```python
from pitwi import Root, Text(
Root(width = 45, height = 8)
.add(Text('Puf', bg='white', fg='black'))
.add(Text('Paf'), row=2, column=2)
.run()
)
```## Python + XML/CSS :
```xml
#pwik {
bg: white;
fg: black;
}
Puf
Paf```
```python
from pitwi import parserparser.file('NAME_OF_YOUR_FILE.xml').run()
```## Weather
![weather](https://cdn.discordapp.com/attachments/557310650569850881/817915701620506694/syyhLr5L76.gif)
> [weather.xml](https://github.com/4surix/pitwi/blob/main/exemples/weather.xml)
## File explorer
![file_explorer](https://cdn.discordapp.com/attachments/557310650569850881/817915760570793994/phVuxs5gRt.gif)
> [file_explorer.xml](https://github.com/4surix/pitwi/blob/main/exemples/file_explorer.xml)
## Expression
![expression](https://cdn.discordapp.com/attachments/557310650569850881/899586259016622120/1D8NQnNvoe.gif)
> [calcul.xml](https://github.com/4surix/pitwi/blob/main/exemples/calcul.xml)
## Ramass'herbe
![ramassherbe](https://cdn.discordapp.com/attachments/557310650569850881/899586377082105876/Y6hB1XZP5J.gif)
> [rammassherbe.xml](https://github.com/4surix/pitwi/blob/main/exemples/ramassherbe.xml)
# Documentation
## Text :
The text is between an opening and closing tag. `text`
The space in the beginning and the end are ignored.
` pantoufle ` == `pantoufle`
The character `{` and `}` is used to use Python code online. Is same as f-string.
`{f"Pomme {{poire}} fraise"}` == `Pomme {poire} fraise`
The characters `<`, `>` is depreciated because XML not supported in text. Use escape character to use it. `Puik \ paf`## Selection :
Press `Tab` to select next element and `Ctrl+Tab` to select previous element.
## Colors :```xml
object {
item: color;
}
```
```xml
.exemple {
color: white;
fg: blue;
bg: red;
border-color: yellow;
active-border-color: cyan;
}
```
### Dark
- black
- red
- green
- yellow
- blue
- magenta
- cyan
- silver### Light
- gray
- pink
- lime
- banana
- marlin
- violet
- teal
- white