mirror of
https://github.com/pelican-plugins/share-post.git
synced 2025-10-15 17:08:54 +02:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
db31937745
commit
739b4bfb82
1 changed files with 5 additions and 5 deletions
|
|
@ -57,15 +57,15 @@ def create_link_facebook(title, url, content):
|
||||||
|
|
||||||
@create_link
|
@create_link
|
||||||
def create_link_mastodon(title, url, content):
|
def create_link_mastodon(title, url, content):
|
||||||
if hasattr(content, 'tags'):
|
if hasattr(content, "tags"):
|
||||||
taglist = content.tags
|
taglist = content.tags
|
||||||
new_taglist = []
|
new_taglist = []
|
||||||
for i in taglist:
|
for i in taglist:
|
||||||
new_taglist.append('#' + str(i))
|
new_taglist.append("#" + str(i))
|
||||||
hashtags = ' '.join(str(x).replace(" ", "") for x in new_taglist)
|
hashtags = " ".join(str(x).replace(" ", "") for x in new_taglist)
|
||||||
else:
|
else:
|
||||||
hashtags = ''
|
hashtags = ""
|
||||||
|
|
||||||
return f"https://toot.kytta.dev/?text={title}{newline}{url}{newline}{hashtags}"
|
return f"https://toot.kytta.dev/?text={title}{newline}{url}{newline}{hashtags}"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue