install-eg.sh: fix setup of non-prod Apache includes
[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
ecf99fef 13# illsupport@bclibrary.ca goes to Mari.Martin@gov.bc.ca and Bob.Yuan@gov.bc.ca
8ec81273
RJ
14cat <<EOF
15Date: $(date -uR)
d10c96dc 16From: "SITKA sysop" <sysop@bc.libraries.coop>
8ec81273 17Subject: SITKA Outlook export $(date +%Y/%m/%d -d "$t1") (includes ELN media/serials)
ecf99fef 18To: "BC Public Libraries" <illsupport@bclibrary.ca>, "Sunni Nishimura" <sunnin@eln.bc.ca>, "Ramiro Castillo" <rcr@auto-graphics.com>
d10c96dc 19Cc: "SITKA sysop" <sysop@bc.libraries.coop>, "Sharon Herbert" <sherbert@sitka.bclibraries.ca>
8ec81273
RJ
20
21Full automated Outlook export
22
d7c04662
RJ
23Please remember to review the shortcodes*csv file for any new shortcodes.
24
8ec81273 25Notes:
d7c04662 26(none, this was automated)
8ec81273
RJ
27
28Directory for uploads:
804191d8 29sitka/$T
8ec81273
RJ
30
31Submission timestamp:
32$(date -uR -d "$t2")
33
34Generation timestamp:
35$(date -uR -d "$t1")
36
37Submission method:
38FTP
39
40Compressed sizes in bytes:
41$(head -n2 *stats | awk '/.marc.bz2$/{print $9,$5}')
42
43Uncompressed size in bytes:
44$(head -n2 *stats | awk '/.marc$/{print $9,$5}')
45$(find -name '*.csv' -printf '%f %s\n')
46
47Number of records submitted:
48$(grep -h Filename -A5 $i *stats | awk '/.marc$/{print $3,$1}')
49
50SHA1 checksums:
51$(egrep '^[a-f0-9]{32}' *stats -h |sort -k +2)
52$(sha1sum *.csv)
53EOF