YoloSwagTeam / t2m

Twitter to Mastodon timeline forwarding tool
GNU General Public License v3.0
76 stars 15 forks source link

Added suport for automatically adding content warnings #14

Closed minego closed 6 years ago

minego commented 6 years ago

This change adds support for configuring rules in a JSON document for content warnings that should be applied when posting a toot to Mastodon.

The rules can either be a simple regex match against the text of a tweet, or can include a group to allow using part of the text of the tweet to be the text of the content warning.

The patterns are compared after applying the retweet.tmpl template which allows things like automatically adding a content warning that specifies the name of the twitter user being RTed.

The README.md has also been updated witn usage instructions and examples

Psycojoker commented 6 years ago

Hello,

Since another PR really changed the code a lot, I had to redo your commit (but kept you as the author of the commit of course).

Thanks for your contribution :heart: