Metadata-Version: 1.2
Name: terminal-layout
Version: 1.0.4
Summary: The project help you to quickly build layouts in terminal (命令行ui布局工具)
Home-page: https://github.com/gojuukaze/terminal_layout
Author: gojuukaze
Author-email: ikaze_email@163.com
License: UNKNOWN
Project-URL: Documentation, https://terminal-layout.readthedocs.io
Project-URL: Source, https://github.com/gojuukaze/terminal_layout
Description: terminal_layout
        ===============
        
        | The project help you to quickly build layouts in terminal
        | (这个一个命令行ui布局工具)
        
        |image0|
        
        |asciicast|
        
        link
        ====
        
        -  `All Demo`_
        -  `Docs`_
        -  https://asciinema.org/a/226120
        
        install
        =======
        
        .. code:: bash
        
           pip install terminal-layout
        
        Usage
        =====
        
        -  easy demo:
        
        .. code:: python
        
           import time
           from terminal_layout import *
        
           ctl = LayoutCtl(TextView('id1', 'hello world!', width=20, fore=Fore.red, back=Back.green))
        
           ctl.draw()
        
           time.sleep(2)
        
           view = ctl.find_view_by_id('id1')
           view.text = 'hi world'
           ctl.re_draw()
        
        |image2|
        
        -  use table layout:
        
        .. code:: python
        
           from terminal_layout import *
        
           ctl = LayoutCtl.quick(TableLayout,
                           [
                               [TextView('title', 'Student', fore=Fore.black, back=Back.yellow, width=17,
                                         gravity=Gravity.center)],
        
                               [TextView('', 'No.', width=5, back=Back.yellow),
                                TextView('', 'Name', width=12, back=Back.yellow)],
        
                               [TextView('st1_no', '1', width=5, back=Back.yellow),
                                TextView('st1_name', 'Bob', width=12, back=Back.yellow)],
        
                               [TextView('stw_no', '2', width=5, back=Back.yellow),
                                TextView('st1_name', 'Tom', width=12, back=Back.yellow)]
                           ]
        
                           )
        
           ctl.draw()
        
        |image3|
        
        -  use python2 unicode
        
        .. code:: python
        
           # -*- coding: utf-8 -*-
           from terminal_layout import *
           import sys
           reload(sys)
           sys.setdefaultencoding('utf-8')
        
           ctl = LayoutCtl.quick(TableLayout,
                                 [
                                     [TextView('', u'中文，你好', back=Back.cyan, width=Width.wrap)],
                                     [TextView('', u'中文，你好', back=Back.cyan, width=6)],
                                     [TextView('', u'日本語，こんにちは', back=Back.cyan, width=Width.wrap)],
                                 ]
        
                                 )
        
           ctl.draw()
        
        |image4|
        
        Properties
        ----------
        
        属性说明
        
        -  fore & back
        
        .. code:: python
        
           TextView('','fore',fore=Fore.red)
           TextView('','back',back=Back.red)
        
        |image5|
        
        -  style
        
        .. code:: python
        
           TextView('','style',style=Style.dim)
        
        |image6|
        
        -  width
        
        .. code:: python
        
           TextView('','width',width=10)
        
        |image7|
        
        -  weight
        
        .. code:: python
        
           TextView('','weight',weight=1)
        
        |image8|
        
        -  gravity
        
        .. code:: python
        
           TextView('','gravity',gravity=Gravity.left)
        
        |image9|
        
        -  visibility
        
        .. code:: python
        
           TextView('','',visibility=Visibility.visible)
        
        |image10|
        
        -  ex_style
        
        **not support windows**
        
        .. code:: python
        
           from terminal_layout import *
           TextView('','ex_style',style=Style.ex_blink)
        
        |image11|
        
        -  ex_fore & ex_back
        
        **not support windows**
        
        .. code:: python
        
           from terminal_layout import *
           TextView('','ex_fore',fore=Fore.ex_red_1)
           TextView('','ex_back',back=Back.ex_red_1)
        
        |image12|
        
        .. _All Demo: https://github.com/gojuukaze/terminal_layout/tree/master/demo
        .. _Docs: https://terminal-layout.readthedocs.io
        
        .. |image0| image:: https://github.com/gojuukaze/terminal_layout/raw/master/pic/demo.gif
        .. |asciicast| image:: https://asciinema.org/a/226120.svg
           :target: https://asciinema.org/a/226120
        .. |image2| image:: https://github.com/gojuukaze/terminal_layout/raw/master/pic/hello.png
        .. |image3| image:: https://github.com/gojuukaze/terminal_layout/raw/master/pic/table.png
        .. |image4| image:: https://github.com/gojuukaze/terminal_layout/raw/master/pic/py2.png
        .. |image5| image:: https://github.com/gojuukaze/terminal_layout/raw/master/pic/color.jpeg
           :scale: 50%
        .. |image6| image:: https://github.com/gojuukaze/terminal_layout/raw/master/pic/style.jpeg
           :scale: 50%
        .. |image7| image:: https://github.com/gojuukaze/terminal_layout/raw/master/pic/width.jpeg
           :scale: 50%
        .. |image8| image:: https://github.com/gojuukaze/terminal_layout/raw/master/pic/weight.jpeg
           :scale: 50%
        .. |image9| image:: https://github.com/gojuukaze/terminal_layout/raw/master/pic/gravity.jpeg
           :scale: 50%
        .. |image10| image:: https://github.com/gojuukaze/terminal_layout/raw/master/pic/visibility.jpeg
           :scale: 50%
        .. |image11| image:: https://github.com/gojuukaze/terminal_layout/raw/master/pic/ex_style.jpeg
           :scale: 50%
        .. |image12| image:: https://github.com/gojuukaze/terminal_layout/raw/master/pic/ex_color.jpeg
           :scale: 50%
        
Platform: OSX
Platform: Linux
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Development Status :: 5 - Production/Stable
Classifier: Topic :: Terminals
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
