sudo chmod +X <PathToDownload>/claat
export PATH=$PATH:<Path to claat binary>
claat export <DocID>
Note: If you have done step 1.d you can use claat from any location on the terminal, if not you would need to change directory into the location where you have the claat executable.
sudo scp -i <.pem> <PathToTar> ubuntu@<DocsIP>:/home/ec2-user/work/claat
Note: This assumes the server has claat setup with the given service account.
admin-731@docaccess-209114.iam.gserviceaccount.com
./claat export <DocID>
Note: This assumes claat is set up in the path and either CLaaT has been setup with an auth code or an auth code is setup as an environment variable "CLAAT_AUTH_CODE"
#!/bin/bash
while IFS='' read -r line || [[ -n "$line" ]]; do
if [ ${#CLAAT_AUTH_CODE} = 0 ]
then
echo "Using system CLAAT_AUTH_CODE"
claat export "$line"
else
echo "Using user defined CLAAT_AUTH_CODE"
claat export -auth $CLAAT_AUTH_CODE "$line"
fi
echo "Exported: $line"
done < "$1"
Note: Make sure to remove bower-components and elements before doing this. Also make sure to export all documents afresh otherwise the command might be appended multiple times.
#!bin/bash
sudo rm -rf bower-components/
sudo rm -rf elements/
a="<script>document.addEventListener('DOMContentLoaded', function() { const lab = document.querySelector('google-codelab'); lab._goToHome = function() { console.log('Doing Nothing'); }});</script>"
b=$(find . -name "index.html")
for filename in $b; do
echo $a >> $filename
done