GOG-Galaxy-Export-Script icon indicating copy to clipboard operation
GOG-Galaxy-Export-Script copied to clipboard

Output missing default delimiter

Open Dave247 opened this issue 2 years ago • 2 comments

After I managed to get the script working (it's been forever since I used Python so it was a struggle just getting the thing to run on WIndows) I thought I was going crazy when the CSV file wasn't correctly sorting into individual fields, until I realised that when looking at the raw text, the default comma delimiter was missing. If I added the -d to manually specify then it would print the results out correctly.

If it helps I was using Python 3.10 from the Windows store and natsort 8.1.0

Dave247 avatar Mar 19 '22 05:03 Dave247

I see. Do you think you could throw this in a PR? I've switched over to using PlayNite and don't actively develop this anymore.

AB1908 avatar Mar 20 '22 19:03 AB1908

Despite the name, CSV are not always separated with commas, in a lot of CSVs a comma is not even the default (ie: in Italy the default "comma separator" is a semicolon ;). Given the nature of the exported strings, to avoid parsing issues instead of using a comma the default delimiter we used is a tabulation (\t).

It can be imported into your favourite spreadsheet loader by specifying what delimiter to expect. In Excel, for example, you would go to Data and select From Text:

CSV import

Setting up comma as a default is just a pain in the ass for the majority of scripts/automation.

One thing we could do, actually, is to make those parameters generic and being able to set it up in settings.json, but haven't had much time to spend on FLOSS projects myself of late.

Varstahl avatar Mar 20 '22 20:03 Varstahl