添加rss生成

This commit is contained in:
zeek 2020-04-20 21:15:48 +08:00
parent 3898f7c23e
commit ca8a7d6d2f
1 changed files with 28 additions and 0 deletions

28
gen_rss.py Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env python3
# coding=utf-8
# -*- coding: utf-8 -*-
import datetime
import PyRSS2Gen
import json
file_path = "./rss.xml"
code_url = "https://git.zeekling.cn/"
def gen_rss(items):
items_rss = []
rss = PyRSS2Gen.RSS2(
title="private code feed",
link=code_url,
description="private code feed",
lastBuildDate=datetime.datetime.now(),
items=items_rss
)
rss.write_xml(file_path, 'w')
if __name__ == "__main__":
# main
print('begin')