go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
43.79k stars 5.37k forks source link

Support ASV and USV like CSV #29761

Open ptman opened 5 months ago

ptman commented 5 months ago

Feature Description

CSV is already supported. Similar support for ASV and USV would be great. https://github.com/sixarm/usv

Screenshots

No response

silverwind commented 5 months ago

There are numerous variants to CSV, like TSV (tabs), PSV (pipe). Maybe the separator characters should be configurable 😆.

lunny commented 5 months ago

There are numerous variants to CSV, like TSV (tabs), PSV (pipe). Maybe the separator characters should be configurable 😆.

I think maybe we can have a guess.

silverwind commented 5 months ago

Yeah, some of these formats have well-known file extensions, so it should be possible. Also it would help to know which formats GitHub or GitLab support.

KN4CK3R commented 5 months ago

I already have implemented this: https://github.com/go-gitea/gitea/blob/712e19fa6fbf2f1a5b0a471782d38a7d91e538ae/modules/csv/csv.go#L53

May have to re-check when we try to create a csv reader and what may be a delimiter.