AB1908 / GOG-Galaxy-Export-Script

Export your list of games from GOG Galaxy
MIT License
150 stars 27 forks source link

Output missing default delimiter #56

Open Dave247 opened 2 years ago

Dave247 commented 2 years ago

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

AB1908 commented 2 years ago

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.

Varstahl commented 2 years ago

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.