1
0
Fork 0
Commit Graph

26 Commits

Author SHA1 Message Date
Casey 8d91d619dd
Workaround for wrong redirects on some instances 2023-07-02 20:51:48 +03:00
Casey 686cfced29
Allowed "all" to be used as user selector 2023-07-02 20:45:19 +03:00
Casey 291a8b8643
More logs? 2023-05-13 21:50:11 +03:00
Casey 76b2241a82
Updated pyproject.toml, black+mypy 2023-05-10 09:19:22 +03:00
Anna “CyberTailor” 65d0cc5b4d
Added argument parser
Just for config file path. Defaults to environment variable
"MASTOPOSTER_CONFIG_FILE".
2023-05-10 07:33:28 +05:00
Anna “CyberTailor” 9ed31cc5c8
Added packaging (via Flit) 2023-05-08 19:23:20 +05:00
Casey d761cf5951
Added license (closes #29)
Reasnoing behind using GNU GPLv3:
 * Permits modification
 * Permits free distribution
 * Permits private modifications
 * Gives no warranty that this software works or works in an expected
   way
 * No liability for damage (if any is possible)
 * Commonly used in FOSS software
2023-05-08 13:18:44 +03:00
Casey 854bb859ec
Try, try again 2023-03-07 10:26:45 +03:00
Casey 1632cddcb4
Pythom lomgimng yummy cool... 2023-01-26 13:44:30 +03:00
Casey 94f477bc45
Added configurable logging level 2022-11-02 20:11:38 +03:00
Casey bfa0534f6d
uh, more logging? 2022-11-01 14:33:47 +03:00
Casey fd05f39f4a
Changed default level to ERROR, added TG API logs 2022-11-01 13:52:40 +03:00
Casey 95c9a523e0
More logging? 2022-11-01 13:37:47 +03:00
Casey 1ec78d5f53
Forgot to initialize logger 2022-11-01 13:04:31 +03:00
Casey d861b2fe45
Uhh I think I added logging and some other stuff
Yeah so basically now initialization of integrations and filters is
moved to from_section instead of __init__ because muh better imo
2022-11-01 12:55:23 +03:00
Casey 3e707ab004
Oh my fucking god that's so embarassing 2022-09-18 16:59:19 +03:00
Casey 03cfa75bc7
Merge branch 'master' into unsafe 2022-09-14 20:35:35 +03:00
Casey 84eb94447f
[WIP] Added automatic user_id retrieving and more
* Added safe-er way to unpack data from instances
   -> like, now we're passing only the fields that
      we really need, not just everything that was
      sent by out our instance. that fixes pleroma
      being weird and adding pleroma field to some
      of objects, which was causing KeyError to be
      raised. this should be fixed now but I'm not
      completely sure so that's why it's in unsafe
      branch of the project. oh wow also this comm
      message is looking funky. hahahahah. ok bai.
2022-09-14 20:29:23 +03:00
Casey b7b3d12652
Now "private" posts could be reposted.
If you don't want to, add a separate filter, idk.
2022-09-01 00:57:36 +03:00
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
Casey f048cf07a9
FILTERS!!! AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 2022-08-29 10:28:51 +03:00
Casey ae8a1ddf34
The Beginning Of Filters
Also Flake8 cleanup and other stuff
2022-08-27 14:27:42 +03:00
Casey 8088cca8f0
Added polls and reconnect. Closes #1 & #7, I hope- 2022-08-26 18:37:36 +03:00
Casey 239957bb81
Imports cleanup, also fixed #4 2022-08-26 14:32:55 +03:00
Casey 60f18c8d22
Added Discord integration
Check `config.ini` for more details.

Also now `private` posts are not forwarded. That may be changed with
filters (coming sometime soon).
2022-08-26 02:03:06 +03:00
Casey a8b413a632
Changed folder name +TODO 2022-08-24 08:28:18 +03:00
Renamed from mastoreposter/__main__.py (Browse further)