Python3 tkinter text plugin - easily save and load multiple font styles
Project description
.. image:: http://i101.photobucket.com/albums/m58/timeyyy_da_man/coloring_pencils.jpg
:alt: coloring pencils!
:align: right
:scale: 40 %
tttt - tims tkinter text tags
=============================
Save and load tags for the tkinter text widget using open office format xml
Features
--------
* Super easy to use api, All the commands you will need are below!
* Automatically indent buttons on selection
* Bold, Italic, Underline, Overstrike, Fonts, Sizes
* Behavour of adding and removing tags is modeled on libre office
Installation
------------
pip3 install tttt
Usage
-----
There is a `demo picture <https://github.com/timeyyy/tttt/wiki/Demo-Code>`_ avaliable
.. code-block:: python
from tttt import XmlManager
tag_manager = XmlManager(text)
bind these to your callback buttons or hotkeys
.. code-block:: python
tag_manager.change_style('bold')
tag_manager.change_style('italic')
tag_manager.change_style('solid') # underline
tag_manager.change_style(('family',value))
tag_manager.change_style(('size',value))
tag_manager.change_style(('foreground', value))
tag_manager.change_style(('background', value))
Saving and loading
^^^^^^^^^^^^^^^^^^
.. code-block:: python
tag_manager.load(data)
xml_data = tag_manager.save()
Configuring Buttons For Indenting
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: python
tag_manager.button_references = {'bold':bold,
'italic':italic,
'underline':underline,
'family':family_font_menu.var,
'overstrike':overstrike,
'foreground':foreground,
'background':background,
'size':size_menu.var
}
Coming Next Release
===================
* copy/paste/saving formatted text
* python2 support
Change log
==========
0.1.3
=====
* bug fix - duplicating tags on save/load
0.1.2
=====
* overstrike added
* bold/italic buttons etc will no longer steal focus from the widget
0.1.1
=====
* many bugs removed
Authors and Contributors
========================
Timothy Eichler
:alt: coloring pencils!
:align: right
:scale: 40 %
tttt - tims tkinter text tags
=============================
Save and load tags for the tkinter text widget using open office format xml
Features
--------
* Super easy to use api, All the commands you will need are below!
* Automatically indent buttons on selection
* Bold, Italic, Underline, Overstrike, Fonts, Sizes
* Behavour of adding and removing tags is modeled on libre office
Installation
------------
pip3 install tttt
Usage
-----
There is a `demo picture <https://github.com/timeyyy/tttt/wiki/Demo-Code>`_ avaliable
.. code-block:: python
from tttt import XmlManager
tag_manager = XmlManager(text)
bind these to your callback buttons or hotkeys
.. code-block:: python
tag_manager.change_style('bold')
tag_manager.change_style('italic')
tag_manager.change_style('solid') # underline
tag_manager.change_style(('family',value))
tag_manager.change_style(('size',value))
tag_manager.change_style(('foreground', value))
tag_manager.change_style(('background', value))
Saving and loading
^^^^^^^^^^^^^^^^^^
.. code-block:: python
tag_manager.load(data)
xml_data = tag_manager.save()
Configuring Buttons For Indenting
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: python
tag_manager.button_references = {'bold':bold,
'italic':italic,
'underline':underline,
'family':family_font_menu.var,
'overstrike':overstrike,
'foreground':foreground,
'background':background,
'size':size_menu.var
}
Coming Next Release
===================
* copy/paste/saving formatted text
* python2 support
Change log
==========
0.1.3
=====
* bug fix - duplicating tags on save/load
0.1.2
=====
* overstrike added
* bold/italic buttons etc will no longer steal focus from the widget
0.1.1
=====
* many bugs removed
Authors and Contributors
========================
Timothy Eichler
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tttt-0.1.3.zip
(25.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
tttt-0.1.3-py2.py3-none-any.whl
(21.4 kB
view details)
File details
Details for the file tttt-0.1.3.zip.
File metadata
- Download URL: tttt-0.1.3.zip
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
770383ba7a4b1e997acac3ee8aab418230e90b8bfce0d881b094a3daf7e8bdbd
|
|
| MD5 |
42c6af1f18312e4a74812fa4b853ea72
|
|
| BLAKE2b-256 |
225df84437dacd5b63feef223890dc1c0f553226b06ea2cf4dfe043dd8eb53f1
|
File details
Details for the file tttt-0.1.3-py2.py3-none-any.whl.
File metadata
- Download URL: tttt-0.1.3-py2.py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9897c5ddf2679354ecbddaa35881377e9f7068a49bd324eb99f4cb40ea33fc2d
|
|
| MD5 |
52b32c446b44d8bb17fc8f3418b92e2a
|
|
| BLAKE2b-256 |
d329dec72eda381d63669c2f31ac44abbb6fc9d122afaba0f5cf142753077753
|