1
0
Fork 0
Mastodon to [anything] reposter. Anything being {Telegram, Discord} for now.
Go to file
Casey 2006d489c3
I think formatting works properly now?
When boosting something, status contents are not stored in status
itself, but rather in the `status.reblog`. Since it'd be really awkward
to check for boosts too, I just decided to add separate `@property` that
returns either reblog or status itself, depending on the value of
`status.reblog`. That required a bit of tweaking. Also now we're using
ExtendedInterpolation, so you can do the `${tokens.telegram}` and add
separate section for your secrets.
TODO: add support for environment variables (maybe)

For those who's wondering how manual check for boost would look in the
template, here ya go :)

{% if status.reblog %}Boost from <a \
href="{{status.reblog.account.url}}">{{status.reblog.account.name}}</a>
{% if status.reblog.spoiler_text %}{{status.reblog.spoiler_text}}
<tg-spoiler>{% endif %}{{status.reblog.content_flathtml}}\
{% if status.reblog.spoiler_text %}</tg-spoiler>{% endif %}
{% else %}
{% if status.spoiler_text %}{{status.spoiler_text}}
<tg-spoiler>{% endif %}{{status.content_flathtml}}\
{% if status.spoiler_text %}</tg-spoiler>{% endif %}
{% endif %}

<a href="{{status.link}}">Link to post</a>

You asked for this :)
2022-08-31 18:12:38 +03:00
mastoposter I think formatting works properly now? 2022-08-31 18:12:38 +03:00
.gitignore Pleroma: fallback value in account.discoverable 2022-08-30 13:25:05 +03:00
README Added basic readme [TODO: finish it] 2022-08-24 08:37:37 +03:00
TODO Added polls and reconnect. Closes #1 & #7, I hope- 2022-08-26 18:37:36 +03:00
config.ini I think formatting works properly now? 2022-08-31 18:12:38 +03:00
requirements.txt Custom formatting? 2022-08-31 16:19:39 +03:00

README

mastoreposter - easy-to-use mastodon-to-[everything] reposter!

# TODO: readme

Configuration: check `config.ini`
Run:
    python3 -m virtualenv venv
    source venv/bin/activate
    pip install -r ./requirements.txt
    python3 -m mastoreposter config.ini