-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request: new command csv2rst #137
Comments
Here it is. But it can't handle unicode (utf-f8) well, tested at http://rst.aaroniles.net/ Usage
Example
|
Wow - that was quick. Thank you. The "rich" RST table syntax does seem more flexible, and will cope with single rows etc. So I understand why you might prefer that. I was not aware of the RST table issue with unicode, it also happens on https://livesphinx.herokuapp.com/ which is another online test system for RST using Sphinx. Sometimes it works, e.g. emoji or a kanji:
I tried some Japanese hiragana, and like your example failed to get it to work regardless of the number of spaces (in case it was a length issue). I think this is probably a bug in the docutils library, perhaps the same thing this sphinx user was asking about: sphinx-doc/sphinx#6702 i.e. The unicode issue is out of your hands. |
The unicode issue is fixed thanks to the go-runewidth package.
|
Prerequisites
csvtk version
Describe your issue
Description
I would like to be able to turn CSV or TSV files etc into reStructuredText (RST) tables.
See https://docs.anaconda.com/restructuredtext/detailed/#tables or https://docutils.sourceforge.io/docs/user/rst/quickref.html#tables
Example
Consider a simple input table, I personally prefer tabs:
You already support markdown output:
Rendered here with GitHub,
My desired functionality is just the simplest RST table markup:
That is close to the existing pretty output:
I've not looked at the rest of csvtk to say if there is value in making an RST grid table, it is more verbose but allows more rich entries:
The text was updated successfully, but these errors were encountered: