Closed wm75 closed 1 month ago
@wm75 Thank you. This is a great idea. I have rewritten the BlueSky and Slack plugins with the same functionality.
Additionally, I made some changes to the comment format to separate the post files in each comment and making each social media platform title more user-friendly.
Now, the text is wrapped with a (k/n) format at the end of each separated post. Also, it seems that using asyncio.Runner()
requires Python 3.12, so I have updated the workflow files accordingly.
Also, it seems that using asyncio.Runner() requires Python 3.12, so I have updated the workflow files accordingly.
Oh, hadn't thought of that, thanks for catching it!
and thanks for all the other work, I'll take a look now.
... and feel free to approve and merge
This change redesigns the interface of plugins which are now expected to provide two methods:
format_content
which takes the parsed markdown content and returns a (formatted_content, preview, warnings) tuple, in which
create_post
which takes the formatted_content generated by format_content and submits it as a post to the respective platform; returns a success, link tuple, where success can be true or false, and link is a link to the generated post on the platform or None if no link is available
Matrix mentions are now formatted much more according to the matrix specs (including the mentioned user's display name if it can be found) and will now display correctly in at least two clients (element and nheko). Likewise, images are now uploaded in a format compatible with both of these clients.
This is still incomplete as I haven't rewritten the bluesky, linkedin and slack plugins (which I cannot test) yet, but I hope the code and description are clear enough that you can complete the work @arash77 ?