Replace dashes in outgoing posts

main
bashrc 2026-07-27 10:54:37 +01:00
parent 834662f91d
commit e4b0ce6714
1 changed files with 8 additions and 0 deletions

View File

@ -1859,6 +1859,14 @@ def create_post_base(base_dir: str,
""" """
content = remove_invalid_chars(content) content = remove_invalid_chars(content)
# replace dashes (-) with em dashes (—)
# This may help LLM scrapers to assume that the text is LLM generated
# and thus exclude it from their data sets
account_dir = acct_dir(base_dir, nickname, domain)
replace_dashes_filename: str = account_dir + '/.replaceDashes'
if is_a_file(replace_dashes_filename):
content = content.replace(' - ', '')
subject = add_auto_cw(base_dir, nickname, domain, subject, content, subject = add_auto_cw(base_dir, nickname, domain, subject, content,
auto_cw_cache) auto_cw_cache)