4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

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

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.22 57765.512
中国 122539.75 8865.999
日本 41706.43 33010.024
德国 34725.07 42388.679
英国 30548.4 46719.862
法国 24788.48 38575.438
印度 23847.26 1820.8
意大利 18675.72 30540.566
巴西 16728.68 8117.645
加拿大 15928.48 44095.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

4 upvotes $0.00

Replies (2)

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: