Skip to content
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

tab delimited csv as input #7974

Closed
dbojan opened this issue Mar 20, 2022 · 6 comments
Closed

tab delimited csv as input #7974

dbojan opened this issue Mar 20, 2022 · 6 comments

Comments

@dbojan
Copy link

dbojan commented Mar 20, 2022

Hello.
Pandoc can convert coma separated file (csv) to docx, or to markdown, but not tab separated one.
Any chance of adding option to specify delimiter like tab, or pipe, with csv as input file?

Or if possible, other specified character, like ";" ?

Thanks.

@alerque
Copy link
Contributor

alerque commented Mar 20, 2022

Tab separated files are known as TSV.

CSV itself has pretty fixed rules, but it is quite common to see ad-hoc variations in the wild. Some are just apps making up their own stuff, some are mistakes. Either way I highly recommend normalizing all incoming CSV (or TSV) content using robust tooling like the tools from csvkit as a first step, then passing the normalized spec compliant data for further processing whether with Pandoc or other tools.

@dbojan
Copy link
Author

dbojan commented Apr 24, 2022

So there is no way to open TSV with pandoc?

@tarleb
Copy link
Collaborator

tarleb commented Apr 24, 2022

Currently not, no. I'm not sure there should be. On one hand, tsv is an exceptionally simple format, has it's own MIME type text/tab-separated-values, and would not be difficult to support. OTOH, even simple code can be bloat. Also, tsv is not clearly defined (unlike CSV, which has RFC 4180), which can lead to confusion and unexpected behavior. There are plenty of converters, no need to add another.

I lean towards not supporting it, but the ultimate decision will be that made by @jgm.

@jgm
Copy link
Owner

jgm commented Apr 24, 2022

It's pretty easy to do, so I think I'll make a tsv reader available, using the spec linked to.

@jgm jgm closed this as completed in 16f0316 Apr 24, 2022
@dbojan
Copy link
Author

dbojan commented May 8, 2022

Hi.
Is this implemented in the latest release?
Thanks.

@jgm
Copy link
Owner

jgm commented May 9, 2022

No -- you can always find information on releases here; https://pandoc.org/releases.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants