mirror of
https://github.com/asciinema/asciinema.git
synced 2026-04-25 07:55:51 +03:00
[GH-ISSUE #117] [Feature request] Allow some sort of "commenting" inside the asciinema JSON #88
Labels
No labels
bug
compatibility
feature request
fit for beginners
help wanted
hosting
idea
improvement
packaging
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asciinema#88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pdfkungfoo on GitHub (Jun 30, 2015).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/117
ASCiinema's popularity will improve the more, the better the contents of screencasts are. However, to produce _really good_ ASCiinema playback material, there is a need to _edit_ the original recordings.
While editing recordings isn't a problem per se, to do so with a file that plays longer than 1 minute is quite a stretch, because it is difficult to navigate its structure. If we could insert comments (which should be ignored when playing the file), that task would get more easy.
I am aware that "pure" JSON does not allow comments.
However, for
asciinemait would be a nice feature if I could insert lines likeThis would help immensely when editing a recorded file.
@ku1ik commented on GitHub (Jun 30, 2015):
I see your point. However we cannot make the JSON file "special" because it is also meant to be read by web browsers and other external tools. By using unsupported syntax in JSON we would break all of them (except the
asciinemarecorder/player).@pdfkungfoo commented on GitHub (Jun 30, 2015):
I was not aware that web browsers read (and process) the JSON directly.
Which ones would that be? On what occasions?
Also, which "other external tools" are you aware of that can replay
asciinemaJSON files?@ku1ik commented on GitHub (Jul 1, 2015):
The asciinema player will soon be able to play asciicast directly from JSON file produced by the recorder, allowing for easy self hosting (asciinema.js + your-recording.json). It's not yet there but will be soon. One of the reasons for choosing JSON for asciicast file format is it's good, native support by web browsers.
I'm not aware of any other players, but I can see some editing/optimizing tools coming and I want to make it easier for people by allowing to use standard, often built-in JSON parsers.
Also, see this: https://gist.github.com/sickill/1c44512cac222c8afea7
@noisy commented on GitHub (Jul 21, 2015):
@KurtPfeifle @sickill maybe the solution would be to write a (maybe 3rd party) visual editor for screencasts. I think it should be possible to add ascii-callouts in specified places on the screen, which will be displayed on screencast for specified time.
@ku1ik commented on GitHub (Jul 21, 2015):
@noisy I think @KurtPfeifle is talking about different thing. If I'm getting this correctly what you described is "subtitle" support, with the data coming directly from the asciicast file (as an additional "overlay text track"). @KurtPfeifle wanted to put comments into the asciicast JSON file so he can navigate throughout the file easier, but these comments should be ignored during playback.
@ku1ik commented on GitHub (Mar 26, 2016):
One option I see here to make editing easier is to use absolute time instead of relative one - would make finding the right spot much easier. We can discuss this in a separate issue though. As for adding comments to JSON, it's not going to happen.
@pdfkungfoo commented on GitHub (Mar 26, 2016):
I would not like absolute time, because some of my editing modifications also spans changing the timings.
To get this "right" would be much more difficult with absolute times. (Currently, I can speed up or slow down individual lines by just overwriting one digit at the right spot...)
@pdfkungfoo commented on GitHub (Mar 26, 2016):
So, it is too difficult to make the asciinema playback tolerant of sprinkled in comment lines? (These could also be automatically removed upon publication.)
@ku1ik commented on GitHub (Mar 26, 2016):
JSON doesn't support comments and we use default JSON parsers for loading the recording - Go's stdlib JSON parser (when you
asciinema play file.jsonin terminal), and web browsers' own JSON parsers when playing in the web player.Alternative could be to support additional file format, for example edn, which is human readable and supports commenting.
@pdfkungfoo commented on GitHub (Mar 26, 2016):
It would be "good enough" to make
asciinema play file.jsontolerant for commented lines.Couldn't it be implemented by a two-stage approach:
grep -v-alike routine) before?
Sorry if this sound dumb -- I'm not a programmer.
@ku1ik commented on GitHub (Mar 26, 2016):
You can do it now like this:
@pdfkungfoo commented on GitHub (Mar 26, 2016):
Ouuuhhhh....
Thanks a lot. That's probably good enough for me. ;-)
I'll give it a workout soon.
(I had not been aware that
asciinemacould work with input...)