
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
mdtable is a Python built command line interface that lets you convert csv files into Markdown formatted tables easily. It also provides a Python API to use for your projects.
Run pip install mdtable
and check that the latest version is current installed by running mdtable —version
.
>>> mdtable [OPTIONS] INPUT_FILE
The options available are:
-a, --aligns TEXT Comma seperated list of 'l,r,c'
-p, --padding INTEGER Padding for raw Markdown Table formatting
-s, --save TEXT Path to save formatted markdown to
--delimiter TEXT Delimiter character in csv
--quotechar TEXT Quote character in csv
--escapechar TEXT Escape character in csv
--writemode TEXT Python write mode, e.g w+, w, a, a+
--version Show the version and exit.
--help Show this message and exit.
Example:
Suppose you have a file input.csv
like so:
Name,Department,Birthday Month
John Smith,Accounting,November
Erica Meyers,IT,March
Zain Patel,Engineering,June
Christopher Smith,Engineering,July
Kiseki Hirakawa,Human Resources,February
Running mdtable input.csv
results in:
| Name | Department | Birthday Month |
| ----------------- | --------------- | -------------- |
| John Smith | Accounting | November |
| Erica Meyers | IT | March |
| Zain Patel | Engineering | June |
| Christopher Smith | Engineering | July |
| Kiseki Hirakawa | Human Resources | February |
which looks like:
Name | Department | Birthday Month |
---|---|---|
John Smith | Accounting | November |
Erica Meyers | IT | March |
Zain Patel | Engineering | June |
Christopher Smith | Engineering | July |
Kiseki Hirakawa | Human Resources | February |
[soon] more documentation
Example:
from mdtable import MDTable
markdown = MDTable('in.csv')
markdown_string_table = markdown.get_table()
markdown.save_table('out.csv')
Ability to specify alignments, by providing a comma seperated string of alignments values (either 'l', 'r' or 'c') to mdtables —aligns [ALIGNS] INPUT_FILE
, say for example mdtables —aligns c,c,l input.csv
, there must be as many alignments characters as there are tables.
Ability to save output to a markdown file (and specify the writing mode) by providing the path to the file you wish to save to mdtables —save [SAVE_FILE] INPTUT_FILE
say for example mdtables —save output.md input.csv
Provide custom delimiter, quotation and escape characters for reading in your csv file. This is done by providing the character to —delimiter, —quotechar, —escapehcar
respectively.
Add a padding option to make table border padding customisable (in the raw output). This can now be done. Running mdtable input.csv -p 3
returns
| Name | Department | Birthday Month |
| ----------------- | --------------- | -------------- |
| John Smith | Accounting | November |
| Erica Meyers | IT | March |
| Zain Patel | Engineering | June |
| Christopher Smith | Engineering | July |
| Kiseki Hirakawa | Human Resources | February |
[ ]
delimeters``, quotechars
and escapechars
.FAQs
mdtable converts csv files to markdown formatted tables
We found that mdtable demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.