Skip to content
forked from codazoda/tomark

A Python module that converts a list of dictionaries to a markdown formatted table.

License

Notifications You must be signed in to change notification settings

tadayosi/tomark

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tomark

A Python module that converts a list of dictionaries to a markdown formatted table.

Note: Each dict in the list must have the same number of elements.

Installing

!python3 -m pip install --upgrade tomark

Usage:

from tomark import Tomark

data = [
  {
    'pr': 291, 
    'status': 'closed', 
    'date': 'None', 
    'title': 'Adds new wiz bang feature'
  },
  {
    'pr': 290, 
    'status': 'v1.0', 
    'date': 'None', 
    'title': 'Updates UI to be more awesome'
  }
]

markdown = Tomark.table(data)
print(markdown)

Example table output:

PR Status Date Title
292 open None Adds new wiz bang feature
286 v1.0 None Updates UI to be more awesome

Example raw ouput:

| PR  | Status | Date | Title |
|----|----|----|----|
| 292 | open | None | Adds new wiz bang feature |
| 286 | v1.0 | None | Updates UI to be more awesome |

About

A Python module that converts a list of dictionaries to a markdown formatted table.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%