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 42 lines (35 sloc) 1.036 kb
#!/bin/sh
# Review Cards from the Specified Deck 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 card-filter-program"
}
if [ $# -le 4 -a "$1" = "-h" ]; then
usage
exit 0
elif [ $# -ne 2 ]; then
usage >&2
exit 1
fi
cpipe=reviewsome.$$.command
cleanup() {
rm -f $cpipe
}
trap cleanup EXIT INT
mkfifo -m 0700 $cpipe
osm2 -n 30 -e 10 decks/$1.log <decks/$1.txt | rubify | oboeta -2 $cpipe decks/$1.log | awk '
{
for (n = 1; n <= NF - 5; n++) {
printf("%s\t", $n)
}
printf("%s\n", $(NF - 4))
system("")
}' | $2 | oboetahttp -2 -n '\"HanaMinA\", sans-serif' -i 48 >$cpipe
Jump to Line
Something went wrong with that request. Please try again.