add TODOs

This commit is contained in:
io 2021-08-17 05:55:47 +00:00
parent 5db218e362
commit 4e16eef4e1
2 changed files with 3 additions and 1 deletions

View File

@ -40,6 +40,7 @@ def make_sentence(cfg):
nlt = markovify.NewlineText if cfg['overlap_ratio_enabled'] else nlt_fixed
# TODO support replicating \n in output posts instead of squashing them together
model = nlt("\n".join(toot[0].replace('\n', ' ') for toot in toots))
db.close()

View File

@ -79,7 +79,8 @@ def extract_post_content(text):
for ht in soup.select("a.hashtag, a.mention"): # convert hashtags and mentions from links to text
ht.unwrap()
for link in soup.select("a"): # convert <a href='https://example.com>example.com</a> to just https://example.com
# TODO glitch-soc and pleroma let you use custom link text. think about how we should handle that.
for link in soup.select("a"): # convert <a href='https://example.com'>example.com</a> to just https://example.com
if 'href' in link:
# apparently not all a tags have a href,
# which is understandable if you're doing normal web stuff, but on a social media platform??