Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b6b961de13
Fetching contributors…

Cannot retrieve contributors at this time

executable file 41 lines (34 sloc) 1.032 kb
#!/bin/sh
# Review Sentences with Cloze Deletions over HTTP
# Written in 2012 by 伴上段
#
# To the extent possible under law, the author(s) have dedicated all copyright
# and related and neighboring rights to this software to the public domain
# worldwide. This software is distributed without any warranty.
#
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software. If not, see
# <http://creativecommons.org/publicdomain/zero/1.0/>.
usage() {
echo "Usage: `basename $0` [-h] deck-name-no-extension"
}
if [ $# -le 2 -a "$1" = "-h" ]; then
usage
exit 0
elif [ $# -ne 1 ]; then
usage >&2
exit 1
fi
cpipe=reviewsome.$$.command
cleanup() {
rm -f $cpipe
}
trap cleanup EXIT INT
mkfifo -m 0700 $cpipe
touch decks/$1.clozes.log
cut --complement -f 1 decks/$1.txt | ocloze | osm2 -n 30 -e 10 decks/$1.clozes.log | rubify | oboeta -2 $cpipe decks/$1.clozes.log | gawk -F' ' '
{
print $4
print $(NF-4)
system("")
}' | oboetahttp -2 -n '\"HanaMinA\", sans-serif' -i 48 >$cpipe
Jump to Line
Something went wrong with that request. Please try again.