Giter VIP home page Giter VIP logo

pitwi's Introduction

Pitwi

PyPI GitHub issues Download Version python

Librairy for create user interface in terminal/console with XML, CSS and Python.

Aperçu

Only 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 :

<root width="45" height="8">
    <style>
        #pwik {
            bg: white;
            fg: black;
        }
    </style>
    <text id="pwik">Puf</text>
    <text row="2" column="2">Paf</text>
</root>
from pitwi import parser

parser.file('NAME_OF_YOUR_FILE.xml').run()

Weather

weather

weather.xml

File explorer

file_explorer

file_explorer.xml

Expression

expression

calcul.xml

Ramass'herbe

ramassherbe

rammassherbe.xml

Documentation

Text :

The text is between an opening and closing tag. <tag>text</tag>

The space in the beginning and the end are ignored.

<tag> pantoufle </tag> == <tag>pantoufle</tag>

The character { and } is used to use Python code online. Is same as f-string.

<tag>{f"Pomme {{poire}} fraise"}</tag> == <tag>Pomme {poire} fraise</tag>

The characters <, > is depreciated because XML not supported in text. Use escape character to use it. <tag>Puik \<puf\> paf</tag>

Colors :

<root>
    <style>
        object {
            item: color;
        }
    </style>
</root>
<root>
    <style>
        .exemple {
            color: white;
            fg: blue;
            bg: red;
            border-color: yellow;
            active-border-color: cyan;
        }
    </style>
</root>

Dark

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • silver

Light

  • gray
  • pink
  • lime
  • banana
  • marlin
  • violet
  • teal
  • white

pitwi's People

Contributors

4surix avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.