GithubHelp home page GithubHelp logo

someguy123 / fxmastodon Goto Github PK

View Code? Open in Web Editor NEW
24.0 3.0 2.0 35 KB

FxMastodon - A simple webapp which fixes Mastodon embeds on Discord for images, videos, and sensitive content

License: Other

Python 44.72% Shell 32.57% HTML 22.71%
mastodon mastodon-api mastodon-app mastodon-bot

fxmastodon's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fxmastodon's Issues

Text from post not displayed if there is a video

Discord has an issue when directly sharing a toot which contains text and video causing only the video content to be displayed. The same is happening with fxMastodon links. Confirmed the meta data does exist with the text.

Here's the original toot:
Screenshot of original toot as it appears on Mastodon showing text and video content

How it shows in Discord:
Screenshot of toot embed in Discord with original URL showing only video

How it shows using fxMastodon
Screenshot of toot embed in Discord using fxMastodon showing only video

The meta content showing the text portion of the toot:

<meta content='Attached: 1 video

Ever wanted your desktop windows to jiggle around on-beat? I wrote a Winamp plugin to solve this important problem.

Download: https://mew.tv/projects/shaker.html
Source: https://git.sr.ht/~juni/shaker' name='description'>
<meta content="Attached: 1 video

Ever wanted your desktop windows to jiggle around on-beat? I wrote a Winamp plugin to solve this important problem.

Download: https://mew.tv/projects/shaker.html
Source: https://git.sr.ht/~juni/shaker" property="og:description">

Add support for other fediverse applications

Some people have requested adding support for other apps such as Calckey, Misskey, Lemmy, maybe GNU Social, etc.

This would likely require some kind of software detection, to figure out what kind of software an instance is running, possibly should assume mastodon first, then if it fails, do detection, cache the detection result for future requests, and then use the APIs / templates designed for that software.

Would probably need to refactor the service into a class + adapter based approach, so that it's possible to easily write adapters for other fediverse software as needed

NOTE: This is a LOW PRIORITY issue, for now it's more important to focus on making the service work best for Mastodon, and only then start to work on adding support for other fediverse software

Add support for multi-images

At the moment, the service only supports displaying the first image/video in a post

The most likely best fix for this would be what VxTwitter does, which is to take all of the images in a post, and merge them into one single image in a grid:

4 image post:
+------+--------+
| IMG 1 | IMG 2 |
| IMG 3 | IMG 4 |
+------+--------+

2 image post:
+------+--------+
| IMG 1 | IMG 2 |
+------+--------+

3 image post:
+------+--------+
| IMG 1 | IMG 2 |
|     IMG 3     |
+------+--------+

This could be achieved using the Pillow library for Python, or another image handling library.

This would require that the embed images are actually served by the application instead of directly linking to them, which may require use of the privex-helpers cache system (via redis or memcached adapter in production) to speed up requests and avoid constantly rendering images unnecessarily.

NOTE: This shouldn't be done for videos, only images. For videos it's best that we continue to display just the first video, as it would be difficult to merge videos into one video, especially due to audio tracks. Videos should probably take priority over images, if a post contains a video, then we display just the video, or possibly we base it off of the first media, i.e. if the first media is an image, we display only the images, if the first media is a video, we display just the first video

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.