Giter Club home page Giter Club logo

mastopoet's Introduction

Mastopoet Banner, AI generated, by @rolle@mementomori.social

Mastopoet

The post screenshot tool for Mastodon. Developed by @[email protected]

What?

Mastopoet is an open source screenshot tool for Mastodon, inspired by poet.so. It allows you to create ✨ stunning ✨ screenshots of your posts, with ability to remove stuff you don't want (bookmark button, publicity symbol, settings button...). And with a theme that's not dependent on the theme of the instance!

Demo

mastopoet.ohjelmoi.fi

URL Query feature

Add ?url= to the end of the Mastopoet URL to generate links that immediately open the post on Mastopoet.

Themes available

  • Bird UI (Dark, Light)
  • Mastodon (Dark, Dark + light interaction labels, Light)

Images/profile pictures not working?

This is due to CORS. I cannot do anything about it, as the whole process is done client-side.

If you want to get Mastopoet working on your instance, contact your admin and ask them to allow anonymous CORS (crossOrigin: "anonymous") requests for their Mastodon media server.

For admins this means they need to add the Access-Control-Allow-Origin header to the server providing your users with images hosted on Mastodon. You can set it to '*', or allow just Mastopoet with 'https://mastopoet.ohjelmoi.fi'. There's more technical information on MDN Docs.

Deploying

You can use Docker (instructions below), or simply host the website on a static platform. Mastopoet is a React SPA, compiled by Vite, allowing it to be deployed to pretty much any hosting service. My recommendations are Cloudflare Pages, Netlify and Github Pages.

First, install dependencies with npm install and then build the app with npm run build. Simple as that! The application is in the dist directory.

Ko-fi advert

By default, the default post shows a link to my Ko-fi profile. If you want to disable it, you can customize the defaultPost in src/config.ts, or set environment value VITE_HIDE_DEVELOPER_KOFI_AD to false. I appreciate if you decide to keep it.

Building with docker

You can use docker for deploying a production ready instance of Mastopoet.

You can build with:

docker build -t mastopoet .

It will build the application and deploy in an nginx instance, when the image is built you can run using:

docker run -d -p 80:80 mastopoet

For more options, see nginx container options at dockerhub

TODO

  • Customizable gradient
  • Bird UI light theme port
  • Mastodon theme port
  • Customizable date format
  • A logo (to website embed)
  • Read toot URL from query
  • Default toot with information
  • Fix multi image image galleries
  • Support for non-Mastodon links
  • Alt text generator
  • PDF export with link (idea)
  • Detect CORS failed images and show user info box
  • If toot div is not an full integer, weird bars show in image.

Credits

mastopoet's People

Contributors

aaaaalbert avatar luigieai avatar raikasdev avatar ronilaukkarinen avatar

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.