source: gs3-installations/thewillow/trunk/sites/thewillow/collect/community-contributions/prepare/DOWNLOAD-PUBLIC-GSHEET-AS-XSLX--THEWILLOW.sh@ 37634

Last change on this file since 37634 was 37634, checked in by davidb, 13 months ago

Fine tuning echo output

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/bin/bash
2
3download_sheets_separately=0
4
5gsheet_docid="1dBRRs7gqD46q21oDErw83NMK-9jY_DmuCvrzODDcgJI"
6
7output_filename_root="Willow Archive Directory"
8
9echo ""
10echo "****"
11echo "* The following wget call works if the document is publicly accessible"
12echo "* "
13echo "* If authentication is needed, then setup up rclone and copy using that"
14echo "****"
15echo ""
16
17echo "Sleeping for 5 secs before running command"
18sleep 5
19echo ""
20
21if [ $download_sheets_separately = 1 ] ; then
22
23 #information_sheet="gid=969758927"
24 directory_sheet="gid=1389522865"
25 #objecttype_sheet="gid=0"
26 #theme_sheet="gid=459198218"
27
28 echo "Downloading sheet 'directory':"
29
30 wget --no-check-certificate \
31 -O "${output_filename_root}-directorysheet.xlsx" \
32 https://docs.google.com/spreadsheets/d/1j6_xry6OfLrdBkXeYZA8NTLCZwf-jr5DHlpGwAONLyY/export?$directory_sheet&format=xlsx
33
34else
35 echo ""
36 echo "Downloading full spreadsheet:"
37 echo " https://docs.google.com/spreadsheets/d/$gsheet_docid/export?format=xlsx&id=$gsheet_docid"
38 echo ""
39
40 wget --no-check-certificate \
41 -O "${output_filename_root}.xlsx" \
42 "https://docs.google.com/spreadsheets/d/$gsheet_docid/export?format=xlsx&id=$gsheet_docid"
43
44 echo ""
45 echo "----"
46 echo "Testing the file type of the downloaded file => expected to be 'xlxs'"
47 echo "----"
48
49 # echo file "${output_filename_root}.xlsx"
50 echo " " `file "${output_filename_root}.xlsx"`
51 echo "----"
52 echo ""
53
54fi
55
Note: See TracBrowser for help on using the repository browser.