Browse Source

Added web links to the tutorial

pull/206/head
Eugenio Parodi 2 years ago
parent
commit
972a5cda03
  1. 4
      README.md
  2. 1
      docs/source/info/dev/clipboard.rst
  3. 1
      docs/source/info/dev/dragdrop.rst
  4. 1
      docs/source/info/dev/input.rst
  5. 1
      docs/source/info/dev/paint.rst
  6. 41
      docs/source/info/features/index.rst
  7. 6
      tutorial/001-helloworld.rst
  8. 19
      tutorial/002-layout.rst
  9. 2
      tutorial/003-signalslots.rst
  10. 4
      tutorial/004-logging.rst
  11. 5
      tutorial/005-calculator.rst
  12. 6
      tutorial/ttkDesigner/textEdit/README.rst

4
README.md

@ -19,14 +19,14 @@ and inspired by a mix of [Qt5](https://www.riverbankcomputing.com/static/Docs/Py
[pyTermTk.Showcase.002.webm](https://user-images.githubusercontent.com/8876552/206490679-2bbdc909-c9bc-41c1-9a50-339b06dabecd.webm)
## [Features](https://ceccopierangiolieugenio.github.io/pyTermTk/info/features/index.html)
- Self Contained (no external lib required), Python 3.9 or above required.
- [Self Contained](https://ceccopierangiolieugenio.github.io/pyTermTk/info/installing.html) (no external lib required), Python 3.9 or above required.
- [Cross compatible](https://ceccopierangiolieugenio.github.io/pyTermTk/info/features/crosscompatible.html): [Linux](https://en.wikipedia.org/wiki/Linux)🐧, [MacOS](https://en.wikipedia.org/wiki/MacOS)🍎, [MS Windows](https://en.wikipedia.org/wiki/Microsoft_Windows)🪟, [HTML5](https://en.wikipedia.org/wiki/HTML5)🌍([Try](https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html))
- [Basic widgets](https://ceccopierangiolieugenio.github.io/pyTermTk/info/features/widgets.html#base-widgets) for [TUI](https://en.wikipedia.org/wiki/Text-based_user_interface) development (Button, Label, checkbox, ...)
- [Specialized widgets](https://ceccopierangiolieugenio.github.io/pyTermTk/info/features/widgets.html#specialised-widgets) to improve the usability (Windows, Frames, Tables, ...)
- QT Like Layout system to help arrange the widgets in the terminal
- True color support
- Ful/Half/Zero sized Unicode characters 😎
- I am pretty sure there is something else...
- I am pretty sure there is [something else...](https://ceccopierangiolieugenio.github.io/pyTermTk/info/features/index.html)
---

1
docs/source/info/dev/clipboard.rst

@ -0,0 +1 @@
TBD

1
docs/source/info/dev/dragdrop.rst

@ -0,0 +1 @@
TBD

1
docs/source/info/dev/input.rst

@ -0,0 +1 @@
TBD

1
docs/source/info/dev/paint.rst

@ -0,0 +1 @@
TBD

41
docs/source/info/features/index.rst

@ -21,35 +21,38 @@ Main features
- Ful/Half/Zero sized Unicode characters 😎
- I am pretty sure there is something else...
Self Contained, :doc:`Cross Compatible <crosscompatible>`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Self Contained, :doc:`Cross Compatible <crosscompatible>`
| pyTermTk_ does not require external libraries (i.e. curses)
| It can be :ref:`installed through PyPi <install-pypi>` or simply :ref:`copy the TermTk folder <install-copy>` inside the root path of any project.
| Compatible with :ref:`cc-linux`, :ref:`cc-windows`, :ref:`cc-macos`, :ref:`HTML5 <cc-html5>`
| pyTermTk_ does not require external libraries (i.e. curses)
| It can be :ref:`installed through PyPi <install-pypi>` or simply :ref:`copy the TermTk folder <install-copy>` inside the root path of any project.
| Compatible with :ref:`cc-linux`, :ref:`cc-windows`, :ref:`cc-macos`, :ref:`HTML5 <cc-html5>`
Wide variety of built-in :ref:`widgets <widgets-base>`, :ref:`pickers <widgets-pickers>`, :ref:`layout helpers <widgets-layout>`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Wide variety of built-in :ref:`widgets <widgets-base>`, :ref:`pickers <widgets-pickers>`, :doc:`Layout helpers <../../tutorial/002-layout>`
Clipboard support
~~~~~~~~~~~~~~~~~
* Input/Mouse/Paste Event handling
* Drag and Drop
* Clipboard support
* Drawing primitives
* True color support
* Ful/Half/Zero sized Unicode characters 😎
.. _features-alpha:
Alpha Features
--------------
Those are the feature/poc that are not being extensively tested and can be prone to unexpected behaviour.
Their APIs may change before the final release to address bugs or improving the overall design implementation.
Text Editor
~~~~~~~~~~~
| Those are the feature/poc that are not being extensively tested and can be prone to unexpected behaviour.
| Their APIs may change before the final release to address bugs or improving the overall design implementation.
Terminal Emulator
~~~~~~~~~~~~~~~~~
* Text Editor
Terminal Multiplexer
~~~~~~~~~~~~~~~~~~~~
* Terminal Emulator
ttkDesigner
~~~~~~~~~~~
* Terminal Multiplexer
* ttkDesigner

6
tutorial/001-helloworld.rst

@ -23,7 +23,8 @@ Examples
Example 1
---------
Following is the code to execute `helloworld.001.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/helloworld/helloworld.001.py>`_ in pyTermTk_:
Following is the code to execute `helloworld.001.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/helloworld/helloworld.001.py>`_
in pyTermTk_ (`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/helloworld/helloworld.001.py>`_):
.. code:: python
@ -42,7 +43,8 @@ The above code produces the following output
Example 2 - Your first Window
-----------------------------
Following is the code to execute `helloworld.002.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/helloworld/helloworld.002.py>`_ in pyTermTk_:
Following is the code to execute `helloworld.002.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/helloworld/helloworld.002.py>`_
in pyTermTk_ (`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/helloworld/helloworld.002.py>`_):
.. code:: python

19
tutorial/002-layout.rst

@ -14,6 +14,13 @@
.. _Nested Layouts Example: https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/layout/example5.nested.layouts.py
.. _`row/colspan Example`: https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/layout/example6.grid.span.py
.. _web-LayoutEx: https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/layout/example1.simple.layout.py
.. _web-VBoxEx: https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/layout/example2.simple.vbox.py
.. _web-HBoxEx: https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/layout/example3.simple.hbox.py
.. _web-GridEx: https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/layout/example4.simple.grid.py
.. _web-NestedEx: https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/layout/example5.nested.layouts.py
.. _web-SpanEx: https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/layout/example6.grid.span.py
=============================================================================
pyTermTk_ - Layouts
=============================================================================
@ -111,7 +118,7 @@ Examples
1 - Simple TTkLayout_
---------------------
Following is the code to execute `Layout Example`_ in pyTermTk_
Following is the code to execute `Layout Example`_ in pyTermTk_ (`tryItOnline <web-LayoutEx_>`_)
.. code:: python
@ -146,7 +153,7 @@ The above code produces the following output:
2 - Simple TTkVBoxLayout_
-------------------------
Following is the code to execute `VBox Example`_ in pyTermTk_
Following is the code to execute `VBox Example`_ in pyTermTk_ (`tryItOnline <web-VBoxEx_>`_)
.. code:: python
@ -192,7 +199,7 @@ The above code produces the following output:
3 - Simple TTkHBoxLayout_
-------------------------
Following is the code to execute `HBox Example`_ in pyTermTk_
Following is the code to execute `HBox Example`_ in pyTermTk_ (`tryItOnline <web-HBoxEx_>`_)
.. code:: python
@ -239,7 +246,7 @@ The above code produces the following output
4 - Simple TTkGridLayout_
-------------------------
Following is the code to execute `HBox Example`_ in pyTermTk_
Following is the code to execute `Grid Example`_ in pyTermTk_ (`tryItOnline <web-GridEx_>`_)
.. code:: python
@ -284,7 +291,7 @@ The above code produces the following output
5 - Nested Layouts
------------------
Following is the code to execute `Nested Layouts Example`_ in pyTermTk_
Following is the code to execute `Nested Layouts Example`_ in pyTermTk_ (`tryItOnline <web-NestedEx_>`_)
.. code:: python
@ -339,7 +346,7 @@ The above code produces the following output
6 - Rowspan/Colspan in Grid Layout
----------------------------------
Following is the code to execute `row/colspan Example`_ in pyTermTk_
Following is the code to execute `row/colspan Example`_ in pyTermTk_ (`tryItOnline <web-SpanEx_>`_)
.. code:: python

2
tutorial/003-signalslots.rst

@ -53,6 +53,7 @@ Example 1 - basic signal slots
------------------------------
From `example1.basic.signalslots.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/signalslots/example1.basic.signalslots.py>`_
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/signalslots/example1.basic.signalslots.py>`_):
.. code:: python
@ -107,6 +108,7 @@ Example 2 - Use widgets signals and slots
-----------------------------------------
From `example2.widgets.signalslots.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/signalslots/example2.widgets.signalslots.py>`_
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/signalslots/example2.widgets.signalslots.py>`_):
.. code:: python

4
tutorial/004-logging.rst

@ -20,6 +20,7 @@ Example 1 - Log to file
-----------------------
From `example1.logtofile.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/logging/example1.logtofile.py>`_
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/logging/example1.logtofile.py>`_):
.. code:: python
@ -40,6 +41,7 @@ Example 2 - Log to stdout
-------------------------
From `example2.logtostdout.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/logging/example2.logtostdout.py>`_
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/logging/example2.logtostdout.py>`_):
.. code:: python
@ -59,6 +61,7 @@ Example 3 - custom logging
--------------------------
From `example3.customlogging.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/logging/example3.customlogging.py>`_
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/logging/example3.customlogging.py>`_):
.. code:: python
@ -89,6 +92,7 @@ Example 4 - Use TTkLogViewer_ widget
--------------------------------------------------
From `example4.ttklogviewer.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/logging/example4.ttklogviewer.py>`_
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/logging/example4.ttklogviewer.py>`_):
.. code:: python

5
tutorial/005-calculator.rst

@ -53,6 +53,7 @@ Initialize the window
---------------------
From `calculator.001.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/calculator/calculator.001.py>`_
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/calculator/calculator.001.py>`_):
.. code:: bash
@ -82,6 +83,7 @@ Add all the widgets of calculator to it
---------------------------------------
From `calculator.002.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/calculator/calculator.002.py>`_
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/calculator/calculator.002.py>`_):
Based on the positions and sizes defined in the `design layout <#design>`_, I place all the widgets on the TTkGridLayout_ (**winLayout**)
@ -163,6 +165,7 @@ Numeric Button Events
---------------------------------------
From `calculator.003.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/calculator/calculator.003.py>`_
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/calculator/calculator.003.py>`_):
.. code:: bash
@ -209,6 +212,7 @@ Operation and results events
----------------------------
From `calculator.004.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/calculator/calculator.004.py>`_
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/calculator/calculator.004.py>`_):
.. code:: bash
@ -252,6 +256,7 @@ Beware the Mystery Button
-----------------------------------------
From `calculator.005.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/calculator/calculator.005.py>`_
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/calculator/calculator.005.py>`_):
.. code:: bash

6
tutorial/ttkDesigner/textEdit/README.rst

@ -166,7 +166,7 @@ Preview and Quick Export
controls="controls" muted="muted" class="d-block rounded-bottom-2 border-top width-fit" ></video>
Exported: `texteditor.01.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/ttkDesigner/textEdit/texteditor.01.py>`_
(`Try Online <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?fileUri=https://raw.githubusercontent.com/ceccopierangiolieugenio/pyTermTk/main/tutorial/ttkDesigner/textEdit/texteditor.01.py>`__)
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/ttkDesigner/textEdit/texteditor.01.py>`_):
.. code:: bash
@ -187,7 +187,7 @@ Option 1) Include the Open/Save routine and link them to the widget
Once (quick)exported the code, we need to define the appropriate routines and link them to the file(open/save) pickers `signals <https://ceccopierangiolieugenio.github.io/pyTermTk/autogen.TermTk/TermTk.TTkWidgets.TTkPickers.filepicker.html#TermTk.TTkWidgets.TTkPickers.filepicker.TTkFileButtonPicker.filePicked>`__
`texteditor.02.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/ttkDesigner/textEdit/texteditor.02.py>`_
(`Try Online <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?fileUri=https://raw.githubusercontent.com/ceccopierangiolieugenio/pyTermTk/main/tutorial/ttkDesigner/textEdit/texteditor.02.py>`__)
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/ttkDesigner/textEdit/texteditor.02.py>`_):
.. code:: bash
@ -228,7 +228,7 @@ Option 2) Extend a custom widget including the open/save methods
----------------------------------------------------------------
`texteditor.03.py <https://github.com/ceccopierangiolieugenio/pyTermTk/blob/main/tutorial/ttkDesigner/textEdit/texteditor.03.py>`_
(`Try Online <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?fileUri=https://raw.githubusercontent.com/ceccopierangiolieugenio/pyTermTk/main/tutorial/ttkDesigner/textEdit/texteditor.03.py>`__)
(`tryItOnline <https://ceccopierangiolieugenio.github.io/pyTermTk/sandbox/sandbox.html?filePath=tutorial/ttkDesigner/textEdit/texteditor.03.py>`_):
.. code:: bash

Loading…
Cancel
Save