QL-Win / QuickLook

Bring macOS “Quick Look” feature to Windows
http://pooi.moe/QuickLook/
GNU General Public License v3.0
17.36k stars 1.09k forks source link

TSV (Tab separated) file support #1183

Open samuel-pipelaunch opened 2 years ago

samuel-pipelaunch commented 2 years ago

Is your feature request related to a problem? Please describe. Since we need to deal with regional settings with .CSV (the separator is not a comma in some countries) using tab separator will solve the issue.

Describe the solution you'd like Just support .TSV files like .CSV ( it's a valid file extension: https://fileinfo.com/extension/tsv )

Describe alternatives you've considered Just renaming the file to CSV will work but then we will lose the file association in Excel, so it's important to add TSV to the file list

xupefei commented 2 years ago

Since renaming the file works, the actual support is just a one line change to add the TSV extension to TextViewer. Could you send a PR?

samuel-pipelaunch commented 2 years ago

Sorry couldn't find any reference to a MIME type or a CSV file extension reference inside the code ( https://github.com/QL-Win/QuickLook/search?q=extensions+csv&type= ), so I cannot change the code and create a pull request 😑

xupefei commented 2 years ago

It's not based on MIME but extension: https://github.com/QL-Win/QuickLook/blob/master/QuickLook.Plugin/QuickLook.Plugin.CsvViewer/Plugin.cs#L37

samuel-pipelaunch commented 2 years ago

Thanks @xupefei here's the pull request

https://github.com/QL-Win/QuickLook/pull/1185