Added external css configuration var and -C option
parent
f620de709c
commit
f11b3ecdee
|
@ -67,13 +67,14 @@ cwarn()
|
||||||
# configuration (note that this setup in conjunction with the below defaults
|
# configuration (note that this setup in conjunction with the below defaults
|
||||||
# imply that they can be passed in as environment variables as an alternative to
|
# imply that they can be passed in as environment variables as an alternative to
|
||||||
# options)
|
# options)
|
||||||
while getopts t:d:c:l:f:R:T: opt; do
|
while getopts t:d:c:l:f:C:R:T: opt; do
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
t) title="$OPTARG";;
|
t) title="$OPTARG";;
|
||||||
d) desc="$OPTARG";;
|
d) desc="$OPTARG";;
|
||||||
c) copyright="$OPTARG";;
|
c) copyright="$OPTARG";;
|
||||||
l) license="$OPTARG";;
|
l) license="$OPTARG";;
|
||||||
f) msgfmt="$OPTARG";;
|
f) msgfmt="$OPTARG";;
|
||||||
|
C) html_external_css="$OPTARG";;
|
||||||
R) rss_count="$OPTARG";;
|
R) rss_count="$OPTARG";;
|
||||||
T) path_tpl="$OPTARG";;
|
T) path_tpl="$OPTARG";;
|
||||||
?) exit 64;;
|
?) exit 64;;
|
||||||
|
@ -97,7 +98,7 @@ license="${license:-$( cwarn license )}"
|
||||||
msgfmt="${msgfmt:-./msgfmt}"
|
msgfmt="${msgfmt:-./msgfmt}"
|
||||||
|
|
||||||
# make configuration available to all scripts
|
# make configuration available to all scripts
|
||||||
export title desc copyright license msgfmt url_root path_tpl
|
export title desc copyright license msgfmt url_root path_tpl html_external_css
|
||||||
|
|
||||||
# clear the cachefile (TODO: we could maintain cache files from previous runs if
|
# clear the cachefile (TODO: we could maintain cache files from previous runs if
|
||||||
# we offer a flag that opts out of reprocessing previously processed commits)
|
# we offer a flag that opts out of reprocessing previously processed commits)
|
||||||
|
|
|
@ -4,6 +4,10 @@ cat <<EOF
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>$subject</title>
|
<title>$subject</title>
|
||||||
|
$( [ -n "$html_external_css" ] \
|
||||||
|
&& printf '<link rel="stylesheet" type="text/css" href="%s" />' \
|
||||||
|
"$html_external_css"
|
||||||
|
)
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
sup { font-size: 0.6em; }
|
sup { font-size: 0.6em; }
|
||||||
:target { background-color: #fce94f; }
|
:target { background-color: #fce94f; }
|
||||||
|
|
|
@ -5,6 +5,10 @@ cat <<EOH
|
||||||
<head>
|
<head>
|
||||||
<link rel="alternate" title="RSS Feed"
|
<link rel="alternate" title="RSS Feed"
|
||||||
href="rss.xml" type="application/rss+xml" />
|
href="rss.xml" type="application/rss+xml" />
|
||||||
|
$( [ -n "$html_external_css" ] \
|
||||||
|
&& printf '<link rel="stylesheet" type="text/css" href="%s" />' \
|
||||||
|
"$html_external_css"
|
||||||
|
)
|
||||||
<title>$title</title>
|
<title>$title</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
Loading…
Reference in New Issue