Comments (7)
@lamyergeier you can try https://github.com/astanin/python-tabulate -- it's pretty good at handling different types of markdown formats.
from csv2md.
Hello, thank you for the issue.
Columns are not aligned. Both, center and right alignment are not working.
What do you mean by that? As I can see, output contains right align colons in the header row. Can you please add expected output for this case?
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
.
You're right, it looks a bit inconsistent. But in my opinion, it's better to support multiple values for -C
as it's done for -r
and -c
. Feel free to create PR with improvement.
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!
I'm not sure if this is more expected behavior than the current ones. Can you please add some arguments for the proposed logic? Anyway, comments should be added to the flags.
from csv2md.
What do you mean by that? As I can see, output contains right align colons in the header row. Can you please add expected output for this case?
| 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 |
from csv2md.
Sorry, but this it not the right output:
- column
a
should be centered due to-c 0
; - values in
b
andd
should not be aligned with spaces. Column alignment managed within the header row.
from csv2md.
@lzakharov Your point 1 is correct. I made a mistake in the desired output. It should be as follows
| 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 |
as you can see that column with headers a, b, d are all aligned with spaces (which you clarified in second point of yours, that this is not desirable).
from csv2md.
There is no need to align columns with spaces - alignment must be done when rendering the markdown.
from csv2md.
If you want to have tables in such format, you can try to configure additional markdown formatter. But I'm still not sure that anyone uses and supports such a format.
from csv2md.
Related Issues (10)
- No LICENSE file in pip package. Error on install HOT 1
- 1.0.1 removed from pypi? HOT 2
- set encoding to UTF-8 (for special characters) HOT 12
- Setting delimiter to semicolon does not always work HOT 2
- How to use it inside python? HOT 2
- support csv with no header? HOT 2
- Specify Tab delimiter HOT 5
- Ability to filter columns HOT 1
- Modern setup HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csv2md.