Tosheets, utility to send stdin to Google sheets
github.com
github.com
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'That's basically a mini JSON parser in 48 characters.
curl ... | jq -r .lasthttps://blog.codinghorror.com/parsing-html-the-cthulhu-way/
“”” That's right, if you attempt to parse HTML with regular expressions, you're succumbing to the temptations of the dark god Cthulhu's … er … code. “””
For example, this uses datamash (https://www.gnu.org/software/datamash/) to sum column 2 of a CSV ("-t,"), then log the output:
datamash -t, sum 2 < stuff.csv | loggerBonus: In depth code review for this package: https://youtu.be/c5ufcpTGIJM
We need more utilities like this that help integrate apps and web services between themselves and the Unix environment.
"Pipes to the web" should be like this. Not bloted a UI with forms that perform premade actions with your web apps data.
It is stdout for the previous process in the pipeline and stdin for the tosheets itself.
EDIT: Tosheets -> tosheets
From "tosheets"'s stdin to sheets.
Your project ruins my English
tosheets --spreadsheet=ABC <myfile.txt
In this example, stdin is what goes to the spreadsheet. stdout is (I assume) nothing.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.
Please don't comment about the voting on comments. It never does any good, and it makes boring reading.