Commit | Line | Data |
---|---|---|
8ec81273 RJ |
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 | cat <<EOF | |
14 | Date: $(date -uR) | |
15 | From: "Robin H. Johnson" <rjohnson@sitka.bclibraries.ca> | |
16 | Subject: SITKA Outlook export $(date +%Y/%m/%d -d "$t1") (includes ELN media/serials) | |
41dcdd04 | 17 | To: Martin Mari <Mari.Martin@gov.bc.ca>, Ramiro Castillo <rcr@auto-graphics.com>, Heather Morrison <heatherm@eln.bc.ca> |
8ec81273 RJ |
18 | Cc: "Robin H. Johnson" <rjohnson@sitka.bclibraries.ca>, Ben Hyman <ben.hyman@cooperative.bclibraries.ca>, sherbert@sitka.bclibraries.ca |
19 | ||
20 | Full automated Outlook export | |
21 | ||
d7c04662 RJ |
22 | Please remember to review the shortcodes*csv file for any new shortcodes. |
23 | ||
8ec81273 | 24 | Notes: |
d7c04662 | 25 | (none, this was automated) |
8ec81273 RJ |
26 | |
27 | Directory for uploads: | |
804191d8 | 28 | sitka/$T |
8ec81273 RJ |
29 | |
30 | Submission timestamp: | |
31 | $(date -uR -d "$t2") | |
32 | ||
33 | Generation timestamp: | |
34 | $(date -uR -d "$t1") | |
35 | ||
36 | Submission method: | |
37 | FTP | |
38 | ||
39 | Compressed sizes in bytes: | |
40 | $(head -n2 *stats | awk '/.marc.bz2$/{print $9,$5}') | |
41 | ||
42 | Uncompressed size in bytes: | |
43 | $(head -n2 *stats | awk '/.marc$/{print $9,$5}') | |
44 | $(find -name '*.csv' -printf '%f %s\n') | |
45 | ||
46 | Number of records submitted: | |
47 | $(grep -h Filename -A5 $i *stats | awk '/.marc$/{print $3,$1}') | |
48 | ||
49 | SHA1 checksums: | |
50 | $(egrep '^[a-f0-9]{32}' *stats -h |sort -k +2) | |
51 | $(sha1sum *.csv) | |
52 | EOF |