mirror of
https://github.com/asciinema/asciinema.git
synced 2026-04-25 16:05:52 +03:00
[GH-ISSUE #99] Retrieve uploaded session #78
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#78
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 @zmwangx on GitHub (May 9, 2015).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/99
It seems to me that currently there's no way to retrieve an uploaded session (the JSON served to the player is processed, excuse me if I'm wrong), so if one didn't pick a file to save to before the recording (i.e., ran
asciinema recordwithout arguments) and immediately uploaded the cast after finishing the session (i.e.,Press <Enter> to upload, <Ctrl-C> to cancel.==> press enter), then the recording is essentially lost locally. The temp file seems to be immediately deleted after a successful upload (I find this unnecessary).Since the uploaded sessions are public, it would be really nice if all sessions on asciinema.org are available for download (this would even save some AWS bandwidth, assuming one wants to play a nice cast by someone else over and over again, but have to play it online unless it is available for download). If you fear that this would lead to abuse, another great thing would be to let the uploader download his/her own sessions.
(Is there an API trick that I haven't discovered?)
@ku1ik commented on GitHub (May 10, 2015):
You're correct, the JSON served to the player is a processed one, not the "asciicast v1" format.
Looks like what you're looking for is an endpoint like
/a/12345.json. Currently it's being used internally by asciinema.org but I don't see a reason for moving the current one to some other path and serving the actual asciicast JSON from this path. We already have/a/12345.pngto serve a screenshot representation of an asciicast, it sounds ok to serve the recording when requested as.json.@zmwangx commented on GitHub (May 13, 2015):
Sorry, I'm not sure I understood exactly what you meant. If I read it correctly, currently there's no endpoint serving the asciicast JSON, right? Since the
/a/12345.jsonendpoint returns an object withid,duration,stdout_frames_urlfor processed frames, andsnapshot. That's perfectly fine, and there's no reason or need to move it. Just, can we have another endpoint serving the original cast JSON (for reasons and benefits outlined above)?@ku1ik commented on GitHub (May 13, 2015):
I meant we definitely can have an endpoint serving original cast JSON. That's a good idea. And at the same time I think it would be nice if it lived at
/a/12345.json, as this is public API area (html and png live here too). I'd rather move theid/stdout_frames_url/...JSON to some other place because it's kinda private API, so it can live anywhere else. Let me see what I can do about it.@zmwangx commented on GitHub (May 13, 2015):
That would be great, thanks.
@ku1ik commented on GitHub (May 13, 2015):
It's there. Try
wget https://asciinema.org/a/19921.json.@zmwangx commented on GitHub (May 13, 2015):
Awesome!
@zmwangx commented on GitHub (May 15, 2015):
I suppose this issue could be closed now? Or maybe the endpoints are still not final and you'd rather keep it open for a little longer?
@ku1ik commented on GitHub (May 15, 2015):
Yep, closing.