Package: csvtomd
csvtomd: markdown tables made easy==================================.. figure:: http://mplewis.com/files/csvtomd.png?:alt: Excel —> MarkdownExcel —> Markdown|CircleCI|Convert your CSV files into Markdown tables.`Tables Generator <http://www.tablesgenerator.com/markdown_tables>`__ isa fantastic web tool for converting tabular data into all sorts of tablelayouts. I like how it lets me import CSV files, but I need the abilityto convert many CSV files in batch for a docset on which I'm working.I built ``csvtomd`` to convert one or more CSV files into nicely-paddedMarkdown tables. Now you can build your tables in Excel and convert themfor use in GitHub, Bitbucket, or `Mou <http://mouapp.com/>`__ Markdownfiles without having to construct them by hand.Installation============This is a Python 3 script, so use ``pip3`` to install:::pip3 install csvtomdAfter this, run ``csvtomd --help`` from your terminal to verify it'sinstalled properly.Usage=====``csvtomd MY_SPREADSHEET.csv`` generates a Markdown table from``MY_SPREADSHEET.csv``.``csvtomd SHEET1.csv SHEET2.csv SHEET3.csv`` generates three Markdowntables from the input files and displays them alongside the inputfilename.``csvtomd`` or ``csvtomd -`` generates a Markdown table from standardinput. You can type CSV data or pipe a file in.Example Input-------------File: ``thrones.csv``::First Name,Last Name,Location,AllegianceMance,Rayder,North of the Wall,WildlingsMargaery,Tyrell,The Reach,House TyrellDanerys,Targaryen,Meereen,House TargaryenTyrion,Lannister,King's Landing,House LannisterExample Markdown Table----------------------Command: ``csvtomd thrones.csv``+--------------+-------------+---------------------+-------------------+| First Name   | Last Name   | Location            | Allegiance        |+==============+=============+=====================+===================+| Mance        | Rayder      | North of the Wall   | Wildlings         |+--------------+-------------+---------------------+-------------------+| Margaery     | Tyrell      | The Reach           | House Tyrell      |+--------------+-------------+---------------------+-------------------+| Danerys      | Targaryen   | Meereen             | House Targaryen   |+--------------+-------------+---------------------+-------------------+| Tyrion       | Lannister   | King's Landing      | House Lannister   |+--------------+-------------+---------------------+-------------------+Example Raw Output------------------Command: ``csvtomd thrones.csv``::First Name  |  Last Name  |  Location           |  Allegiance------------|-------------|---------------------|-----------------Mance       |  Rayder     |  North of the Wall  |  WildlingsMargaery    |  Tyrell     |  The Reach          |  House TyrellDanerys     |  Targaryen  |  Meereen            |  House TargaryenTyrion      |  Lannister  |  King's Landing     |  House LannisterCommand: ``csvtomd --padding 0 thrones.csv``::First Name|Last Name|Location         |Allegiance----------|---------|-----------------|---------------Mance     |Rayder   |North of the Wall|WildlingsMargaery  |Tyrell   |The Reach        |House TyrellDanerys   |Targaryen|Meereen          |House TargaryenTyrion    |Lannister|King's Landing   |House LannisterRequirements------------Python 3.Tested with Python 3.4.1 on Mac OS X 10.9.3.Doesn't require any external packages, so it should beplatform-agnostic.Help----Command: ``csvtomd --help``::usage: csvtomd.py [-h] [-n] [-p PADDING] [-d DELIMITER] csv_file [csv_file ...]Read one or more CSV files and output their contents in the form of Markdowntables.positional arguments:csv_file              One or more CSV files to be convertedoptional arguments:-h, --help            show this help message and exit-n, --no-filenames    Don't display filenames when outputting multipleMarkdown tables.-p PADDING, --padding PADDINGThe number of spaces to add between table cells andcolumn dividers. Default is 2 spaces.-d DELIMITER, --delimiter DELIMITERCSV delimiter, expected values: ',', ';'. Default is ,Contributions=============Bug reports, fixes, or features? Feel free to open an issue or pullrequest any time.Testing-------I only accept pull requests for features with tests... code:: sh# Run tests in the project root$ py.test============================= test session starts ==============================platform darwin -- Python 3.5.0, pytest-3.0.5, py-1.4.31, pluggy-0.4.0rootdir: /your/path/to/csvtomd, inifile:collected 3 itemstest/test_csvtomd.py ...=========================== 3 passed in 0.04 seconds ===========================Releasing---------.. code:: sh# Bump version number in setup.py and csvtomd.py# Delete old buildsrm -rf dist# Build source and binary wheel distributionpython setup_wrap.py sdist bdist_wheel# Upload to PyPIpip install twinetwine upload dist/*`Here's an actual guide toPyPI. <https://packaging.python.org/distributing/>`__ `And anotherreally goodone. <https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/>`__License=======Copyright (c) 2016 Matthew Lewis. Licensed under `the MITLicense <http://opensource.org/licenses/MIT>`__... |CircleCI| image:: https://circleci.com/gh/mplewis/csvtomd.svg?style=svg:target: https://circleci.com/gh/mplewis/csvtomd