Compare commits

..

No commits in common. "5044b2b0e9eab7e6d0e75ceff100fa825be19108" and "fb55d1bd49efc5721ee5df8b720c6f406da7e818" have entirely different histories.

3 changed files with 9 additions and 10 deletions

View File

@ -1,3 +1,4 @@
import os, argparse
from tomlkit import loads
from tomlkit import dump
@ -33,7 +34,7 @@ class MicroblogConfig:
def check(self, r, u): # (reference, user)
for key in r:
if key == "latestpages": continue
if key == "latestpages": continue;
# post and webring have subtables
# webring.profile
# webring.following

View File

@ -550,9 +550,6 @@ if __name__ == "__main__":
updated += writepage(tpl, tl, tc, cfg["page"],
paginate=True if new_posts is None else False)
if cfg["rss"]["enabled"]:
# ensure output directory for feeds exists
if not os.path.exists("feeds"):
os.mkdir("feeds")
feed_filename = "feeds/__index__.xml"
rss.write_feed(
p[:cfg["rss"]["limit"]], \

View File

@ -1,3 +1,4 @@
from microblog import My_Html_Parser
# from html.parser import HTMLParser
from html import escape
@ -6,7 +7,7 @@ try:
import feedgenerator
except ImportError:
traceback.print_exc()
def write_feed(posts, filename, params, tagname=None):
def write_feed(posts, filename, params):
pass
print("\trss disabled - missing dependency", file=sys.stderr)
print("\tYour microblog still may have been generated.", file=sys.stderr)
@ -21,7 +22,7 @@ def line2words(lines, limit):
l = len(word)
if limit > 0 and (l + char_count > limit):
break_outer_loop = True
break
break;
output.append(word)
char_count += l
if break_outer_loop:
@ -34,10 +35,10 @@ def line2words(lines, limit):
output.append("...")
return output
# this is similar to the markup function in microblog
# this is similar tot he markup function in microblog
def enrich_msg(lines, is_atom=True):
if not is_atom:
return lines
return string
content = []
parser = My_Html_Parser([])
for line in lines:
@ -65,9 +66,9 @@ def enrich_msg(lines, is_atom=True):
content.append(line)
return content
def write_feed(posts, filename, params, tagname=None):
def write_feed(posts, filename, params, tagname=str()):
feed = None
if tagname:
if tagname != str():
t = params["title_tagged"].format(
__tagname__ = tagname,
__title__ = params["title"])