Giter VIP home page Giter VIP logo

csv2md's Introduction

Hi, I'm Lev! 👋

I'm a Software Engineer.

GitHub stats

csv2md's People

Contributors

lzakharov avatar nickybpm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

csv2md's Issues

Ability to filter columns

It would be great if there was an easy way to provide a list of columns to be used when converting to markdown

So, for example, with a table with 10 columns, doing something like

--use-only=1-3,4,5,7

would not include columns 6, 8 9 and 10 into the generated table

[Bug] column alignment is not working and suggestion for better syntax

Sample Data

cat file.tsv
handwritten	200	2024-04-29	36
youtube	10000	2024-04-29	21
firefox	5000	2024-04-29	39
epub	1000	2024-04-29	49
android	10000	2024-04-29	179

Convert to Markdown

 cat file.tsv | csv2md -d $'\t'  -c 0 -r 1 3 -H
| a           | b     | c          | d   |
| :---------: | ----: | ---------- | --: |
| handwritten | 200   | 2024-04-29 | 36  |
| youtube     | 10000 | 2024-04-29 | 21  |
| firefox     | 5000  | 2024-04-29 | 39  |
| epub        | 1000  | 2024-04-29 | 49  |
| android     | 10000 | 2024-04-29 | 179 |

Issues

  1. Columns are not aligned. Both, center and right alignment are not working.
  2. Standardized input to option: -C option takes values like comma-separated list of column indices or ranges, may be similar syntax can be used for -r and -c.
  3. Also if -r and -c is used with -C then the colmnn number for -r and -c should not be the affected by -C but original column number. Currently this is not the case!

Modern setup

Would you be interested in a PR implementing a modern setup procedure based on poetry or hatch?

Setting delimiter to semicolon does not always work

Even when using the -d ";" parameter, sometimes I have to change the delimiter in the source file for it to work.

word;status
Ãœber;bad
Redefreiheit;good
Fußball;bad
östlich;bad
Fähre;bad
noUmlaut;good
Weizen;good
Korn;good

Specify Tab delimiter

I'm workign with some "TSV" (tab delimited) files. I haven't figured out how to specify tab as a delimiter, since it's not really possible to type a tab into my shell. Is there some way to do it?

No LICENSE file in pip package. Error on install

Get the following error when trying to install via pip:

$ pip3 install csv2md
Looking in indexes: https://pypi.org/simple
Collecting csv2md
  Using cached https://files.pythonhosted.org/packages/cc/1b/8855dc07a5c5821040eceb7934e1a772dff24dbf396b4cff4467b4e28904/csv2md-1.0.0.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-94m5gafj/csv2md/setup.py", line 7, in <module>
        with open('LICENSE') as f:
    FileNotFoundError: [Errno 2] No such file or directory: 'LICENSE'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-94m5gafj/csv2md/

1.0.1 removed from pypi?

Hello,

I just wanted to point out that it seems that v 1.0.1 has been removed from pypi - I see that 1.1.1 was released earlier today, but there appear to be no previous versions on pypy: https://pypi.org/project/csv2md/#history

Were earlier artifacts intentionally removed? Any chance you'd be able to republish that version?

support csv with no header?

csvkit supports a common cli flag across all of its tools to support inputting csv files with no header

-H, --no-header-row   Specify that the input CSV file has no header row.
                      Will create default headers (a,b,c,...).

it would be helpful if csv2md supported the same or a similar flag

this would allow quickly creating csv's using jq's @csv filter and piping it into csv2md

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.