I learned how to download one google doc. But I'm trying to make a script that loads all my data in text format, and then combines them into 1 text file. Therefore, I am wondering how to implement the download so that 1 can get a zip file with all my files in the same way as with a web browser. Here is my newb script for getting a single file. Hope you can suggest some tweaks that will make it more efficient.
#!/bin/bash token=$(curl -s https://www.google.com/accounts/ClientLogin -d Email=user.name@gmail.com -d Passwd=blahblah -d accountType=GOOGLE -d service=writely -d Gdata-version=3.0 |cut -d "=" -f 2) set $token wget --header "Gdata-Version: 3.0" --header "Authorization: GoogleLogin auth=$3" "https://docs.google.com/feeds/download/documents/Export?docID=${resourceId}&exportFormat=txt" -O /tmp/${file[$i]}.txt
Here I specify one resourceId , as you see. Should I just click a lot of resourceId -s in the download link to get them all or is there a better way?
source share