|
@@ -13,7 +13,7 @@ DIR = args.output
|
|
|
|
|
|
if not os.path.exists(DIR):
|
|
if not os.path.exists(DIR):
|
|
os.makedirs(DIR)
|
|
os.makedirs(DIR)
|
|
-os.makedirs(os.path.join(DIR, "articles"))
|
|
|
|
|
|
+os.makedirs(os.path.join(DIR, "articles"), exist_ok=True)
|
|
|
|
|
|
FILE = open(os.path.join(DIR, "index.html"), "w")
|
|
FILE = open(os.path.join(DIR, "index.html"), "w")
|
|
|
|
|
|
@@ -45,6 +45,11 @@ for item in channel.iterfind("item"):
|
|
print("<head>", file=file)
|
|
print("<head>", file=file)
|
|
print("<meta charset=\"UTF-8\">", file=file)
|
|
print("<meta charset=\"UTF-8\">", file=file)
|
|
print("<title>RSS Feed</title>", file=file)
|
|
print("<title>RSS Feed</title>", file=file)
|
|
|
|
+ print("<style>", file=FILE)
|
|
|
|
+ print("* { font-family: sans-serif; line-height: 1.6em;}", file=FILE)
|
|
|
|
+ print("a:link { color: black }", file=FILE)
|
|
|
|
+ print("a:visited { color: #888 }", file=FILE)
|
|
|
|
+ print("</style>", file=FILE)
|
|
print("</head>", file=file)
|
|
print("</head>", file=file)
|
|
print("<bady>", file=file)
|
|
print("<bady>", file=file)
|
|
print(contents, file=file)
|
|
print(contents, file=file)
|