Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-24 02:36:10 +01:00
forgejo/modules/markup
Jason Song d9f748a700
Support asciicast files as new markup (#22448)
Support [asciicast
files](https://github.com/asciinema/asciinema/blob/develop/doc/asciicast-v2.md)
as a new markup via
[asciinema-player](https://github.com/asciinema/asciinema-player). For
more on asciinema, see the [introduction](https://asciinema.org/).

So users can use asciinema recorder to generate an asciicast file (or
you can download a sample file from
https://asciinema.org/a/335480.cast?dl=1), then upload it to Gitea and
play it on Gitea.

Snapshots:
<details>

## Upload asciicast files

<img width="1134" alt="image"
src="https://user-images.githubusercontent.com/9418365/212461061-cc2c7181-0e14-4534-af55-1ec60a639fd1.png">

## Open an asciicast file

<img width="1137" alt="image"
src="https://user-images.githubusercontent.com/9418365/212461090-a3b5141f-4894-430d-a2b4-ea257801a0ed.png">

## Play it

<img width="1144" alt="image"
src="https://user-images.githubusercontent.com/9418365/212461157-4e82db69-0e41-471d-928f-ac1fe0737105.png">

## Copy contents from the "video"

<img width="1145" alt="image"
src="https://user-images.githubusercontent.com/9418365/212461286-211612bc-15d6-427a-89a9-6abff5c6a0a5.png">


## View the source

<img width="1140" alt="image"
src="https://user-images.githubusercontent.com/9418365/212461187-05473b2d-ba3d-4072-84a6-4aa1e7d82182.png">


</details>

Known issue:

Don't support the [v1 version asciicast
files](https://github.com/asciinema/asciinema/blob/develop/doc/asciicast-v1.md),
it's a poorly designed version, it does not specify the file extension
and uses `*.json` usually, so it's impossible to recognize the files.

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-01-18 08:46:58 +08:00
..
asciicast Support asciicast files as new markup (#22448) 2023-01-18 08:46:58 +08:00
common Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
console Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
csv Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
external Log STDERR of external renderer when it fails (#22442) 2023-01-13 20:41:23 +00:00
markdown Remove deadcode (#22245) 2022-12-27 09:15:35 +08:00
mdstripper Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
orgmode Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
camo.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
camo_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
html.go Use multi reader instead to concat strings (#22099) 2022-12-12 11:03:54 +08:00
html_internal_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
html_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
renderer.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
renderer_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
sanitizer.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
sanitizer_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00