Commit Graph

114 Commits

Author SHA1 Message Date
Casey 3753c6a342
Forgot about plaintext 2023-01-13 10:47:23 +03:00
Casey bbc5053cf6
We just need some space 2023-01-13 10:43:48 +03:00
Casey 3fc8a3bcd8
Added ordered list 2023-01-13 10:40:40 +03:00
Casey f3ddb4a1d9
Added unordered lists 2023-01-13 10:36:58 +03:00
Casey f8e1ea1661
Merge pull request #23 from hatkidchan/22-crash-when-using-user=auto-on-pleroma-account-with-no-posts
Changed type of `last_status_at` to be nullable
2022-11-12 00:01:51 +03:00
Casey a44df7030d
Changed type of `last_status_at` to be nullable 2022-11-12 00:00:14 +03:00
Casey 5b7a4dec1a
Merge pull request #19 from hatkidchan/logging
Added logging functionality
2022-11-02 20:30:19 +03:00
Casey 5bc4ae932e
Added docs for the forgotten filter 2022-11-02 20:23:01 +03:00
Casey 3904e475a4
MORE. LOGS. 2022-11-02 20:18:31 +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 e4cd94b7c3
Fixed .dockerignore
> COPY failed: file not found in build context or excluded by
> .dockerignore: stat requirements.txt: file does not exist
2022-10-11 09:17:47 +03:00
Casey dd60de5067
Added more HTML tags 2022-10-11 09:00:37 +03:00
Casey 6bff6fd73e
Merge branch 'vapronva-docker-fixes' into unsafe 2022-09-30 15:42:59 +03:00
Vladimir (vapronva) 43abba6f46
add: `dockerignore`; change: df layers handling 2022-09-30 05:44:17 +03:00
Casey 6b3c48e067
Added proper README 2022-09-23 19:28:08 +03:00
Casey 3644ebad82
[WIP] Added documentation 2022-09-23 18:44:45 +03:00
Casey cb4b32fa8b
Added property that removes emojis from the name 2022-09-23 18:31:16 +03:00
Casey cfe26cfd8f
DUROV I FUCKING HATE YOU 2022-09-23 18:21:31 +03:00
Casey 248f06be2a
I should sleep more 2022-09-22 19:16:52 +03:00
Casey 8950c10ce2
[WIP] Experimental Docker build (gone wrong) 2022-09-22 19:10:18 +03:00
Casey 3e707ab004
Oh my fucking god that's so embarassing 2022-09-18 16:59:19 +03:00
Casey a722833d7b
Added note that Pleroma is not properly supported 2022-09-18 16:55:13 +03:00
Casey 9fa28d518c
Oopsie 2022-09-14 20:37:51 +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 1c85e96502
Template example was in the wrong place.
iwannadie
2022-08-31 19:48:12 +03:00
Casey fd661b6a99
Merge pull request #16 from hatkidchan/formatting
Implemented custom formatting
2022-08-31 18:43:05 +03:00
Casey 093337414b
Made black happy 2022-08-31 18:36:11 +03:00
Casey 366a357643
Meowed emojize before creating Template 2022-08-31 18:26:02 +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 881b1e1532
Custom formatting? 2022-08-31 16:19:39 +03:00
Casey 87a74898eb
Why there's so many exceptions to catch?
And why there's TimeoutError and asyncio.exceptions.TimeoutError?
2022-08-31 12:34:25 +03:00
Casey 0e59717c91
Whoopsie
forgot that TimeoutError is not the same as WebSocketException
2022-08-31 00:27:34 +03:00
Casey 9d672dbbba
Merge pull request #15 from hatkidchan/filters
Added filters support (closes #6)
2022-08-30 23:06:03 +03:00
Casey 01a384161c
Changed some filters 2022-08-30 21:20:15 +03:00
Casey 26c23643c8
Fixed filter type guessing 2022-08-30 16:34:48 +03:00
Casey 7c2760783b
Ignore case in tags and removed debug print 2022-08-30 15:54:05 +03:00
Casey 209d1a9072
Pleroma: fallback value in account.discoverable 2022-08-30 13:25:05 +03:00
Casey 0274bbe186
Various filter fixes 2022-08-29 17:17:57 +03:00
Casey 8b7c381870
BaseIntegration.__call__ → BaseIntegration() 2022-08-29 10:34:23 +03:00
Casey f048cf07a9
FILTERS!!! AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 2022-08-29 10:28:51 +03:00
Casey bba6168f2b
Added a all other filters 2022-08-28 01:05:14 +03:00
Casey d19a3d2005
Added mention filter 2022-08-27 16:16:36 +03:00
Casey 4d7a9be45f
Added combined filter 2022-08-27 15:47:51 +03:00