install-osrf.sh: set ejabberd host correctly during registration on prod
[sitka/sitka-tools.git] / marc_export_custom / email-template-outlook.sh
1 #!/bin/bash
2 t1=$1
3 t1=${t1/T/ }
4 t1=${t1/??Z}
5 t2=$2
6 t2=${t2/T/ }
7 t2=${t2/??Z}
8
9 if [ -z "$t1" -o -z "$t2" ]; then
10         echo "Usage: $0 'Generate timestamp' 'Submit timestamp'" 1>&2
11 fi
12
13 FILELIST=`cat Manifest`
14
15 cat <<EOF
16 Date: $(date -uR)
17 From: "SITKA Tier 2 Support" <sitka-tier2@bc.libraries.coop>
18 Subject: SITKA Outlook export $(date +%Y/%m/%d -d "$t1") (includes ELN media/serials)
19 To: "OutLook Online Support" <olol_support@eln.bc.ca>, "Ramiro Castillo" <rcr@auto-graphics.com>
20 Cc: "SITKA Tier 2 Support" <sitka-tier2@bc.libraries.coop>, "Sharon Herbert" <sherbert@sitka.bclibraries.ca>
21
22 Full automated Outlook export
23
24 Please remember to review the shortcodes*csv file for any new shortcodes.
25
26 Notes:
27 (none, this was automated)
28
29 Directory for uploads:
30 sitka/
31
32 Submission timestamp:
33 $(date -uR -d "$t2")
34
35 Generation timestamp:
36 $(date -uR -d "$t1")
37
38 Submission method:
39 WebDAV
40
41 Compressed sizes in bytes:
42 $(head -n2 *stats | awk '/.marc.bz2$/{print $9,$5}')
43
44 Uncompressed size in bytes:
45 $(head -n2 *stats | awk '/.marc$/{print $9,$5}')
46 $(find -name '*.csv' -printf '%f %s\n')
47
48 Number of records submitted:
49 $(grep -h Filename -A5 $i *stats | awk '/.marc$/{print $3,$1}')
50
51 Files uploaded:
52 $FILELIST
53
54 SHA1 checksums:
55 $(egrep '^[a-f0-9]{32}' *stats -h |sort -k +2)
56 $(sha1sum *.csv)
57 EOF