plint

French poetry validator (local mirror of https://gitlab.com/a3nm/plint)
git clone https://a3nm.net/git/plint/
Log | Files | Refs | README

onepass.sh (670B)


      1 #!/bin/bash
      2 
      3 # read current diaeresis file as $2 and take unique prefix as $1
      4 # produce on stdout new diaeresis file
      5 
      6 cd "$( dirname "$0" )"
      7 NUM="$1"
      8 DFILE="$2"
      9 shift
     10 shift
     11 
     12 mkdir -p contexts
     13 
     14 # use the verb diaeresis files if they exist
     15 if [ -f diaeresis_verbs/final_syneresis -a -f diaeresis_verbs/final_diaeresis ]
     16 then
     17   cp final_syneresis.ctx "contexts/final_syneresis.$NUM"
     18   cp final_diaeresis.ctx "contexts/final_diaeresis.$NUM"
     19 fi
     20 
     21 for f in "$@"
     22 do
     23   DEST=$(echo "contexts/$f.$NUM" | sed 's!/\.\.!!g')
     24   ./plint.py plint/test_data/$f.tpl $DFILE "$DEST" < plint/test_data/$f
     25 done
     26 cat contexts/* | ./haspirater/buildtrie_list.py |
     27   ./haspirater/compresstrie.py
     28