twitter-together / action

:bird: A GitHub action to tweet from a repository

Home Page:https://github.com/marketplace/actions/twitter-together

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support URLs for media attachments

MattIPv4 opened this issue · comments

What’s missing?

Split from #166 -- When attaching media to a tweet currently, it is expected that the filename will be located within the media directory in the repository. Support for absolute URLs would be a great addition to media attachments, allowing for folks to do url: https://media2.giphy.com/media/vFKqnCdLPNOKc/giphy.gif instead of file: cat.gif

Why?

Improving the usability of attaching media for folks that don't want to start version controlling every item of media that is sent out in a tweet, or want to avoid having to make copies of existing online media in their repository to tweet it.

Alternatives you tried

Frontmatter media already supports local files using file: cat.gif with cat.gif being in the media directory.

I'd also suggest supporting markdown style formatting, making it super easy to paste in an image while editing a tweet in the GitHub UI, which will automatically upload the pasted image.

---
media:
  - link: ![Alt Here](https://user-images.githubusercontent.com/xxx/yyy.png)
---

I'd prefer

---
media:
  - url: https://user-images.githubusercontent.com/xxx/yyy.png
    alt: Alt here
---

I think both should be supported, but I was thinking that from the perspective of those not comfortable with editing code that using the default GitHub formatting would make it easier for them to contribute.

This way contributors just need to hit paste, rather then having to also split the filename and alt text and type in the different params and ensure indentation is correct.

I'm not a fan of mixing YAML syntax with Markdown syntax to represent object properties. The syntax for the .tweet files should be as simple as possible.

from the perspective of those not comfortable with editing code

The plan is to create a UI in future