xls2md v0.1 demo, a python cli tool converting excel file to markdown file

in #utopian-io7 years ago (edited)

It‘s a new project

What is the project about?

When posting articles, I offen need a complex table which contain a lot of information. I have to type it in the markdown file. It's troublesome and cost me too much time.
So I create a python cli tool to simplify the process.

Install

pip install pipenv
git clone https://github.com/littlemucyoung/xls2md.git
cd xls2md
pipenv install

Usage

pipenv shell
$ python xls2md.py --head --from example/excel/data.xls --sindex 0 --to example/markdown/data.md

common usage:

xls2md.py [--head] --from <from_path> [--sindex <sheet_index>|--sname <sheet_name>] --to <to_path>

Demo

excel file: example/excel/data.xls
excel file

run

python xls2md.py --head --from example/excel/data.xls --sindex 0 --to example/markdown/data.md

data.md:

国家GDP总量(亿美元)人均GDP(美元)
美国186979.2257765.512
中国122539.758865.999
日本41706.4333010.024
德国34725.0742388.679
英国30548.446719.862
法国24788.4838575.438
印度23847.261820.8
意大利18675.7230540.566
巴西16728.688117.645
加拿大15928.4844095.85

Technology Stack

Language: Python
Requirements: xlrd, xlwt, docopt
Development Environment: Pipenv

Roadmap

  • v0.1: a demo which only satisfies the basic needs
  • v0.2: support more options
  • v0.3-0.6: support csv,json,xml,html
  • v1.0: build excutable file or be wrapped as a pypi package

Contributing

Github: https://github.com/littlemucyoung/xls2md

Fork it!
Create your feature branch: git checkout -b my-new-feature
Commit your changes: git commit -am 'Add some feature'
Push to the branch: git push origin my-new-feature
Submit a pull request



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Your contribution cannot be approved because it does not follow the Utopian Rules.

Simple and common code snippets that can be easily found or reproduced can't be submitted in the development category.

You may consider to re-submit if you have added more features:

  1. GUI
  2. Consider formatting..

Also, there are already more advanced tools like exceltk or pytablewriter

You can contact us on Discord.
[utopian-moderator]

Hey @justyy, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

Coin Marketplace

STEEM 0.17
TRX 0.16
JST 0.029
BTC 76027.52
ETH 2923.44
USDT 1.00
SBD 2.62