GithubHelp home page GithubHelp logo

trendingtechnology / newpipe-csv-fixer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jcgdev/newpipe-csv-fixer

0.0 2.0 0.0 696 KB

Convert your subscriptions csv file into a valid json for Newpipe!

Python 100.00%

newpipe-csv-fixer's Introduction

Newpipe-CSV-Fixer

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.

Table of contents

General info

What's the process of making a NewPipe valid JSON?

  • 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":[]} .

Setup

NOTE: No requirements needed, as they are already in the python standart lib

Export your (empty) NewPipe subscription list

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

Move your CSV subscription file and json header to the src dir and execute the script:

$ python3 fixer.py -f/--file [filename.csv] -j/--jsonHeader [header.json]

In case of getting UnicodeDecodeError, try encoding with cp437 or other:

$ python3 fixer.py -f/--file [filename.csv] -j/--jsonHeader [header.json] -e/--encode "cp437"

newpipe-csv-fixer's People

Contributors

jcgdev avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.