[NEW] scripts: They make the Makefile go
This commit is contained in:
parent
b3fad81506
commit
f6b1f4c14a
3 changed files with 33 additions and 0 deletions
23
scripts/blogposts.bash
Executable file
23
scripts/blogposts.bash
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cat <<HDR
|
||||
<div class="inner">
|
||||
<h1>Posts</h1>
|
||||
<dl> <!-- no longer me -->
|
||||
HDR
|
||||
|
||||
for blog_post_md in blog/*.md; do
|
||||
date=$(grep -o '[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}' <<<"$blog_post_md")
|
||||
title=$(grep -m 1 '^#\s\+' "$blog_post_md" | sed 's/^#\s\+//')
|
||||
html=$(sed 's/\.md$/.html/' <<<"$blog_post_md")
|
||||
|
||||
cat <<INNIE
|
||||
<dt>$date</dt>
|
||||
<dd><a href="$html">$title</a></dd>
|
||||
INNIE
|
||||
done
|
||||
|
||||
cat <<FTR # Short for Fetterman
|
||||
</dl> <!-- no longer on the dl -->
|
||||
</div>
|
||||
FTR
|
||||
2
scripts/htmlify.bash
Executable file
2
scripts/htmlify.bash
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
sed 's/\.md$/.html/' <<<"$1"
|
||||
8
scripts/indicators
Executable file
8
scripts/indicators
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
pushd blog
|
||||
for post in *.md; do
|
||||
ind_name=$(sed 's/\.md$/.indicator.html/' <<<"$post")
|
||||
[ ! -a "$ind_name" ] && ln -s ../blog.indicator.html "$ind_name"
|
||||
done
|
||||
popd # blog
|
||||
Loading…
Add table
Add a link
Reference in a new issue