Live data from Hacker News

Tosheets, utility to send stdin to Google sheets

github.com

1–10 of 30 posts

Re: Tosheets, utility to send stdin to Google sheets

#4
This is pretty great. It looks like it automatically writes to the next logical empty cell.

  curl https://www.bitstamp.net/api/v2/ticker/btcusd \
  | grep 'last": *"\d*\.\d*' -o | grep '\d*\.\d*' -o \
  | tosheets -c A1 --spreadsheet=foo
^ That will append the last BTC price to column A of sheet 'foo'

Re: Tosheets, utility to send stdin to Google sheets

#8
post #5
post #3

Nope, it sends stdout to sheets. Getting input from sheets would be cool, too.

It looks to me like you're being downvoted, but what you're saying looks correct to me. $PROGRAM sends to stdout what google sheets reads from "stdin"

When you run this utility, it forwards stdin to Google Sheets.

Should you pipeline stdout from somewhere else to this utility, the contents of that stdout will be forwarded to Google Sheets.

It is correct to say either that you are forwarding stdin or that you are forwarding stdout. It is therefore not correct to say that it does not forward stdin, because the source code explicitly refers to stdin. That's likely the reason for the [Fight Club]s the GP is receiving.

Re: Tosheets, utility to send stdin to Google sheets

#9

This is pretty great. It looks like it automatically writes to the next logical empty cell. curl https://www.bitstamp.net/api/v2/ticker/btcusd \ | grep 'last": *"\d*\.\d*' -o | grep '\d*\.\d*' -o \ | tosheets -c A1 --spreadsheet=foo ^ That will append the last BTC price to column A of sheet 'foo'

Can I nerd out over how unreasonably effective regexps are?

That's basically a mini JSON parser in 48 characters.

Post reply on HN