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