ios - Edit Google spreadsheet automatically from command line -
i´m trying make collection of scripts in php , bash ask bugsense errors in app, make need , upload couple of files google docs in company can see data date.
i because, know, bugsense gives me information of last 30 days cannot store there historical of applications crashes.
the problem i´m having how edit google spreadsheet without deleting , uploading again. mean, i´m doing right is:
google docs $google_doc $google_doc_tsv
now have file want edit, delete drive because if upload again not override , have files same name:
google docs delete $google_doc --yes
after need file , upload again:
google docs upload $google_doc_tsv
the problem i´m having new file everytime script runned cannot share document because i´m deleting everytime , uploading new one.
the other thing googlecl allows edit file:
google docs edit $google_doc --format tsv --editor vim
but this, proccess not automatic because need deal vim. i´ve been checking everywhere nothing found solves problem.
finally found how looking python code of googlecl
. need build script following:
#!/bin/bash -l #$ -s /bin/bash #s -n $1 export google_doc=$1 #!then whahever need google file
this script taking value of first argument (which path google doc want edit doing whatever it). need call googlecl
this:
google docs edit --title google_doc_title --format format --editor script_we_just_build
googlecl
creating temporary file in system , passing editor
(our script) path temporary file. getting path temporary file.
whenever yoy finish googlecl
if there change in file , upload if yes
.
Comments
Post a Comment