shithub: sm2

Download patch

ref: 7e56d77f4005978687e33578e6617aaba86df429
parent: 0ea3a509c0d04c8198c1639ff7d3e606bb54a3f3
author: qwx <[email protected]>
date: Thu Jan 9 10:21:54 EST 2020

add helper scripts

sm2: s&m2 shortcut with standard db files
sm2cinadd: generate new entries for additions to db
sm2ger: add part of a list of words to db

--- /dev/null
+++ b/sm2
@@ -1,0 +1,5 @@
+#!/bin/rc -e
+rfork n
+truetypefs
+font=/n/ttf/unifont.ttf.16/font
+'s&m2' db0 > db1
--- /dev/null
+++ b/sm2cinadd
@@ -1,0 +1,3 @@
+#!/bin/rc
+diff <{ls *.pdf | sort} <{awk '{print $5}' db0 | sort} ||
+	sed -n '/^[0-9]/d;s/< /2.5 0 0 0 /p'
--- /dev/null
+++ b/sm2ger
@@ -1,0 +1,7 @@
+#!/bin/rc -e
+shl <db | sed 10q >>db0
+grep -v `"{awk '{print $5}' db0 | tr '
+' '|' | sed 's/\|$//;s/\|/\| /g;s/^/ /'} db >db00
+mv db00 db
+'s&m2' db0 >db1
+cp db1 db0