diff options
author | Mike Gerwitz <mike@mikegerwitz.com> | 2013-05-17 22:34:32 -0400 |
---|---|---|
committer | Mike Gerwitz <mike@mikegerwitz.com> | 2013-05-17 22:34:32 -0400 |
commit | 31e2b198cde296684e67a5ec68647d748a679886 (patch) | |
tree | 8bbc39d102b7e4a6f8fec8d5a8d6c8bb81f0d1e7 /tools | |
parent | f6f98d5ecd3118180b3cbf19cb3e75b4082470a6 (diff) | |
download | thoughts-31e2b198cde296684e67a5ec68647d748a679886.tar.gz thoughts-31e2b198cde296684e67a5ec68647d748a679886.tar.bz2 thoughts-31e2b198cde296684e67a5ec68647d748a679886.zip |
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 HackerNews
Diffstat (limited to 'tools')
-rw-r--r-- | tools/footer.tpl | 14 | ||||
-rw-r--r-- | tools/header.tpl | 0 | ||||
-rwxr-xr-x | tools/mgify | 36 |
3 files changed, 50 insertions, 0 deletions
diff --git a/tools/footer.tpl b/tools/footer.tpl new file mode 100644 index 0000000..0130e2c --- /dev/null +++ b/tools/footer.tpl @@ -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> diff --git a/tools/header.tpl b/tools/header.tpl new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tools/header.tpl diff --git a/tools/mgify b/tools/mgify new file mode 100755 index 0000000..baac030 --- /dev/null +++ b/tools/mgify @@ -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" |