summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--Makefile17
-rwxr-xr-xbibtotxt.sh2
-rw-r--r--includes/writingheader.txt3
-rw-r--r--index.txt4
-rwxr-xr-xlistarticles.sh29
-rwxr-xr-xmakerss.sh5
-rw-r--r--writing/consent.txt (renamed from pubs/consent.txt)0
-rw-r--r--writing/copyme.txt (renamed from pubs/copyme.txt)0
-rw-r--r--writing/index.ttl (renamed from pubs/index.ttl)0
-rw-r--r--writing/makevideo.txt4
-rw-r--r--writing/unburn.txt (renamed from articles/unburn.txt)0
12 files changed, 51 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore
index 7749a74..b7f6ddd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,8 +3,7 @@
*.gz
*.tex
index.ttl
-pubs/index.txt
-pubs/*.pdf
-articles/index.txt
+writing/index.txt
+writing/*.pdf
!includes/*.xml
diff --git a/Makefile b/Makefile
index 112e96c..46d70b1 100644
--- a/Makefile
+++ b/Makefile
@@ -6,11 +6,10 @@ MD=smu
MDTEX=/home/nick/src/misc/smu/smu
RSS=index.ttl
-BIB=pubs/index.ttl
-BIBTXT=pubs/index.txt
+BIB=writing/index.ttl
+BIBTXT=writing/index.txt
PAGES=$(shell find . -name '*.txt' ! -name 'robots.txt' ! -name $(RSS)) $(BIBTXT)
-PUBS=$(shell find ./pubs/ -name '*.txt' ! -name 'index.*')
-ARTS=$(shell find ./articles/ -name '*.txt' ! -name 'index.*')
+WRITING=$(shell find ./writing/ -name '*.txt' ! -name 'index.*')
EXTRAS=$(shell find . -name '*.css') card.ttl
TARGETS=$(PAGES:.txt=.html) $(RSS) $(BIBTXT)
GZIP=$(PAGES:=.gz) $(TARGETS:=.gz) $(EXTRAS:=.gz) $(BIB:=.gz)
@@ -47,13 +46,11 @@ $(RSS): $(PAGES)
echo making $@
sh makerss.sh $(SITENAME) $(FOAF) $* > $@
-pubs/index.txt: $(BIB)
+writing/index.txt: $(BIB) $(WRITING)
echo making $@
- sh bibtotxt.sh $< > $@
-
-articles/index.txt: $(ARTS)
- echo making $@
- sh dirindex.sh articles > $@
+ cat includes/writingheader.txt > $@
+ sh bibtotxt.sh $(BIB) >> $@
+ sh listarticles.sh writing $(BIB) >> $@
clean:
rm -f -- $(TARGETS) $(GZIP)
diff --git a/bibtotxt.sh b/bibtotxt.sh
index 1c53ce4..6b10d38 100755
--- a/bibtotxt.sh
+++ b/bibtotxt.sh
@@ -2,7 +2,7 @@
rdf="$1"
-echo "Publications"
+echo "Academic Publications"
echo "-----------------------------------------------------------------------"
echo ""
diff --git a/includes/writingheader.txt b/includes/writingheader.txt
new file mode 100644
index 0000000..43d62c0
--- /dev/null
+++ b/includes/writingheader.txt
@@ -0,0 +1,3 @@
+Writing
+=======================================================================
+
diff --git a/index.txt b/index.txt
index e728e8b..2f1c3ba 100644
--- a/index.txt
+++ b/index.txt
@@ -11,9 +11,9 @@ involved with.
I am currently employed as a web developer, and also do some freelance
work. There is more information here on the services I can offer.
-[Publications](pubs/)
+[Writing](writing/)
-----------------------------------------------------------------------
-Articles I've written which have been published.
+Articles I've written, both academic and less so.
[Contact](contact)
-----------------------------------------------------------------------
diff --git a/listarticles.sh b/listarticles.sh
new file mode 100755
index 0000000..5184511
--- /dev/null
+++ b/listarticles.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+pubttl=$2
+
+for a in `sed -e '/^[^<]/d' -e '/^$/d' -e '/bibo:Article/!d' -e 's/^<//' -e 's/>.*$//' -e 's/.*\///' < $pubttl`; do
+ test -n "$expubs" && expubs="$expubs "
+ expubs="$expubs! -name '$a.*'"
+done
+
+echo ""
+echo "Other Articles"
+echo "-----------------------------------------------------------------------"
+echo ""
+
+# list of files sorted by modtime - eval used so quotes don't get lost
+eval "find $1 -type f -name '*.txt' ! -name 'index.*' $expubs -printf '%T@ %p\n'" \
+| sort -r -n | awk '{print $2}' | while read f; do
+ reluri=`echo $f | sed 's/.*\/\([^\/]*\)\.txt/\1/'`
+ title=`sed -e 's/# //' -e 1q < $f`
+
+ echo -n "- [$title]($reluri)"
+ if test `grep -c '^### ' < $f` -ne 0; then
+ subtitle=`sed -e 's/### //' -e 4q < $f | tail -n 1`
+ echo -n ": $subtitle"
+ fi
+ echo ""
+done
+
+exit 0
diff --git a/makerss.sh b/makerss.sh
index f387ec2..ad51847 100755
--- a/makerss.sh
+++ b/makerss.sh
@@ -4,8 +4,9 @@
[[ "$1" ]] && siteurl="$1" || siteurl=""
[[ "$2" ]] && creator="$2" || creator=""
+# TODO: rewrite items to exclude things in writing/index.ttl, and later just append the content of that
items=`find . -name '*.txt' ! -name 'robots.txt' ! -path '*/pubs/2*' | sed -e 's/^\.//g' -e 's/\.txt$//g'`
-pubs=`find ./pubs -name '2*.txt' | sed -e 's/^\.//g' -e 's/\.txt$//g'`
+pubs=`find ./writing -name '2*.txt' | sed -e 's/^\.//g' -e 's/\.txt$//g'`
title=`head -n 1 index.txt`
cat << EOF
@@ -43,4 +44,4 @@ for item in $items; do
EOF
done;
-sed -e '/^@/d' -e "s|http://njw.me.uk|${siteurl}|g" < pubs/index.ttl
+sed -e '/^@/d' -e "s|http://njw.me.uk|${siteurl}|g" < writing/index.ttl
diff --git a/pubs/consent.txt b/writing/consent.txt
index dd93d19..dd93d19 100644
--- a/pubs/consent.txt
+++ b/writing/consent.txt
diff --git a/pubs/copyme.txt b/writing/copyme.txt
index aef4cc4..aef4cc4 100644
--- a/pubs/copyme.txt
+++ b/writing/copyme.txt
diff --git a/pubs/index.ttl b/writing/index.ttl
index 889fa28..889fa28 100644
--- a/pubs/index.ttl
+++ b/writing/index.ttl
diff --git a/writing/makevideo.txt b/writing/makevideo.txt
new file mode 100644
index 0000000..3f882c0
--- /dev/null
+++ b/writing/makevideo.txt
@@ -0,0 +1,4 @@
+make video
+=======================================================================
+
+### Video editing using make, ffmpeg and imagemagick
diff --git a/articles/unburn.txt b/writing/unburn.txt
index 9fdd9ab..9fdd9ab 100644
--- a/articles/unburn.txt
+++ b/writing/unburn.txt