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