diff --git a/README.md b/README.md index bc3e7cc..f52b7ed 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ +# Visual-dialog +

FeaturesInstallation • @@ -10,14 +12,13 @@

- Visual-dialog -
- Library to make easier dialog box in terminal. + Visual-dialog
- This library is still under development. - API can change. + A library to make easier dialog box in terminal.

+This library is still under development. API can change. + ## Features 📃 Automatic text scrolling. @@ -46,7 +47,7 @@ python3 -m pip install git+git://github.com/Tim-ats-d/Visual-dialog --upgrade ```sh git clone https://github.com/Tim-ats-d/Visual-dialog.git cd Visual-dialog -pip install . +python3 -m pip install . ``` ## Requirements diff --git a/examples/confrontation.py b/examples/confrontation.py index 1a05cfa..933ff98 100644 --- a/examples/confrontation.py +++ b/examples/confrontation.py @@ -1,6 +1,6 @@ -# confrontation.py +# confrontation.py # -#  A concrete example exploiting the possibilities of Visual-dialog. +# A concrete example exploiting the possibilities of Visual-dialog. import curses diff --git a/examples/context.py b/examples/context.py index c4c14e1..6e8ed4b 100644 --- a/examples/context.py +++ b/examples/context.py @@ -1,6 +1,6 @@ -# context.py +# context.py # -# An example of how to use a text box as a context manager. +# An example of how to use a text box as a context manager. import curses diff --git a/examples/monologue.py b/examples/monologue.py index 44cceae..7898f83 100644 --- a/examples/monologue.py +++ b/examples/monologue.py @@ -1,6 +1,6 @@ -# monologue.py +# monologue.py # -#  A simple example of how to use Visual-dialog. +# A simple example of how to use Visual-dialog. import curses diff --git a/examples/text_attributes.py b/examples/text_attributes.py index 2e25c83..f5eb2ad 100644 --- a/examples/text_attributes.py +++ b/examples/text_attributes.py @@ -1,6 +1,6 @@ -# text_attributes.py +# text_attributes.py # -# An example showing the possibilities of text formatting. +# An example showing the possibilities of text formatting. import curses diff --git a/examples/word.py b/examples/word.py index dd907c2..1d942b3 100644 --- a/examples/word.py +++ b/examples/word.py @@ -1,6 +1,6 @@ -# words.py +# words.py # -#  An example of using the word_by_word method from text boxes. +# An example of using the word_by_word method from text boxes. import curses diff --git a/setup.py b/setup.py index f95b201..fe9e6d9 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,4 @@ + from setuptools import find_packages, setup from visualdialog import __author__, __version__ diff --git a/tests/test.py b/tests/test.py index c0cbbcd..36f2ec1 100644 --- a/tests/test.py +++ b/tests/test.py @@ -1,6 +1,6 @@ -# test.py +# test.py # -#  This file contains the tests used to debug the library. +# This file contains the tests used to debug the library. import curses diff --git a/visualdialog/__init__.py b/visualdialog/__init__.py index 2a3130e..9473c39 100644 --- a/visualdialog/__init__.py +++ b/visualdialog/__init__.py @@ -1,3 +1,4 @@ + """ A library to make easier dialog box in terminal. """ diff --git a/visualdialog/box.py b/visualdialog/box.py index 4d5df8d..ab42d34 100644 --- a/visualdialog/box.py +++ b/visualdialog/box.py @@ -1,23 +1,6 @@ -# box.py -# -# 2020 Timéo Arnouts -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1301, USA. -# +# box.py # +# 2020 Timéo Arnouts __all__ = ["BaseTextBox"] diff --git a/visualdialog/choices.py b/visualdialog/choices.py index cb000cc..ad01422 100644 --- a/visualdialog/choices.py +++ b/visualdialog/choices.py @@ -1,23 +1,6 @@ -# choices.py -# -# 2020 Timéo Arnouts -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1301, USA. -# +# choices.py # +# 2020 Timéo Arnouts import curses from typing import Any, Dict, Tuple, Union diff --git a/visualdialog/dialog.py b/visualdialog/dialog.py index 211dada..6d9d94a 100644 --- a/visualdialog/dialog.py +++ b/visualdialog/dialog.py @@ -1,23 +1,6 @@ -# dialog.py -# -# 2020 Timéo Arnouts -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1301, USA. -# +# dialog.py # +# 2020 Timéo Arnouts __all__ = ["DialogBox"] diff --git a/visualdialog/utils.py b/visualdialog/utils.py index 9396e4c..235c886 100644 --- a/visualdialog/utils.py +++ b/visualdialog/utils.py @@ -1,28 +1,11 @@ -# utils.py -# -# 2020 Timéo Arnouts -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1301, USA. -# +# utils.py # +# 2020 Timéo Arnouts from contextlib import ContextDecorator import _curses from typing import (Generator, Iterable, List, NoReturn, Tuple, TypeVar, - Union) + Union) CursesWindow = _curses.window @@ -46,17 +29,17 @@ def _make_chunk(iterable: Union[Tuple, List], :returns: Generator separated into ``chunk_length`` bundles. """ return (iterable[chunk:chunk + chunk_length] - for chunk in range(0, len(iterable), chunk_length)) + for chunk in range(0, len(iterable), chunk_length)) class TextAttributes(ContextDecorator): """A context manager to manage ``curses`` text attributes. :param win: ``curses`` window object for which the attributes will - be managed. + be managed. :param attributes: Iterable of ``curses`` text attributes to activate - and desactivate. + and desactivate. """ def __init__(self, win: CursesWindow,