Tool to make spoilered images easier to create and compatible(ish) across clients.
Go to file
crimsonfork dc238f4858 Move Thanks section. 2023-03-16 21:07:57 +01:00
img Readme improvements. 2023-03-12 10:20:46 +01:00
.gitignore Initial commit 2023-03-10 00:50:15 +00:00
LICENSE Initial commit 2023-03-10 00:50:15 +00:00
README.md Move Thanks section. 2023-03-16 21:07:57 +01:00
spoilerinator.py Readme improvements. 2023-03-12 10:20:46 +01:00

README.md

Spoilerinator.

Tool to make spoilered images (+ content warnings) easier to create and compatible(ish) across Matrix clients.

Usage.

  • Upload image in an unencrypted room.
  • Secondary (left) click on it.
  • Copy image URL.

Secondary click menu, "copy image address".

  • Launch in terminal.
python3 spoilerinator.py
  • Paste the URL.
  • (Optional) Provide a content notice.

Thanks.

  • Jade for help with regex (((.[^\/]*){2})$).
  • Æthena for name suggestion.
  • Sasha for helping with git and testing.
  • Polychromata for pointing out Element mobile's preview despite <blockquote>s.

Design.

The spoilenator attempts to balance usability and compatibility across the frustratingly widely inconsistent implementations of spoilered images, biggest offenders being Element mobile and Nheko, which simply do not spoiler images under any circumstances, others that scale inline images differently from each other if no height and/or width attribute (which only accept pixels) is given, Element mobile which is the only client to reender a link preview despite the <blockquote> element and FluffyChat which will scale a URL without content to a part of the following element (not to be confused with Element, a client that makes it easy to web search for how it handles HTML elements).

Examples in client rendering.

Element/SchildiChat.

Side note: it's recommended to check out SchildiChat if you like Element.

Element/SchildiChat mobile.

FluffyChat.

Nheko.

Cinny (ignore the weird text color).

TODO:

  • Capitalize only the first letter of CN.
  • URL validity check.
  • Work with mxc:// URLs.
  • Add easy way to switch to CW and TW.