添加rss生成
This commit is contained in:
parent
3898f7c23e
commit
ca8a7d6d2f
28
gen_rss.py
Normal file
28
gen_rss.py
Normal 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')
|
Loading…
Reference in New Issue
Block a user