Skip to main content

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


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)

Uploaded Source

Built Distribution

dashtable_ext-1.0.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

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

Hashes for dashtable-ext-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d8f70854cacc33377b498bbc4dcca1244edee289f4d923a45b5ad3c2ceceafd2
MD5 a54b96eaa315f66c958709aa8928a122
BLAKE2b-256 b6b813dedb372e651d7f660013e9c6122cc59536754df4d15ba822899827c42f

See more details on using hashes here.

File details

Details for the file dashtable_ext-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dashtable_ext-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49cb567ec3ef3fcb5911d89504adfe587d27647df486ff180c27a72ca8b46a29
MD5 5e25c6bb63df76c9b7da349657416d07
BLAKE2b-256 2fd5ccf1859b6cbb36c791e0f5ad563429cefbab77ec12e7bea8f374032d738a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page