Giter Site home page Giter Site logo

py-markdown-table's People

Contributors

dependabot[bot] avatar hvalev avatar nigelm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

py-markdown-table's Issues

Padding around column seperator

Currently there is no whitespace around the column separator which is as far as I know totally conforming to the standard but (in my personal opinion) a little bit hard to read in the raw view (and I have never seen it that way).

e.g.

test = [{"A": "row1_A", "B": "row1_B", "C": "row1_C"},
        {"A": "row2_A", "B": "row2_B", "C": "row2_C"},
        {"A": "row3_A", "B": "row3_B", "C": "row3_C"}]

tabletest = mdT.markdownTable(test).setParams(row_sep="markdown", 
                                              padding_weight="right", 
                                              quote=False).getMarkdown()
print(tabletest)

Output:

|A     |B     |C     |
|------|------|------|
|row1_A|row1_B|row1_C|
|row2_A|row2_B|row2_C|
|row3_A|row3_B|row3_C|

I would prefer:

| A      | B      | C      |
| ------ | ------ | ------ |
| row1_A | row1_B | row1_C |
| row2_A | row2_B | row2_C |
| row3_A | row3_B | row3_C |

Do you accept a PR for this (maybe also as an optional setting) or do you want it to keep it the way it is?

Option for title case headers or custom headers

It would be nice have the table headers be capitalized via an option without needing to change all the dict keys to capitals. Additionally, it might be nice to allow custom headers different than the dict keys. One use case for this would be a boolean column where you may want to trail the column name with a question mark, for example. Another use case would be if you want spaces in the header.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.