add quotation mark in add_header HSTS directive
[ach-master.git] / src / gitsetinfo.sty
1 % gitsetinfo.sty   
2 % Copyright 2011 Brent Longborough
3 %
4 % This work may be distributed and/or modified under the
5 % conditions of the LaTeX Project Public License, either version 1.3
6 % of this license or (at your option) any later version.
7 % The latest version of this license is in
8 %   http://www.latex-project.org/lppl.txt
9 % and version 1.3 or later is part of all distributions of LaTeX
10 % version 2005/12/01 or later.
11 %
12 % This work has the LPPL maintenance status `maintained'.
13 % The Current Maintainer of this work is Brent Longborough.
14 %
15 % This work consists of these files: 
16 %     gitinfo.sty, gitsetinfo.sty, gitinfo.tex, gitinfo.pdf,
17 %     post-git-sample.txt, and gitHeadInfo.gin
18 % -----------------------------------------------------
19 \NeedsTeXFormat{LaTeX2e}
20 \ProvidesPackage{gitsetinfo}[2011/08/10 v1.00 Auxiliary package for gitinfo]
21 \RequirePackage{kvoptions}
22 \RequirePackage{xstring}
23 \RequirePackage{etoolbox}
24 \SetupKeyvalOptions{%
25         family=gitinfo,
26         prefix=gitInf@
27         }
28 \DeclareStringOption{shash}
29 \DeclareStringOption{lhash}
30 \DeclareStringOption{authname}
31 \DeclareStringOption{authemail}
32 \DeclareStringOption{authsdate}
33 \DeclareStringOption{authidate}
34 \DeclareStringOption{authudate}
35 \DeclareStringOption{commname}
36 \DeclareStringOption{commemail}
37 \DeclareStringOption{commsdate}
38 \DeclareStringOption{commidate}
39 \DeclareStringOption{commudate}
40 \DeclareStringOption{refnames}
41 \ProcessKeyvalOptions*
42 \renewcommand{\gitAbbrevHash}{\gitInf@shash}
43 \renewcommand{\gitHash}{\gitInf@lhash}
44 \renewcommand{\gitAuthorName}{\gitInf@authname}
45 \renewcommand{\gitAuthorEmail}{\gitInf@authemail}
46 \renewcommand{\gitAuthorDate}{\gitInf@authsdate}
47 \renewcommand{\gitAuthorIsoDate}{\gitInf@authidate}
48 \renewcommand{\gitAuthorUnixDate}{\gitInf@authudate}
49 \renewcommand{\gitCommitterName}{\gitInf@commname}
50 \renewcommand{\gitCommitterEmail}{\gitInf@commemail}
51 \renewcommand{\gitCommitterDate}{\gitInf@commsdate}
52 \renewcommand{\gitCommitterIsoDate}{\gitInf@commidate}
53 \renewcommand{\gitCommitterUnixDate}{\gitInf@commudate}
54 \renewcommand{\gitReferences}{\gitInf@refnames}
55 \newcommand{\git@vtag}[1]{%
56         \def\do##1{%
57                 \IfDecimal{##1}{%
58                         \renewcommand{\gitVtag}{##1}
59                         \renewcommand{\gitVtags}{\space##1}
60                         \renewcommand{\gitVtagn}{\space##1}
61                         \listbreak
62                 }{}%
63         }%
64         \expandafter\docsvlist\expandafter{#1}%
65 }%
66 \git@vtag{\gitInf@refnames}