action icon indicating copy to clipboard operation
action copied to clipboard

Support for embedded media (image, GIF, or video)

Open matchai opened this issue 4 years ago β€’ 14 comments

What’s missing?

Support for media (image, GIF, and video)

Why?

In order to make more eye-catching and engaging tweets ✨

Alternatives you tried

Tweeting a link to a statically hosted asset will sometimes embed a preview.

How it would work

Such a feature would have some added complexity:

  • How would a media file be associated with a tweet?
  • Where would it be stored?

Unfortunately, adding media files to a repo in the same PR can't be done via /new/master/?filename=tweets/%3Cyour-path%3E.tweet. The interface doesn't allow adding media files to that same PR.

Some possible options:

  • Associate tweet with media file by filename: e.g. hello-world.tweet contains hello-world.gif
  • Add some sort of front matter before/after the tweet content containing the path to the associated media file
  • Including a link to media surrounded by identifiable markup will have it be downloaded and attached e.g. ![https://media2.giphy.com/media/vFKqnCdLPNOKc/giphy.gif] will be automatically downloaded and embedded

matchai avatar Jan 28 '20 21:01 matchai

Hey Matan,

thanks for the issue! It's great timing, we have a related discussion about polls here: https://github.com/gr2m/twitter-together/issues/79

I think the biggest question is the format of these *.tweet files. I would like to support

  • image attachments
  • gif / video attachment
  • polls
  • threads

I'm currently implementing the polls by checking for this format

Here is the tweet text

( ) Poll option 1
( ) Poll option 2
( ) Poll option 3
( ) Poll option 4

So that I can keep the --- separator to actually separate emails.

I was wondering what image attachments might look like?

I thought maybe something slightly simpler than your ![url] suggestion

Text here ...

^ https://media2.giphy.com/media/vFKqnCdLPNOKc/giphy.gif

Any thoughts?

gr2m avatar Jan 29 '20 04:01 gr2m

And related: I would like to work on a custom UI for twitter-together. With Authentication via OAuth, still using the file creations / pull requests in the background, but provide a much friendlier user experience to people who are not as familiar to GitHub. That UI could simply have an upload feature and it would upload the assets as files to the same folder as the *.tweet file.

Would you be interested in collaborating on a static web app for this? I can take care of the data loading / mutating & authenticating bits, I'm just not so versed in the latest web UI libraries/frameworks.

gr2m avatar Jan 29 '20 04:01 gr2m

I thought maybe something slightly simpler than your ![url] suggestion

Text here ...

^ https://media2.giphy.com/media/vFKqnCdLPNOKc/giphy.gif

Any thoughts?

Looks good to me! πŸ‘ Much simpler and clearer markup.

Would you be interested in collaborating on a static web app for this? I can take care of the data loading / mutating & authenticating bits, I'm just not so versed in the latest web UI libraries/frameworks.

Sure, I'd be up to it! 😊 We could get started with working out how the UI works in a new issue.

matchai avatar Jan 29 '20 16:01 matchai

Really happy to see this being worked on. let me know if theres anything I can do to help.

ATM i'd be happy with literally any syntax that would allow me to post these fire meme gifs.

BelfordZ avatar Feb 13 '20 21:02 BelfordZ

@BelfordZ can you get a pull request going with tests?

I'd say we should support both relative paths and absolute URLs for attachments. Relative paths being paths relative to the /tweets folder in the repository. That way a pull request submitting a tweet could upload an asset at the same time

gr2m avatar Feb 13 '20 22:02 gr2m

Is this feature still being worked on?

It seems the Twitter API supports media upload programmatically, as AI profiles such as Archillect are able to post it.

kazzkiq avatar Sep 03 '20 21:09 kazzkiq

Nobody is working on it, would you like to give it a go?

gr2m avatar Sep 07 '20 17:09 gr2m

I use this feature in my Github Actoin that calls a PHP Script nad image is the last thing I miss here to drop my whole packages and migrate. How can we support this to make it happen?

TomasVotruba avatar Nov 23 '20 01:11 TomasVotruba

someone has to build it :) pull requests welcome

gr2m avatar Nov 23 '20 20:11 gr2m

We should consider how to set an alternative text for accessibility reasons, e.g.

^ https://media2.giphy.com/media/vFKqnCdLPNOKc/giphy.gif|Alternative text here

gr2m avatar Feb 07 '21 20:02 gr2m

For images it would be also nice to support adding images from the action workspace. For example, one could create a GitHub action based on https://github.com/jacebrowning/memegen, and one could create a memegen => twitter-together chain so that memes could be generated from code without actual images being stored in the repo.

Maybe file:// URL is enough to address this case without making the format more complex.

P.S: I plan to experiment with that for https://github.com/jenkinsci/memkins/issues/4

oleg-nenashev avatar May 29 '21 16:05 oleg-nenashev

It's November 2021 now, and I'm here to chime in and assure GH we (OSS world here) still need this item πŸ˜”

quetzalliwrites avatar Nov 03 '21 17:11 quetzalliwrites

This is an independent open source project, it won't build itself πŸ˜‰

gr2m avatar Nov 03 '21 20:11 gr2m

Please see this issue for further discussion: https://github.com/gr2m/twitter-together/issues/166 πŸ’–

gr2m avatar Nov 16 '21 23:11 gr2m