Tim-ats-d / Visual-dialog

A library to make easier dialog box in a terminal.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Visual-dialog

Visual-dialog
A library to make easier dialog box in a terminal.

Features

📃 Automatic text scrolling.

🔖 Text coloring and formatting.

⚙️ Hackable and configurable.

⚠️ This library is still under development. API can change.

Installation

Using pip

Install Visual-dialog using pip (The lib is not yet available on pypi):

pip install git+git://github.com/Tim-ats-d/Visual-dialog

or update lib to the latest version:

pip install git+git://github.com/Tim-ats-d/Visual-dialog --upgrade

From source

git clone https://github.com/Tim-ats-d/Visual-dialog.git
cd Visual-dialog
pip install .

Requirements

Python version

Curses

Visual-dialog works with curses Python module. It is available in the standard Python library on UNIX but it doesn’t work out-of-the-box on Windows.

To install curses on Windows, you need windows-curses module:

pip install curses-windows

To build the documentation

pip install sphinx sphinx_rtd_theme

Quick-start

Hello world with Visual-dialog

import curses

from visualdialog import DialogBox


x, y = 0, 0
height, width = 35, 6

def main(win):
    curses.curs_set(False)

    textbox = DialogBox(x, y,
                        height, width,
                        title="Demo")
    textbox.char_by_char("Hello world",
                         win)


curses.wrapper(main)

Examples

Other various examples showing the capabilities of Visual-dialog can be found in examples.

Documentation

Visualdialog's documentation is automatically generated from the source code by Sphinx. To build it on GNU/Linux or MacOS:

git clone https://github.com/Tim-ats-d/Visual-dialog.git
cd Visual-dialog/doc
make html

Or on Windows with Git Bash:

git clone https://github.com/Tim-ats-d/Visual-dialog.git
cd Visual-dialog/doc
./make.bat html

Once generated, the result will be in the doc/build/html/ folder.

You can also generate the documentation in Latex, Texinfo or man-pages.

Contributing

We would love for you to contribute to improve Visual-dialog.

For major changes, please open an issue first to discuss what you would like to change.

Take a look at our contributing guide to get started. You can also help by reporting bugs.

License

Distributed under the LGPL-3.0 License. See license for more information.

Acknowledgements

Thanks to all those who contributed to Visual-dialog !

About

A library to make easier dialog box in a terminal.

License:GNU Lesser General Public License v3.0


Languages

Language:Python 100.0%