shithub: rc

Download patch

ref: 4145dacafacbe86fa62f400d0d1f2d8daa3c3582
parent: 15f05a0ca14c062e2f718cff0af2f097c6e6d228
author: sl <sl@frank>
date: Thu Nov 6 21:21:44 EST 2025

add oktr (prior art by prahou)

--- /dev/null
+++ b/oktr
@@ -1,0 +1,24 @@
+#!/bin/rc
+# read posts from okturing.com.
+rfork e
+# br is 80 columns wide
+br='--------------------------------------------------------------------------------  '	# unicode 00a0 at the end "ensures" this line is grep-able.
+lines=10
+posts=5
+top=`{hget http://okturing.com | 
+	grep body | 
+	sed -n 3p | 
+	sed 's/^.*src\///; s/\/body" .*$//'
+}
+if(~ $top '')
+	exit
+for(i in `{seq `{echo $top - 5 | bc} $top}){
+	url=http://okturing.com/src/$i/body
+	echo $br
+	echo hget $url
+	echo
+	hget $url | 
+		awk 'NR<'^$lines^'{print; next}{ print "\n(  more  )"; exit}'	# unicode 00a0 on both sides of "more."
+	echo
+	echo
+}
--