All Projects → mplewis → Csvtomd

mplewis / Csvtomd

Licence: mit
📝📊 Convert your CSV files into Markdown tables.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Csvtomd

Talkie
Simple slide presentation library. Responsive scaling & markdown ready.
Stars: ✭ 500 (-9.91%)
Mutual labels:  markdown
Mditor
📝 [ M ] arkdown + E [ ditor ] = Mditor
Stars: ✭ 523 (-5.77%)
Mutual labels:  markdown
Ml Note
📙慢慢整理所学的机器学习算法,并根据自己所理解的样子叙述出来。(注重数学推导)
Stars: ✭ 537 (-3.24%)
Mutual labels:  markdown
Django Pagedown
A django app that allows the easy addition of Stack Overflow's "PageDown" markdown editor to a django form field, whether in a custom app or the Django Admin
Stars: ✭ 500 (-9.91%)
Mutual labels:  markdown
Mdpdf
Markdown to PDF command line app with support for stylesheets
Stars: ✭ 512 (-7.75%)
Mutual labels:  markdown
Crossnote
📝 An interesting markdown note taking application
Stars: ✭ 533 (-3.96%)
Mutual labels:  markdown
Docx2md
Convert Microsoft Word Document to Markdown
Stars: ✭ 498 (-10.27%)
Mutual labels:  markdown
Markdown Playgrounds
A Markdown Editor that can execute Swift code
Stars: ✭ 553 (-0.36%)
Mutual labels:  markdown
Gatsby Starter Deck
🗣 Create presentations using Gatsby, React & Markdown.
Stars: ✭ 522 (-5.95%)
Mutual labels:  markdown
Notes Up
Markdown notes editor & manager
Stars: ✭ 535 (-3.6%)
Mutual labels:  markdown
Scriptedforms
Quickly create live-update GUIs for Python packages using Markdown and simple HTML elements.
Stars: ✭ 508 (-8.47%)
Mutual labels:  markdown
Mavoneditor
mavonEditor - A markdown editor based on Vue that supports a variety of personalized features
Stars: ✭ 5,203 (+837.48%)
Mutual labels:  markdown
Fusuma
✍️Fusuma makes slides with Markdown easily.
Stars: ✭ 5,033 (+806.85%)
Mutual labels:  markdown
Vim Markdown Composer
An asynchronous markdown preview plugin for Vim and Neovim.
Stars: ✭ 501 (-9.73%)
Mutual labels:  markdown
Pandoc
Universal markup converter
Stars: ✭ 24,250 (+4269.37%)
Mutual labels:  markdown
Markdown Viewer
Markdown Viewer / Browser Extension
Stars: ✭ 497 (-10.45%)
Mutual labels:  markdown
Vim Markdown Preview
A light Vim plugin for previewing markdown files in a browser - without leaving Vim.
Stars: ✭ 530 (-4.5%)
Mutual labels:  markdown
React Markdown Editor Lite
a light-weight Markdown editor based on React. 一款轻量的基于React的markdown编辑器
Stars: ✭ 553 (-0.36%)
Mutual labels:  markdown
Markdown Magic
💫 Automatically format markdown files, sync external docs/src code & make better docs
Stars: ✭ 551 (-0.72%)
Mutual labels:  markdown
Zettlr
A Markdown Editor for the 21st century.
Stars: ✭ 6,099 (+998.92%)
Mutual labels:  markdown

csvtomd: markdown tables made easy

» Now online: csvtomd.com »

The Python project is discontinued

Thanks for all your contributions! At this time I'm not continuing development on the Python version of this tool.

I'm moving work to the following JS projects:

I'm happy to point to your projects if you decide to take over development on the Python version or create a CLI for the JS version! Just let me know.


Excel —> Markdown

CircleCI

Convert your CSV files into Markdown tables.

Tables Generator is a fantastic web tool for converting tabular data into all sorts of table layouts. I like how it lets me import CSV files, but I need the ability to 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-padded Markdown tables. Now you can build your tables in Excel and convert them for use in GitHub Markdown files without having to construct them by hand.

Installation

This is a Python 3 script, so use pip3 to install:

pip3 install csvtomd

After this, run csvtomd --help from your terminal to verify it's installed properly.

Usage

csvtomd MY_SPREADSHEET.csv generates a Markdown table from MY_SPREADSHEET.csv.

csvtomd SHEET1.csv SHEET2.csv SHEET3.csv generates three Markdown tables from the input files and displays them alongside the input filename.

csvtomd or csvtomd - generates a Markdown table from standard input. You can type CSV data or pipe a file in.

Example Input

File: 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 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  |  Wildlings
Margaery    |  Tyrell     |  The Reach          |  House Tyrell
Danerys     |  Targaryen  |  Meereen            |  House Targaryen
Tyrion      |  Lannister  |  King's Landing     |  House Lannister

Command: csvtomd --padding 0 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

Requirements

Python 3.

Tested with Python 3.4.1 on Mac OS X 10.9.3.

Doesn't require any external packages, so it should be platform-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 Markdown
tables.

positional arguments:
  csv_file              One or more CSV files to be converted

optional arguments:
  -h, --help            show this help message and exit
  -n, --no-filenames    Don't display filenames when outputting multiple
                        Markdown tables.
  -p PADDING, --padding PADDING
                        The number of spaces to add between table cells and
                        column dividers. Default is 2 spaces.
  -d DELIMITER, --delimiter DELIMITER
                        CSV delimiter, expected values: ',', ';'. Default is ,

Contributions

Bug reports, fixes, or features? Feel free to open an issue or pull request any time.

Testing

I only accept pull requests for features with tests.

# 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.0
rootdir: /your/path/to/csvtomd, inifile:
collected 3 items

test/test_csvtomd.py ...

=========================== 3 passed in 0.04 seconds ===========================

Releasing

# Bump version number in setup.py and csvtomd.py
# Delete old builds
rm -rf dist
# Build source and binary wheel distribution
python setup_wrap.py sdist bdist_wheel
# Upload to PyPI
pip install twine
twine upload dist/*

Here's an actual guide to PyPI. And another really good one.

License

Copyright (c) 2017 Matthew Lewis. Licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].