https://github.com/thombashi/pytablewriter-altcol-theme
pytablewriter-altcol-theme is a pytablewriter plugin to provide a terminal theme.
https://github.com/thombashi/pytablewriter-altcol-theme
Last synced: 4 months ago
JSON representation
pytablewriter-altcol-theme is a pytablewriter plugin to provide a terminal theme.
- Host: GitHub
- URL: https://github.com/thombashi/pytablewriter-altcol-theme
- Owner: thombashi
- License: mit
- Created: 2023-10-02T13:35:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-08T11:48:10.000Z (over 1 year ago)
- Last Synced: 2024-05-17T00:01:48.974Z (about 1 year ago)
- Language: Python
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
.. contents:: **pytablewriter-altcol-theme**
:backlinks: top
:depth: 2Summary
============================================.. image:: https://github.com/thombashi/pytablewriter-altcol-theme/actions/workflows/ci.yml/badge.svg
:target: https://github.com/thombashi/pytablewriter-altcol-theme/actions/workflows/ci.yml
:alt: CI status of Linux/macOS/Windows.. image:: https://coveralls.io/repos/github/thombashi/pytablewriter-altcol-theme/badge.svg?branch=master
:target: https://coveralls.io/github/thombashi/pytablewriter-altcol-theme?branch=master
:alt: Test coverage: coveralls.. image:: https://github.com/thombashi/pytablewriter-altcol-theme/actions/workflows/github-code-scanning/codeql/badge.svg
:target: https://github.com/thombashi/pytablewriter-altcol-theme/actions/workflows/github-code-scanning/codeql
:alt: CodeQL``pytablewriter-altcol-theme`` is a `pytablewriter `__ plugin to provide a terminal theme.
Installation
============================================
::pip install pytablewriter-altcol-theme
Usage
============================================:Sample Code:
.. code-block:: pythonimport pytablewriter as ptw
writer = ptw.TableWriterFactory.create_from_format_name(
"markdown",
headers=["INT", "STR"],
value_matrix=[
[1, "hoge"],
[2, "foo"],
[3, "bar"],
],
margin=1,
theme="altcol",
)
writer.write_table()You can change the color of the theme by using the ``color`` parameter:
:Sample Code:
.. code-block:: pythonimport pytablewriter as ptw
writer = ptw.TableWriterFactory.create_from_format_name(
"markdown",
headers=["INT", "STR"],
value_matrix=[
[1, "hoge"],
[2, "foo"],
[3, "bar"],
],
margin=1,
)writer.set_theme("altcol", color="yellow")
writer.write_table()
Other Examples
--------------------------------------------
- Generate HTML example: `source file `__ and `the output `__Dependencies
============================================
- Python 3.7+
- `Python package dependencies (automatically installed) `__Related Projects
============================================
- `pytablewriter `__
- `pytablewriter-altrow-theme `__