Moved git horror story into this repository as well as the necessary build process
This is the original article that became popular on sites like HackerNewsmaster
parent
f6f98d5ecd
commit
31e2b198cd
|
@ -1,5 +1,6 @@
|
||||||
index.html
|
index.html
|
||||||
rss.xml
|
rss.xml
|
||||||
|
www-root
|
||||||
|
|
||||||
# thoughts
|
# thoughts
|
||||||
[0-9]*/
|
[0-9]*/
|
||||||
|
|
25
Makefile
25
Makefile
|
@ -16,10 +16,15 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
##
|
##
|
||||||
|
|
||||||
.PHONY: default clean
|
# list of articles to compile
|
||||||
|
articles := $(patsubst %.txt, %.html, $(wildcard papers/*.txt))
|
||||||
|
|
||||||
|
.PHONY: default clean thoughts
|
||||||
|
|
||||||
|
|
||||||
default:
|
default: www-root
|
||||||
|
|
||||||
|
thoughts:
|
||||||
repo2html \
|
repo2html \
|
||||||
-t "Mike Gerwitz's Thoughts and Ramblings" \
|
-t "Mike Gerwitz's Thoughts and Ramblings" \
|
||||||
-d 'The miscellaneous thoughts and ramblings of a free software hacker' \
|
-d 'The miscellaneous thoughts and ramblings of a free software hacker' \
|
||||||
|
@ -29,5 +34,21 @@ default:
|
||||||
'http://mikegerwitz.com/thoughts/' \
|
'http://mikegerwitz.com/thoughts/' \
|
||||||
> index.html
|
> index.html
|
||||||
|
|
||||||
|
# all .txt articles will be compiled with asciidoc, then post-processed with the
|
||||||
|
# mgify script
|
||||||
|
%.html: %.txt
|
||||||
|
asciidoc -fasciidoc.conf -v \
|
||||||
|
-a stylesdir=$(PWD)/asciidoc-themes/ \
|
||||||
|
-a themedir=$(PWD)/asciidoc-themes/ \
|
||||||
|
$<
|
||||||
|
./tools/mgify "$@"
|
||||||
|
|
||||||
|
www-root: $(articles) thoughts
|
||||||
|
mkdir -p www-root/papers \
|
||||||
|
&& cp papers/*.html www-root/papers/ \
|
||||||
|
&& cp -r [0-9]* www-root/ \
|
||||||
|
&& cp -r images/ www-root/ \
|
||||||
|
&& ln -sf ../images www-root/papers/images
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf [0-9]*/
|
rm -rf [0-9]*/
|
||||||
|
|
|
@ -0,0 +1,86 @@
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0px 5em;
|
||||||
|
text-align: justify;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header, #footer, #footnotes {
|
||||||
|
position: relative;
|
||||||
|
left: -3em;
|
||||||
|
margin-right: -3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
body p {
|
||||||
|
line-height: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
border-bottom: 2px solid #babdb6;
|
||||||
|
left: -2em;
|
||||||
|
|
||||||
|
margin-right: -2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
border-bottom: 1px solid #babdb6;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2, h3, h4 {
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
dt {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
dd > p:first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
tt {
|
||||||
|
background-color: #eeeeec;
|
||||||
|
color: #000055;
|
||||||
|
}
|
||||||
|
|
||||||
|
#author {
|
||||||
|
font-size: 1.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listingblock {
|
||||||
|
background-color: #eeeeec;
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#gnuinside {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
top: 0px;
|
||||||
|
right: 0px;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#copyright {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: -1.4em;
|
||||||
|
font-size: small;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footnote {
|
||||||
|
font-size: small;
|
||||||
|
}
|
||||||
|
|
||||||
|
.exampleblock {
|
||||||
|
margin-left: 2em;
|
||||||
|
padding-left: 1em;
|
||||||
|
border-left: 5px solid #eeeeec;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footer {
|
||||||
|
border-top: 2px solid #babdb6;
|
||||||
|
padding-top: 0.5em;
|
||||||
|
|
||||||
|
font-size: small;
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
# Article configuration
|
||||||
|
|
||||||
|
[miscellaneous]
|
||||||
|
tabsize=4
|
||||||
|
textwidth=80
|
||||||
|
newline=\n
|
||||||
|
|
||||||
|
[attributes]
|
||||||
|
theme=mg
|
||||||
|
stylesdir=./stylesheets
|
||||||
|
linkcss=1
|
||||||
|
disable-javascript=1
|
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
|
@ -0,0 +1 @@
|
||||||
|
*.html
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,14 @@
|
||||||
|
<a href="http://mikegerwitz.com/about/inside/" id="gnuinside">
|
||||||
|
<img src="images/gnulinuxinside.png" alt="GNU/Linux Inside!" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div id="copyright">
|
||||||
|
Copyright © 2012 <a href="http://mikegerwitz.com">Mike Gerwitz</a>
|
||||||
|
<br />
|
||||||
|
Verbatim distribution of this document in its entirety is permitted, provided
|
||||||
|
that this copyright notice is preserved.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript"
|
||||||
|
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
|
||||||
|
</script>
|
|
@ -0,0 +1,36 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Alters/augments asciidoc output
|
||||||
|
#
|
||||||
|
# Copyright (C) 2012 Mike Gerwitz
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
##
|
||||||
|
|
||||||
|
file="${1?Please provide filename}"
|
||||||
|
new="$file.new"
|
||||||
|
|
||||||
|
awk '
|
||||||
|
/<\head>/ {
|
||||||
|
system( "cat tools/header.tpl" );
|
||||||
|
}
|
||||||
|
/<\/body>/ {
|
||||||
|
system( "cat tools/footer.tpl" );
|
||||||
|
}
|
||||||
|
{ print; }
|
||||||
|
' "$file" \
|
||||||
|
| sed 's/\s---\s/ \— /g' \
|
||||||
|
> "$new"
|
||||||
|
|
||||||
|
mv "$new" "$file"
|
Loading…
Reference in New Issue