s/mdwn/md/
This commit is contained in:
parent
32956e2591
commit
c52471444a
69
Makefile
69
Makefile
|
@ -1,69 +0,0 @@
|
|||
DESTDIR = $(HOME)/public_html
|
||||
|
||||
TEMPLATE = template.m4
|
||||
MDWNTOHTML = ./mdwntohtml $(TEMPLATE)
|
||||
|
||||
# HTML to be generated
|
||||
HTML = index.html
|
||||
|
||||
# Things to copy
|
||||
COPY += mdwntohtml $(TEMPLATE)
|
||||
COPY += face.png chumby-photo.cgi
|
||||
COPY += format.css default.css print.css
|
||||
#COPY += gitweb.cgi git-logo.png gitweb.css gitweb.conf
|
||||
COPY += portal.png portal.cgi
|
||||
COPY += g.cgi cgitrc cgit-header.html cgit.css about-filter.sh
|
||||
|
||||
# Directories in which %.mdwn generates %.html
|
||||
PLAIN = . papers poems misc
|
||||
|
||||
# Other targets for "make all"
|
||||
TARGETS = html copy
|
||||
TARGETS += $(DESTDIR)/tmp $(DESTDIR)/footer.html $(DESTDIR)/projects
|
||||
TARGETS += $(DESTDIR)/geneweb.cgi
|
||||
TARGETS += $(DESTDIR)/mp.cgi
|
||||
|
||||
all: default
|
||||
|
||||
include */*.mk
|
||||
|
||||
$(DESTDIR)/%.html: %.mdwn $(TEMPLATE)
|
||||
@mkdir -p $(dir $@)
|
||||
$(MDWNTOHTML) < $< > $@
|
||||
|
||||
$(DESTDIR)/%: %
|
||||
@mkdir -p $(dir $@)
|
||||
cp $< $@
|
||||
|
||||
$(DESTDIR)/tmp:
|
||||
mkdir -p $@
|
||||
|
||||
$(DESTDIR)/footer.html: $(TEMPLATE)
|
||||
awk '(/FOOT/) { a += 1; next; } (a == 1) { print; }' $< > $@
|
||||
|
||||
$(DESTDIR)/projects:
|
||||
ln -s $(HOME)/projects $@
|
||||
|
||||
$(DESTDIR)/geneweb.cgi: geneweb.c
|
||||
$(CC) -o $@ $<
|
||||
chmod +s $@
|
||||
|
||||
$(DESTDIR)/g.cgi: g.cgi.go
|
||||
go build -o $@ $<
|
||||
|
||||
$(DESTDIR)/mp.cgi: minepig.cgi.go
|
||||
go build -o $@ $<
|
||||
|
||||
$(DESTDIR)/%-sm.jpg: %.jpg
|
||||
jpegtopnm $< | pnmscale -xysize 600 600 | pnmtojpeg > $@
|
||||
|
||||
default: $(TARGETS)
|
||||
|
||||
MDWN = $(wildcard $(addsuffix /*.mdwn, $(PLAIN)))
|
||||
HTML += $(patsubst %.mdwn, %.html, $(MDWN))
|
||||
|
||||
html: $(addprefix $(DESTDIR)/, $(HTML))
|
||||
copy: $(addprefix $(DESTDIR)/, $(COPY))
|
||||
|
||||
clean:
|
||||
rm -rf $(wildcard $(DESTDIR)/*)
|
|
@ -1,13 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
tryexec () {
|
||||
command -v $1 >/dev/null && exec "$@"
|
||||
}
|
||||
|
||||
tryexec pandoc -f markdown -t html
|
||||
tryexec markdown
|
||||
|
||||
echo "<i>no markdown thingies found</i></p>"
|
||||
echo "<pre>"
|
||||
cat
|
||||
echo "</pre>"
|
|
@ -1,13 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Neale's git projects</title>
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/neale/default.css">
|
||||
<link rel="stylesheet" type="text/css" media="print" href="/neale/print.css">
|
||||
<link rel="stylesheet" type="text/css" href="/neale/cgit.css">
|
||||
<link rel="icon" type="image/png" href="/favicon.png">
|
||||
<link rel="start" type="text/html" href="/neale/" title="Neale Pickett">
|
||||
</head>
|
||||
|
||||
<body>
|
24
cgitrc
24
cgitrc
|
@ -1,24 +0,0 @@
|
|||
strict-export=git-daemon-export-ok
|
||||
|
||||
about-filter=/home/neale/public_html/about-filter.sh
|
||||
readme=:README.mdwn
|
||||
readme=:README.md
|
||||
readme=:README
|
||||
section-from-path=1
|
||||
|
||||
snapshots=zip tar.gz
|
||||
clone-prefix=https://woozle.org/neale/g.cgi
|
||||
scan-path=/home/neale/projects
|
||||
virtual-root=/neale/g.cgi/
|
||||
css=/neale/css/cgit.css
|
||||
favicon=/neale/face.png
|
||||
|
||||
enable-index-owner=0
|
||||
root-title=Neale's git projects
|
||||
root-desc=
|
||||
|
||||
logo=
|
||||
#embedded=1
|
||||
#noheader=1
|
||||
#header=/home/neale/public_html/tmpl/head.tmpl
|
||||
footer=/home/neale/public_html/tmpl/foot.tmpl
|
|
@ -1,33 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
randint () {
|
||||
seq $1 $2 | shuf -n 1
|
||||
}
|
||||
|
||||
crunt () {
|
||||
shuf -n 1 <<EOF
|
||||
crunt
|
||||
CRUNT
|
||||
EOF
|
||||
}
|
||||
|
||||
echo 'Content-type: text/html'
|
||||
echo
|
||||
(
|
||||
echo '<p>'
|
||||
crunts=$(randint 200 500)
|
||||
babies=$(expr \( $crunts \* 3 \) / 4)
|
||||
|
||||
while [ $crunts -gt 0 ]; do
|
||||
crunt
|
||||
crunts=$(expr $crunts - 1)
|
||||
done
|
||||
while [ $babies -gt 0 ]; do
|
||||
echo crunt
|
||||
babies=$(expr $babies - 1)
|
||||
done
|
||||
echo '<strong>CRUNT<a href="http://www.subgenius.com/bigfist/bulldada/X0033_RAELIAN.TXT.html">!</a></strong>'
|
||||
echo '</p>'
|
||||
) | m4 -DTITLE=crunt ../template.m4 -
|
|
@ -0,0 +1,31 @@
|
|||
Title: crunt
|
||||
|
||||
<span id="crunt">
|
||||
</span>
|
||||
**CRUNT**[!](http://www.subgenius.com/bigfist/bulldada/X0033_RAELIAN.TXT.html)
|
||||
|
||||
<script>
|
||||
function crunt() {
|
||||
if (Math.random() < 0.5) {
|
||||
return "CRUNT";
|
||||
} else {
|
||||
return "crunt";
|
||||
}
|
||||
}
|
||||
|
||||
function init() {
|
||||
var p = document.getElementById("crunt");
|
||||
var out = [];
|
||||
var crunts = Math.floor(Math.random() * 300) + 200;
|
||||
var babies = crunts * 3 / 4;
|
||||
|
||||
for (var i = 0; i < crunts; i += 1) {
|
||||
out.push(crunt());
|
||||
}
|
||||
for (var i = 0; i < babies; i += 1) {
|
||||
out.push("crunt");
|
||||
}
|
||||
p.textContent = out.join(" ");
|
||||
}
|
||||
window.addEventListener("load", init);
|
||||
</script>
|
Loading…
Reference in New Issue