Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gavinlyonsrepo/opml_convert_rss

Command line python utility, Converts the opml(Xml) or JSON file of a youtube user subscriptions provided by youtube, into a text file which can added to RSS reader setup file, like newsboat for example. Thus converting your youtube subscriptions, into a group of tagged RSS feeds.
https://github.com/gavinlyonsrepo/opml_convert_rss

cli command-line-tool convert converter feeds-reader json newsboat opml python python-utility rss rss-reader rss-reader-setup subscription-manager subscriptions user-subscriptions utility xml youtube youtube-subscriptions

Last synced: 1 day ago
JSON representation

Command line python utility, Converts the opml(Xml) or JSON file of a youtube user subscriptions provided by youtube, into a text file which can added to RSS reader setup file, like newsboat for example. Thus converting your youtube subscriptions, into a group of tagged RSS feeds.

Awesome Lists containing this project

README

        

Overview
--------------------------------------------
* Name: opml_convert_RSS
* Description: Command line python utility , converts opml(xml) to RSS.
* Author: Gavin Lyons.
* Software: python 3.6.8
* Copyright: 2019 (C) GPL

Description
---------

Command line python utility,
Converts the opml(Xml) file or JSON file of a youtube user subscriptions provided by youtube,
into a text file which can added to RSS reader setup file
file, like newsboat for example. Thus converting your youtube subscriptions,
into a group of tagged RSS feeds.
Example input JSON and xml and output txt files are available in Documents folder
The user can select input file path, output file path and custom tag.

**Input:**

1. opml(xml) file provided by user on command prompt using -i option.
2. JSON file provided by user on command prompt using -i option.

**Output:**

The output.txt is file is provided by user using -o option
If no file is provided the program uses a default file called output.txt at path of
program. The output file is in file in following format:

[url] ~"[video_title]" [tag]

https://www.youtube.com/feeds/videos.xml?channel_id=UCI999ua "~Python Training by Bader" youtube

Where tag default = youtube, A custom tag can be added using -t option.

Usage
--------

1. Download the python program, opml_convert_rss.py.

2. Get the data XML or JSON , two different methods

XML: (NOTE: Youtube removed this service in Late 2020, not known if coming back)

* In a web browser navigate to subscription manager page of youtube.
https://www.youtube.com/subscription_manager
* At bottom of page click on "Export to RSS readers -- Export subscriptions".
* This subscription_manager file will be downloaded into an opml(xml) file.

JSON:

* There is a service in google called takeout at https://takeout.google.com/
It lets you download your data.
* Select the youtube account
* Select only youtube data
* Select only youtube subs.
* Download the data into a JSON file

3. Run program in terminal.

* $ python3 opml_convert_rss.py -i infile -o outfile -t tech
* -i infile is the full path and/or filename of input XML or JSON file.
* -o outfile is the full path and/or filename of output txt file.
* -t tech is a custom tag.
* -t and -o options can be omitted and defaults used if user wants.

4. Example input in terminal $python3 opml_convert_rss.py -i ~/Downloads/te -o test -t testtag

output:

![SS](https://raw.githubusercontent.com/gavinlyonsrepo/opml_convert_RSS/master/screenshots/opml.png)

5. Copy the output file into RSS reader setup files(eg newsboat)


**Arguments**

usage: opml_convert_rss.py [-h] [-v] [-i INFILE] [-o OUTFILE] [-t TAGNAME]

URL help at: https://github.com/gavinlyonsrepo/opml_convert_RSS

optional arguments:

* -h, --help show this help message and exit
* -v Print version and quit
* -i INFILE input filename and/or full path
* -o OUTFILE output filename and/or full path, default ./outfile.txt
* -t TAGNAME tagname, default = youtube

NOTE: Works in windows powershell but without Colour text