INDEX
2024-04-04 13:30 - Google sheets export I want to see how I can make a system stats exporter interfacing with google sheets Just going to go onto my VPS and add another page with nginx for stats Actually I can just save in connorsanders.net/status.csv echo "UPTIME,`uptime | cut -d',' -f1` PINGTIME, `ping -c 1 1.1.1.1 | grep -oP "time=\K\d+\.\d+"`" \ > /var/www/connorsanders.net/status/status.csv # Still technically a static site IMPORTDATA("https://connorsanders.net/status/status.csv",",","en_GB") # Now I have a clean output of csv data Okay now I want to see if I can export data from sheets to a server # This is the spreadsheet on page "ToServer" Camera Source Brightness Contrast Cam1 Port1 50 20 Cam2 Port3 200 30 # Go into File - Share - Publish to Web - "To Server":csv - Publish # Now I have a link to put into bash curl -o imported.csv 'URL' # Only issue I'm getting is there's a redirect curl -L -o imported.csv 'URL' # Works - downloads it cleanly So I can send data TO and FROM google sheets as a csv - perfect Just for reference, I've now moved the status folder out from the exported directory