vcards: New scripts to help printing vcards
authorWerner Koch <wk@gnupg.org>
Tue, 8 Dec 2015 07:25:14 +0000 (08:25 +0100)
committerWerner Koch <wk@gnupg.org>
Tue, 8 Dec 2015 09:51:17 +0000 (10:51 +0100)
misc/vcards/.gitignore [new file with mode: 0644]
misc/vcards/data.sample [new file with mode: 0644]
misc/vcards/g10-orig-logo.pdf [new file with mode: 0644]
misc/vcards/gnupg-logo.pdf [new file with mode: 0644]
misc/vcards/vcard-template.tex [new file with mode: 0644]

diff --git a/misc/vcards/.gitignore b/misc/vcards/.gitignore
new file mode 100644 (file)
index 0000000..70c6534
--- /dev/null
@@ -0,0 +1,3 @@
+x-qr-*.eps
+x-qr-*.pdf
+vcard.*
diff --git a/misc/vcards/data.sample b/misc/vcards/data.sample
new file mode 100644 (file)
index 0000000..7890a65
--- /dev/null
@@ -0,0 +1,58 @@
+# Data for use with vcard-template.tex
+
+
+Type: gpg
+Name: Werner Koch
+Title:
+Mail:
+Jabber:
+Ptype: m
+Phone:
+Fpr: 8061 5870 F5BA D690 3336  86D0 F2AD 85AC 1E42 B367
+
+Type: g10
+Name: Werner Koch
+Title:
+Mail:
+Jabber:
+Ptype: p
+Phone:
+Fpr: 8061 5870 F5BA D690 3336  86D0 F2AD 85AC 1E42 B367
+
+Type: gpg
+Name: David Shaw
+Mail:
+Fpr:  7D92 FD31 3AB6 F373 4CC5  9CA1 DB69 8D71 9924 2560
+
+Type: gpg
+Name: Niibe Yutaka
+Mail:
+Fpr:  1241 24BD 3B48 62AF 7A0A  42F1 00B4 5EBD 4CA7 BABE
+
+Type: gpg
+Name: Jussi Kivilinna
+Mail:
+Fpr:  60C7 E68E 6964 603F B163  6E47 068B FB23 A931 6686
+
+Type: gpg
+Name: Neal H. Walfield
+Mail:
+Fpr:  8F17 7771 18A3 3DDA 9BA4  8E62 AACB 3243 6300 52D9
+
+Type: gpg
+Name: Kai Michaelis
+Mail:
+Fpr:
+
+Type: gpg
+Name: Justus Winter
+Mail:
+Fpr:
+
+Type: gpg
+Name: Andre Heinecke
+Mail:
+Fpr:
+
+
+# eof
diff --git a/misc/vcards/g10-orig-logo.pdf b/misc/vcards/g10-orig-logo.pdf
new file mode 100644 (file)
index 0000000..9a73163
Binary files /dev/null and b/misc/vcards/g10-orig-logo.pdf differ
diff --git a/misc/vcards/gnupg-logo.pdf b/misc/vcards/gnupg-logo.pdf
new file mode 100644 (file)
index 0000000..a2aab4a
Binary files /dev/null and b/misc/vcards/gnupg-logo.pdf differ
diff --git a/misc/vcards/vcard-template.tex b/misc/vcards/vcard-template.tex
new file mode 100644 (file)
index 0000000..e39ef6b
--- /dev/null
@@ -0,0 +1,126 @@
+%%%%
+%
+% GnuPG visiting cards for use with ticket.sty
+%
+% Use these commands to create a PDF:
+%
+%  addrutil -T vcard-template.tex data >vcard.tex
+%  pdflatex -shell-escape vcard.tex
+%
+% addrutil is available at
+%  http://git.gnupg.org/cgi-bin/gitweb.cgi?p=wk-misc.git;a=blob;f=addrutil.c
+%%
+%%%%
+% use the corresponding paper size for your ticket definition
+\documentclass[a4paper,10pt]{letter}
+
+% load ticket.sty with the appropriate ticket definition
+\usepackage[crossmark]{ticket}
+
+% load misc stuff
+\usepackage{graphicx}
+\usepackage{ifthen}
+\usepackage{xcolor}
+\usepackage{intcalc}
+
+%%
+%% ticket for "Zweckform 32010"
+%% pre-cutted visiting cards
+%%
+\unitlength=1mm
+
+%% Adjust for your printer:
+\hoffset=-10mm
+\voffset=-20mm
+
+\ticketNumbers{2}{5}
+
+\ticketSize{85}{54}     % in unitlength
+\ticketDistance{9.8}{0} %in unitlength
+
+
+% define something
+\definecolor{logo}{HTML}{0093DD}
+
+
+% make your default ticket. \ticketdefault is somewhat like a background
+% here it is empty, because we use different tickets for the front an
+% the back of our card
+\renewcommand{\ticketdefault}{%
+}
+
+
+% now what do you like to put in your ticket
+\newcommand{\vcardfront}[8]{\ticket{%
+  \ifthenelse{\equal{#1}{g10}}{
+    \put(49, 31){\includegraphics[width=35mm,angle=0,origin=bl]{g10-orig-logo}}
+    \put( 6, 27){\small g10$^{code}$ GmbH}
+    \put( 6, 23){\small www.g10code.com}
+  }{
+    \put(44, 37){\includegraphics[width=35mm,angle=0,origin=bl]{gnupg-logo}}
+    \put( 6, 27){\small The GnuPG Project}
+    \put( 6, 23){\small www.gnupg.org}
+  }
+    \put( 6, 37){\bfseries #2}
+    \put( 6, 33){\small #3}
+  \ifthenelse{\equal{#6}{}}{}{
+    \put( 6, 17){\small \ifthenelse{\equal{#6}{m}}{mobile}{phone}}
+    \put(16, 17){\small #7}
+  }
+  \ifthenelse{\equal{#5}{}}{}{
+    \put( 6, 13){\small xmpp}
+    \put(16, 13){\small \texttt{#5}}
+  }
+  \ifthenelse{\equal{#4}{}}{}{
+    \put( 6,  9){\small mail}
+    \put(16,  9){\small \texttt{#4}}
+  }
+    \put( 6,  5){\footnotesize \texttt{#8}}
+}}
+
+\newcommand{\vcardback}[3]{\ticket{%
+ \immediate\write18{/bin/echo https://k.gnupg.net/#3|tr -d ' '|qrencode -tEPS -o x-qr-#1.eps}
+ \put(3.35, 27){\includegraphics[width=25mm,angle=0,origin=bl]{x-qr-#1.eps}}
+ \put( 6,27){\texttt{\tiny{}#2}}
+
+ \put( 6,25){\color{logo}\line(1,0){73.5}}
+ \put( 6,21){\scriptsize{}GnuPG software is signed by at least one of
+these keys:}
+ \put( 6,17){\texttt{\footnotesize D869 2123 C406 5DEA 5E0F 3AB5 249B 39D2 4F25 E3B6}}
+ \put( 6,13){\texttt{\footnotesize 46CC 7308 65BB 5C78 EBAB  ADCF 0437 6F3E E085 6959}}
+ \put( 6, 9){\texttt{\footnotesize 031E C253 6E58 0D8E A286  A9F2 2071 B08A 33BD 3F06}}
+ \put( 6, 5){\texttt{\footnotesize D238 EA65 D64C 67ED 4C30  73F2 8A86 1B1C 7EFD 60D9}}
+}}
+
+
+\newcounter{numcards}
+\begin{document}
+\sffamily
+
+\setcounter{numcards}{0}
+% @@begin-record-block@@
+\vcardfront{@@Type@@}
+           {@@Name@@}
+           {@@Title@@}
+           {@@Mail@@}
+           {@@Jabber@@}
+           {@@PType@@}
+           {@@Phone@@}
+           {@@Fpr@@}
+\stepcounter{numcards}
+% @@next-record-rewind@@
+
+\ifthenelse{\intcalcMod{\value{numcards}}{10} > 0}{%
+  \newpage
+}{}
+
+\oddsidemargin=113.4pt
+\backside%
+\setcounter{numcards}{0}
+% @@begin-record-block@@
+\vcardback{@@_recno@@}{@@Mail@@}{@@Fpr@@}
+\stepcounter{numcards}
+% @@next-record@@
+
+
+\end{document}