HNHacker News
TopNewBestAskShowJobs

pyinthesky

18 karma · joined December 28, 2018

submissionscomments
pyinthesky··on Seashells – Pipe output from command-line programs to the web in real time
Very cool. I put together something similar a little while ago that just uses curl instead of nc:

https://github.com/jpschroeder/pipe-to-me

https://pipeto.me/

pyinthesky··on Show HN: Pipe To Me – Stream data over HTTP using curl
I think you are right actually. I will experiment with some ways to make blocking vs non-blocking operations. I need to try out @paulddraper's suggestion below to see if I can do that over http. I'd like to make a raw socket version regardless. Like you said, I just need to figure out the best way to pass the key.

Edit: One nice thing about the https interface is that you get an encrypted channel. Maybe SSH would be another option for transport. That would also make passing keys easier.

pyinthesky··on Show HN: Pipe To Me – Stream data over HTTP using curl
There are a couple (admittedly simplistic) examples in the readme like transferring or remotely watching files. The basic idea though is to take data from a unix/linux pipeline from one machine to another with the benefit of also being able to watch it in real time in a browser.
pyinthesky··on Show HN: Pipe To Me – Stream data over HTTP using curl
I may end up re-thinking this, but one idea was that you could temporarily `tail -f` a log file into a pipe and then check up on it later via a mobile browser. It could be writing the whole time, but just dropping everything when you weren't watching it.

It would probably also make more sense if I were to add some kind of buffering or storage in the future.

pyinthesky··on Show HN: Pipe To Me – Stream data over HTTP using curl
Hello, Author here. I toyed around with the idea of not allowing the sender to connect until a receiver was connected, but I could see the use case where you wrote a stream to nowhere and then had receivers jump in and out.

I also toyed around with using the "-T." curl argument instead of "-T-" to allow some response in this case, but I came up against a known issue in curl (https://github.com/curl/curl/issues/932). I'm sure this wasn't the intended use case though.

It is definitely worth exploring further.