forked from hkc/mastoposter
142 lines
5.0 KiB
INI
142 lines
5.0 KiB
INI
[main]
|
|
# This is a list of output modules. Each module should be defined in section,
|
|
# named "module/MODULENAME". Space-separated list of strings.
|
|
modules = telegram
|
|
|
|
# Mastodon instance to grab posts from
|
|
instance = mastodon.example.org
|
|
|
|
# Mastodon user token.
|
|
# Required permissions: read:accounts read:statuses read:lists
|
|
# You can get your token by creating application in
|
|
# ${instance}/settings/applications
|
|
token = blahblah
|
|
|
|
# Your user ID.
|
|
# Doesn't necessarily yours, it can be any user's ID, but that user should be
|
|
# on the list for crossposter to find it.
|
|
# Setting it to "auto" will just grab yours instead. Don't worry about it
|
|
# EXCEPT if you're using Pleroma. Check #11 issue for more details:
|
|
# https://github.com/hatkidchan/mastoposter/issues/11
|
|
user = auto
|
|
|
|
# Mastodon user list ID. AGAIN, UNFORTUNATELY, there is no way to reliably use
|
|
# streaming API to get all of your posts. Using home timeline is unreliable and
|
|
# does not always include boosts, same with public:local
|
|
# So, create a list, add yourself here, and put its ID here (it should be in
|
|
# address bar while you have that list open)
|
|
list = 1
|
|
|
|
# Should we automatically reconnect to the streaming socket?
|
|
# That option exists because it's not really a big deal when crossposter runs
|
|
# as a service and restarts automatically by the service manager.
|
|
auto-reconnect = yes
|
|
reconnect-delay = 1.0
|
|
|
|
# Number of retries in case request fails. Applies globally
|
|
# Can be changed on per-module basis
|
|
http-retries = 5
|
|
|
|
# Example Telegram integration. You can use it as a template
|
|
[module/telegram]
|
|
type = telegram
|
|
|
|
# Telegram Bot API token. There's plenty of guides how to obtain one.
|
|
# https://core.telegram.org/bots#3-how-do-i-create-a-bot
|
|
token = 12345:blahblah
|
|
|
|
# Telegram channel/chat ID or name. Also can be just a regular user.
|
|
# You can use @showjsonbot to obtain your channel ID, or just use its
|
|
# username, if it is public
|
|
chat = @username
|
|
|
|
# Should we make posts silent?
|
|
# https://core.telegram.org/bots/api#sendmessage `disable_notification`
|
|
silent = true
|
|
|
|
# Jinja2 template string for the post. Works only in Telegram.
|
|
# This is the default template, not specifying that property at all will result
|
|
# in this string (probably)
|
|
# Pay attention to 4 spaces in the empty line, I think it's required
|
|
template = {% if status.reblog %}Boost from <a href="{{status.reblog.account.url}}">{{status.reblog.account.name}}</a>
|
|
{% endif %}{% if status.reblog_or_status.spoiler_text %}{{status.reblog_or_status.spoiler_text}}
|
|
<tg-spoiler>{% endif %}{{ status.reblog_or_status.content_flathtml }}{% if status.reblog_or_status.spoiler_text %}</tg-spoiler>{% endif %}
|
|
|
|
<a href="{{status.link}}">Link to post</a>
|
|
|
|
# Discord integration
|
|
[module/discord]
|
|
type = discord
|
|
|
|
# Webhook URL with the `?wait=true`
|
|
webhook = url
|
|
|
|
;# Boost filter. Only boosts will be matched by that one
|
|
;[filter/boost]
|
|
;type = boost
|
|
;# List of sources. If empty, boost from any account will be allowed
|
|
;list = @MaidsBot@*
|
|
|
|
;# Mention filter. If anyone from that list is mentioned in the post,
|
|
;# it will be triggered. Useful in negation mode to ignore some people
|
|
;[filter/mention]
|
|
;type = mention
|
|
;# Space-separated list of mentions.
|
|
;# @[name] means specific local user
|
|
;# @[name]@[instance] means specific remote user
|
|
;# @[name]@* means specific user on any remote instance
|
|
;# @*@[instance] means any remote user on specific instance
|
|
;# @*@* means any remote user
|
|
;# @* __should__ mean any local user, but we're using `glob` to test for it and
|
|
;# it just means "any user" for now. This will be changed to more consistent
|
|
;# behavior
|
|
;list = @name @name@instance @*@instance @name@* @*@*
|
|
|
|
;# Media filter. Only posts with some specific media content are triggered
|
|
;[filter/media]
|
|
;type = media
|
|
;# space-separated list of media types to be checked
|
|
;valid-media = image video gifv audio unknown
|
|
;# mode of the filter itself
|
|
;# "include" means "there should be at least one media of any type listed"
|
|
;# "exclude" means "there shouldn't be anything from that list"
|
|
;# "only" allows only media from the list to be sent
|
|
;mode = include
|
|
|
|
;# Text content filter
|
|
;[filter/content]
|
|
;type = content
|
|
;# Mode of the filter.
|
|
;# "regexp" requires "regexp" property and should contain... A RegExp
|
|
;# "tag" should contain space-separated list of tags
|
|
;mode = regexp
|
|
;# Regular expression pattern to be matched
|
|
;regexp = ^x-no-repost
|
|
;# List of tags
|
|
; tags = maids artspam
|
|
|
|
;# Spoiler text filter
|
|
;# Will be matched if spoiler matches some regexp
|
|
;# (use ^.+$ to check for any spoiler)
|
|
;[filter/spoiler]
|
|
;type = spoiler
|
|
;regexp = ^CW:
|
|
|
|
;# Visibility filter.
|
|
;# Only posts with specific visibility will be matched
|
|
;[filter/visibility]
|
|
;type = visibility
|
|
;# Space-separated list of visibilities
|
|
;# NOTE: `direct` visibility is always ignored even before filters are ran
|
|
;options = public
|
|
|
|
;# Combined filter
|
|
;# Basically a way to combine multiple filters using some operation
|
|
;[filter/combined]
|
|
;type = combined
|
|
;# List of filters inside of itself
|
|
;filters = spoiler boost
|
|
;# Operator to be used here
|
|
;# Options: "all", "any" or "single"
|
|
;operator = any
|