Convert your Google subscriptions CSV file into a valid JSON for Newpipe!
Thanks to nikcorg for sharing how to convert the CSV into a NewPipe valid JSON. This is an automation of his guide.
- First of all, the 3 column names of the CSV must be changed to service_id,url,name.
- Then, all "http" ocurrencies are changed to "https".
- After that, the parsed CSV is converted into a JSON, that is appended into a empty list in the NewPipe JSON header {"app_version":"x.xx.x","app_version_int":xxx,"subscriptions":[]} .
NOTE: No requirements needed, as they are already in the python standart lib
You will get something like:
{"app_version":"0.21.7","app_version_int":973,"subscriptions":[]}
Those are the headers needed to convert the CSV into a NewPipe readeable JSON, as the version declared in the JSON must coincide with the NewPipe version
$ python3 fixer.py -f/--file [filename.csv] -j/--jsonHeader [header.json]
$ python3 fixer.py -f/--file [filename.csv] -j/--jsonHeader [header.json] -e/--encode "cp437"