shithub: oktreader

Download patch

ref: 90570d39b831350087a58bb8068be8245c10794c
parent: 2297c0a88d80c890d813ee0b7ebfef8408630cee
author: glenda <glenda@ship.of.the.fools>
date: Wed Nov 5 05:21:45 EST 2025

patch to print "file is longer than preview"

--- a/oktr
+++ b/oktr
@@ -2,8 +2,8 @@
 # ok, turing. reader
 rfork e
 
-slp = .5
-prev = 5 # preview lines 
+#slp = .5
+#prev = 5 # preview lines 
 posts = 1
 inp = 0
 
@@ -25,11 +25,9 @@
  echo $url
  echo
 
- hget `{echo $i | awk -F'"' '{print $2}' } | sed $prev^q
- # if ^ is longer than $prev lines - print "there is more"
- # i dont want to hget the url twice though and i dont want to save it locally
+ url = `{echo $i | awk -F'"' '{print $2}' }
+ hget $url | awk 'NR<6{print; next}{ print "\n(.. there is more.)"; exit}'
  echo
- echo ( ... there may be more)
 }
 
 echo ... load more? q - quit, anything else cont.
--