kunpeng9 / GTD2020-05-31

2020-05-31创建【将github的项目链接等放入滴答清单进行管理或者印象笔记等,实践证明都不可行,不好用,完全被搁置了】
The Unlicense
26 stars 5 forks source link

gavinlyonsrepo/opml_convert_RSS: Command line python utility, Converts the opml(Xml) 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. #67

Closed kunpeng9 closed 1 year ago

kunpeng9 commented 3 years ago

Overview 概览

Description 描述

Command line python utility, Converts the opml(Xml) 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 xml and output txt files are available in Documents folder The user can select input file path, output file path and custom tag.

命令行 python 实用程序,将 youtube 用户订阅的 opml (Xml) 文件转换为一个文本文件,该文件可以添加到 RSS 阅读器设置文件中,例如 newsboat。这样就把你的 youtube 订阅,转换成一组带标签的 RSS 订阅。示例输入 xml 和输出 txt 文件可在 Documents 文件夹中使用。用户可以选择输入文件路径、输出文件路径和自定义标记。

Input:

输入:

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

用户在命令提示符上使用 - i 选项提供的 opml (xml) 文件。

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:

Txt is file 是由用户使用 - o 选项提供的。如果没有提供文件,则程序在程序路径使用一个默认文件 output.txt。输出文件的格式如下:

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

[ url ] ~ ”[ video _ title ]”[ tag ]

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

Https://www.youtube.com/feeds/videos.xml?channel_id=uci999ua : ~ Python Training by Bader

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

其中标记 default = youtube,可以使用 - t 选项添加自定义标记。

Usage 用法

  1. Download the python program, opml_convert_rss.py.
  2. In a web browser navigate to subscription manager page of youtube. 在网页浏览器中导航到 youtube 的订阅管理器页面https://www.youtube.com/subscription_manager
  3. At bottom of page click on "Export to RSS readers -- Export subscriptions". 在页面底部点击 “导出到 RSS 阅读器 -- 导出订阅”
  4. This subscriptionmanager file will be downloaded into an opml(xml) file. 这个订阅 manager 文件将被下载到一个 opml (xml) 文件中
  5. Run program in terminal. 在终端运行程序
  1. Example input in terminal $python3 opml_convert_rss.py -i ~/Downloads/te -o test -t testtag

output:

输出:

  1. Copy the output file into RSS reader setup files(eg newsboat) 复制输出文件到 RSS 阅读器设置文件 (如新闻船)

Arguments

争论

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

用法: opml convert rss.py [-h ][-v ][-i INFILE ][-o OUTFILE ][-t TAGNAME ]

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

网址: https://github.com/gavinlyonsrepo/opml\_convert\_rss

optional arguments:

可选参数:

NOTE: Works in windows powershell but without Colour text

注意: 作品在 Windows PowerShell,但没有彩色文字 https://github.com/gavinlyonsrepo/opml_convert_RSS