mirror of
https://github.com/ioistired/pleroma-ebooks.git
synced 2024-11-20 02:14:52 +01:00
add TODOs
This commit is contained in:
parent
5db218e362
commit
4e16eef4e1
@ -40,6 +40,7 @@ def make_sentence(cfg):
|
|||||||
|
|
||||||
nlt = markovify.NewlineText if cfg['overlap_ratio_enabled'] else nlt_fixed
|
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))
|
model = nlt("\n".join(toot[0].replace('\n', ' ') for toot in toots))
|
||||||
|
|
||||||
db.close()
|
db.close()
|
||||||
|
3
third_party/utils.py
vendored
3
third_party/utils.py
vendored
@ -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
|
for ht in soup.select("a.hashtag, a.mention"): # convert hashtags and mentions from links to text
|
||||||
ht.unwrap()
|
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:
|
if 'href' in link:
|
||||||
# apparently not all a tags have a href,
|
# apparently not all a tags have a href,
|
||||||
# which is understandable if you're doing normal web stuff, but on a social media platform??
|
# which is understandable if you're doing normal web stuff, but on a social media platform??
|
||||||
|
Loading…
Reference in New Issue
Block a user