Giter Club home page Giter Club logo

grid-table-py's Introduction

grid-table-py

grid_table_py input.md output.md

Arguments(Positional):

  1. Path to input Markdown file
  2. Path to file to place output Markdown

This is a library and command-line tool for converting Markdown files with pipe tables to Markdown files with grid tables. Both the pipe tables and the grid tables must be compatible with Pandoc's Markdown. (This notably supports tables formatted for github-flavored markdown.)

Released under MIT License. Author @FSharp4

grid-table-py's People

Contributors

fsharp4 avatar

Watchers

 avatar

grid-table-py's Issues

Tables with many columns that are too thin result in words breaking

Motivating example: Adapted from https://en.wikipedia.org/wiki/Chalcogen

Element Number Valence Electrons/shell Melting Point (°C) Boling Point (°C) Density at STP (g/cm3)
Oxygen 8 2, 6 -219 -183 0.00143
Sulfur 16 2, 8, 6 120 445 2.07
Selenium 34 2, 8, 18, 6 221 685 4.3
Tellurium 52 2, 8, 18, 18, 6 450 988 6.24
Polonium 84 2, 8, 18, 32, 18, 6 254 962 9.2
Livermorium 116 2, 8, 18, 32, 32, 18, 6 (predicted) 220 (predicted) 800 (predicted) 14 (predicted)

This results in

+------------+----------+----------------+-----------+-----------+-------------+
| Element    | Number   | Valence Electr | Melting   | Boling    | Density at  |
|            |          | ons/shell      | Point     | Point     | STP (g/cm<s |
|            |          |                | (°C)      | (°C)      | up>3</sup>  |
+============+==========+================+===========+===========+=============+
| Oxygen     | 8        | 2, 6           | -219      | -183      | 0.00143     |
+------------+----------+----------------+-----------+-----------+-------------+
| Sulfur     | 16       | 2, 8, 6        | 120       | 445       | 2.07        |
+------------+----------+----------------+-----------+-----------+-------------+
| Selenium   | 34       | 2, 8, 18, 6    | 221       | 685       | 4.3         |
+------------+----------+----------------+-----------+-----------+-------------+
| Tellurium  | 52       | 2, 8, 18, 18,  | 450       | 988       | 6.24        |
|            |          | 6              |           |           |             |
+------------+----------+----------------+-----------+-----------+-------------+
| Polonium   | 84       | 2, 8, 18, 32,  | 254       | 962       | 9.2         |
|            |          | 18, 6          |           |           |             |
+------------+----------+----------------+-----------+-----------+-------------+
| Livermoriu | 116      | 2, 8, 18, 32,  | 220 _(pre | 800 _(pre | 14 _(predic |
| m          |          | 32, 18, 6      | dicted)_  | dicted)_  | ted)_       |
|            |          | _(predicted)_  |           |           |             |
+------------+----------+----------------+-----------+-----------+-------------+

Pandoc hiccups on word breaks:

image

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.