Closed RobinMalfait closed 6 years ago
Yeah, this is a neat idea, and it's something that's on the list for v2.0. It probably requires some kind of accounts system and some more infrastructure to prevent abuse, which is why this feature doesn't exist already. But I think eventually we might have (optional) named sessions like seashells.io/u/{username}/{session name}
.
If all you want to do is get the URL from the output, that's pretty easy to do. The current Seashells protocol is very simple: you connect to a TCP socket and start dumping data into it, and the server replies back with the link. Getting this link programmatically should be easy.
Hello @anishathalye thanks for the quick reply!
We tried to get the url from the output but since we are dumping a lot of data into it we couldn't figure it out yet.
We use it for something else, but this is the essence. The seashells url does get dumped in the console. But I didn't find a way to read it yet.
cat /dev/random | seashells --delay 10
You need to read stderr from the seashells
process.
Alternatively, you could just modify the seashells script itself. You could change this: https://github.com/anishathalye/seashells/blob/master/seashells/__init__.py#L100 so it gets the first line of output from the server (which is the URL) and then does something useful with it.
Great, thank you for clarifying @anishathalye !
Reading stderr
did the trick, closing now!
🎉
It would be cool to have a way of knowing the url ahead of time or reserving a url.
A use case for this is:
If somebody knows a workaround to get the URL from the output programatically that would be cool.