summaryrefslogtreecommitdiffstats
path: root/util/bin
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2011-08-05 21:20:13 +0200
committermakefu <github@syntax-fehler.de>2011-08-05 21:20:13 +0200
commit52295eeff31fe82275d4cf7d45523706fada5566 (patch)
treea8f465ec12d5b1c53c3d196269cecf7028d922e9 /util/bin
parent20aabdf4ce7a3d6c558d135b4ae4cedd776aa82b (diff)
wiki.firstpar: initial commit of galileo
Diffstat (limited to 'util/bin')
-rwxr-xr-xutil/bin/wiki.firstpar23
1 files changed, 23 insertions, 0 deletions
diff --git a/util/bin/wiki.firstpar b/util/bin/wiki.firstpar
new file mode 100755
index 00000000..df66f707
--- /dev/null
+++ b/util/bin/wiki.firstpar
@@ -0,0 +1,23 @@
+#! /bin/sh
+set -euf
+
+A=Mozilla
+
+pwd="$(dirname "$(readlink -f "$0")")"
+
+for x in \
+ "$pwd/../../submodules/github/tmpvar" \
+ "$pwd/../../submodules/github/mikeal" \
+ "$pwd/../../submodules/github/NV" \
+ "$pwd/../../submodules/github/tautologistics" \
+; do
+ export NODE_PATH="`readlink -f "$x"`${NODE_PATH+:$NODE_PATH}"
+done
+
+# ensure query is ready
+#(cd "$pwd/../.." && git submodule update --init)
+
+query() {
+ node "$(readlink -f "$pwd/../../submodules/github/visionmedia/query")" "$@"
+}
+curl -sS -A "\${A-Mozilla}" "$1" | query 'p' 'first' | w3m -T text/html -dump