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

Auto detect CSV delimiter #892

Closed
zufuliu opened this issue Oct 25, 2024 · 3 comments
Closed

Auto detect CSV delimiter #892

zufuliu opened this issue Oct 25, 2024 · 3 comments
Milestone

Comments

@zufuliu
Copy link
Owner

zufuliu commented Oct 25, 2024

          是否有命令行可以指定分隔符?目前用 `/s csv` 参数只能以默认的 `,` 分隔,我想对某一类文件直接启用 `|` 分隔。

Notepad4_NF50ooj6oh

Originally posted by @Mapaler in #453 (comment)

@zufuliu zufuliu added this to the v24.11 milestone Oct 25, 2024
@Mapaler
Copy link

Mapaler commented Oct 25, 2024

建议增加一个自定义字符串参数,任何其他参数的附加功能都可以从这里面调用,比如
It is recommended to add a custom string parameter, from which additional functions of any other parameter can be called, for example
/s csv /option "{split:|,quote:\"}"
或者是给/s参数的内容增加一个分隔符,参数写在分隔符后面,比如
Or add a delimiter to the content of the /s parameter, and write the parameter after the delimiter, for example
/s "csv|{split:\|,quote:\"}"

zufuliu added a commit to zufuliu/notepad4-test that referenced this issue Oct 25, 2024
@zufuliu
Copy link
Owner Author

zufuliu commented Oct 25, 2024

建议增加一个自定义字符串参数

I'm planning to auto detect the delimiter with a naive method:
https://github.com/zufuliu/notepad4-test/blob/main/script/Issue892.py

The result is good after test CSV files from https://github.com/ws-garcia/CSVsniffer

@zufuliu
Copy link
Owner Author

zufuliu commented Oct 26, 2024

Implemented by 4243079, please test latest build from https://github.com/zufuliu/notepad4/actions

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

2 participants