Open kousu opened 1 year ago
The main difficulty is how to embed asciinema player into the markdown file renderer. See https://github.com/go-gitea/gitea/pull/22448#issuecomment-1382694525
And it must be an elegant and scalable way, because others could also ask to render PDFs, videos or other files.
I'll be absolutely ecstatic someone finds a way to do that.
Both plain internal links and markdown image links could call renderers to render the content. According to the file name extension names, include PDF, asciinema, css, console log and etc renderers.
Feature Description
It is great that https://github.com/go-gitea/gitea/pull/22448 added support for rendering asciinema's .cast files when uploaded to a repo: :tada:
https://github.com/go-gitea/gitea/assets/987487/e9881e8b-464a-493e-b5d6-90fd37ea7e3c
It would be even better if they could be dropped into issues, the way we can currently drop screenshots. When debugging an issue, or proposing a PR, I find it incredibly useful that I can upload a video file to demonstrate exactly the issue. But being able to do the same with a .cast file would be stellar -- faster, and with the ability for people to copy command lines directly out of it.
Currently .cast files are not even allowed as attachments by default, but with attachments.ALLOWED_TYPES I was able to set
but they do not render:
It would be great if they did! asciinema.js is shipping with Gitea now so hopefully it should be an easy addition.
Screenshots
On GitHub, uploading a .mp4 as an attachment gets replaced by its uploaded link and rendered as a video player:
That's the workflow I would like to have for .cast files in Gitea if possible!