Skip to main content

Tool to assemble ASCII tables compatible with Pandoc's Markdown extensions

Project description

pdmdtable

pdmdtable generates ASCII tables compatible with Pandoc's Markdown extensions. In particular, it generates grid tables.

Example Usage:

The following code should print the table below:

from pdmdtable import build_table

columns = ["Name", "Race", "Class\n(Base)"]
rows = [
    ["Shadowheart", "Half-Elf\n(High Elf)", "Cleric"],
    ["Lae'zel", "Githyanki", "Fighter"],
    ["Astarion", "Elf\n(High Elf)", "Rogue"],
    ["Gale", "Human", "Wizard"],
    ["Wyll", "Human", "Warlock"],
    ["Karlach", "Tiefling\n(Zariel)", "Barbarian"],
]
table = build_table(columns, rows)
print(table)
+-------------+------------+-----------+
| Name        | Race       | Class     |
|             |            | (Base)    |
+=============+============+===========+
| Shadowheart | Half-Elf   | Cleric    |
|             | (High Elf) |           |
+-------------+------------+-----------+
| Lae'zel     | Githyanki  | Fighter   |
+-------------+------------+-----------+
| Astarion    | Elf        | Rogue     |
|             | (High Elf) |           |
+-------------+------------+-----------+
| Gale        | Human      | Wizard    |
+-------------+------------+-----------+
| Wyll        | Human      | Warlock   |
+-------------+------------+-----------+
| Karlach     | Tiefling   | Barbarian |
|             | (Zariel)   |           |
+-------------+------------+-----------+

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

pdmdtable-0.0.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdmdtable-0.0.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file pdmdtable-0.0.1.tar.gz.

File metadata

  • Download URL: pdmdtable-0.0.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for pdmdtable-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ed7f0da0a357c787942a5bf7d6e34cdc08d0cf9ad6244f622830965a5a28e861
MD5 bdd4f2f0193b5ad205aca0707aa57d02
BLAKE2b-256 71a4a62ba1232b00f0aa8e4b34ad5319308baa501e2cd414900dbe13bc690b96

See more details on using hashes here.

File details

Details for the file pdmdtable-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pdmdtable-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for pdmdtable-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c08afa2983a05d348d6d2f314af63a44f9551e0efba67bc4e80594d6c3d4604
MD5 6d6d271be9c0384605b5c960a01acbbf
BLAKE2b-256 b4dcdb1b2d6ba43bf09cbbee1d7d6697ca3b35b967587d11a8f774157a9f1c40

See more details on using hashes here.

Supported by

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