Add a changelog
[pgp-tools.git] / gpgparticipants / gpgparticipants
1 #!/bin/sh
2 # Prepare a printable list of keysigning participants.
3 # Useful for the party organiser.
4 #
5 # $Id$
6 #
7 # License: GPLv2 or later
8 # Copyright Philippe Teuwen <phil a teuwen o org> 2008
9
10 if [ $# -ne 5 ]; then
11 cat <<EOF
12 Usage: $0 input output datestring organizer title
13 Or: $0 - output datestring organizer title
14 to read from STDIN
15 Example:
16 echo 9AD7E3DB 54C12701 |\\
17 $0 - ksp-file.txt "20080222 1100" "My Name <my.name@my.mail>" "my party 08"
18 EOF
19 exit 0
20 fi
21
22 input="$1"
23 [ "$input" = "-" ] && input="";
24 output="$2"
25 date="$3"
26 org="$4"
27 title=$(echo "$5"|tr a-z A-Z|sed 's/\(.\)/\1 /g')
28
29 exec > "$output"
30
31 # Date of event
32 LANG=C date --date="$date" +"%A, %B %e, %Y; %H:%M"
33 # Organiser contact
34 printf "%80s\n\n\n" "$org"
35 # Title
36 printf "%*s\n\n" $(((72+$(echo "$title"|wc -c))/2)) "$title"
37 # Header
38 cat <<EOF
39 List of Participants (v 1.0)
40
41
42 Here's what you have to do with this file:
43 (1) Print this file to paper.
44 (2) Compute this file's SHA256 checksum.
45 gpg --print-md sha256 $output (or use sha256sum)
46 (3) Fill in the hash values on the printout.
47 (4) Bring the printout, a pen, and proof of identity to the key signing party
48 (and be on time!).
49
50
51 SHA256 Checksum: ____ ____ ____ ____ ____ ____ ____ ____ [ ]
52
53 ____ ____ ____ ____ ____ ____ ____ ____
54
55
56 EOF
57
58 k=0;
59 for i in $(cat $input); do
60 k=$(($k+1));
61 printf "\n%03d [ ] Fingerprint OK [ ] ID OK\n" $k;
62 gpg --fingerprint $i | grep -v "^sub" | \
63 grep -v '^uid.*jpeg image of size';
64 echo "_______________________________________________________________________________"
65 done
66
67