ickc / pantable

CSV Tables in Markdown: Pandoc Filter for CSV Tables
https://ickc.github.io/pantable/
BSD 3-Clause "New" or "Revised" License
86 stars 15 forks source link

pantable as a cli tool #10

Open ickc opened 7 years ago

ickc commented 7 years ago

Depending on #8 and #9:

the syntax probably would goes something like

# pandoc like args
## -s means pantable is used as a "standalone cli tool"
pantable -s -o table.csv table.md
## without -s, it acts as a pandoc filter:
pandoc -t json table.md | pantable -t csv # -t csv means convert native pandoc table into a CSV table in CodeBlock
# or simply when filter arg is not needed
pandoc -F pantable table.md

Edit: it also has a question of how to represent the metadata in some output formats, e.g. to CSV:

pantable -s -o table.csv table.md

Suppose table.md only has a table. The output .csv still needs to store the metadata in some way. Possible solutions: