Extension for doakey3/DashTable
Project description
dashtable-ext
Shitty Extension to doakey3/DashTable
Installation
$ pip install -U dashtable-ext
RST 2 ASCII:
+-----------+-----------+-----------------------+
| Heading 1 | Heading 2 | Heading 3 |
| +-----------+-----------+-----------+
| | Heading 4 | Heading 5 | Heading 6 |
+===========+-----------+-----------+-----------+
| A | B | C |
| +-----------+ |
| | D | |
| +-----------+-----------+-----------+
| | E | F | G |
+-----------+-----------+-----------+-----------+
| H | I | J |
+-----------------------+-----------+ |
| K | L | |
| +-----------+-----------+
| | M | N |
+-----------------------+-----------+-----------+
from dashtable.ext import rst2ascii, PresetStyle
import dashtable
with open("table.html", "r") as f:
html = f.read()
table = dashtable.html2rst(html)
print(rst2ascii(table = table, preset=PresetStyle.thin_thick_rounded))
Output:
╭───────────┬───────────┬───────────────────────╮
│ Heading 1 │ Heading 2 │ Heading 3 │
│ ├───────────┼───────────┬───────────┤
│ │ Heading 4 │ Heading 5 │ Heading 6 │
├━━━━━━━━━━━┼───────────┼───────────┴───────────┤
│ A │ B │ C │
│ ├───────────┤ │
│ │ D │ │
│ ├───────────┼───────────┬───────────┤
│ │ E │ F │ G │
├───────────┴───────────┼───────────┼───────────┤
│ H │ I │ J │
├───────────────────────┼───────────┤ │
│ K │ L │ │
│ ├───────────┼───────────┤
│ │ M │ N │
╰───────────────────────┴───────────┴───────────╯
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dashtable-ext-1.0.0.tar.gz
(5.1 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
File details
Details for the file dashtable-ext-1.0.0.tar.gz.
File metadata
- Download URL: dashtable-ext-1.0.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8f70854cacc33377b498bbc4dcca1244edee289f4d923a45b5ad3c2ceceafd2
|
|
| MD5 |
a54b96eaa315f66c958709aa8928a122
|
|
| BLAKE2b-256 |
b6b813dedb372e651d7f660013e9c6122cc59536754df4d15ba822899827c42f
|
File details
Details for the file dashtable_ext-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dashtable_ext-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49cb567ec3ef3fcb5911d89504adfe587d27647df486ff180c27a72ca8b46a29
|
|
| MD5 |
5e25c6bb63df76c9b7da349657416d07
|
|
| BLAKE2b-256 |
2fd5ccf1859b6cbb36c791e0f5ad563429cefbab77ec12e7bea8f374032d738a
|