plint

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

make.sh (1738B)


      1 #!/bin/bash
      2 
      3 french-conjugator --all-infinitives | grep 'ier$' > verbs_ier
      4 tr '\n' '\0' < verbs_ier | xargs -0 french-conjugator --mode=indicative,imperative |
      5   tr ',' '\n' | sed 's/^ *//;s/ *$//' | grep 'ions$' | sort | uniq > verbs_ier_ions
      6 tr '\n' '\0' < verbs_ier | xargs -0 french-conjugator --mode=indicative,imperative |
      7   tr ',' '\n' | sed 's/^ *//;s/ *$//' | grep 'iez$' | sort | uniq > verbs_ier_iez
      8 tr '\n' '\0' < verbs_ier | xargs -0 french-conjugator --mode=subjunctive --tense=present |
      9   tr ',' '\n' | sed 's/^ *//;s/ *$//' | grep 'ions$' | sort | uniq > verbs_ier_subj_ions
     10 tr '\n' '\0' < verbs_ier | xargs -0 french-conjugator --mode=subjunctive --tense=present |
     11   tr ',' '\n' | sed 's/^ *//;s/ *$//' | grep 'iez$' | sort | uniq > verbs_ier_subj_iez
     12 cat verbs_ier_ions verbs_ier_iez verbs_ier_subj_ions verbs_ier_subj_iez > final_diaeresis
     13 
     14 french-conjugator --all-infinitives | grep -v 'ier$' | tr '\n' '\0' |
     15   xargs -0 french-conjugator | tr ',' '\n' | sed 's/^ *//;s/ *$//' | grep -E 'iez$|ions$' |
     16   ./diaeresis_verbs.py | grep '^2 ' | cut -d' ' -f2 >> final_diaeresis
     17 cat final_diaeresis | sort | uniq | sponge final_diaeresis
     18 
     19 cat final_diaeresis | grep 'ions$' | sed 's/$/-nous/' > add
     20 cat final_diaeresis | grep 'iez$' | sed 's/$/-vous/' >> add
     21 cat final_diaeresis add | sponge final_diaeresis
     22 
     23 french-conjugator --all-infinitives | grep -v 'ier$' | tr '\n' '\0' |
     24   xargs -0 french-conjugator | tr ',' '\n' | sed 's/^ *//;s/ *$//' | grep -E 'iez$|ions$' |
     25   ./diaeresis_verbs.py | grep '^1 ' | cut -d' ' -f2 | sort | uniq > final_syneresis
     26 cat final_syneresis | grep 'ions$' | sed 's/$/-nous/' > add
     27 cat final_syneresis | grep 'iez$' | sed 's/$/-vous/' >> add
     28 cat final_syneresis add | sponge final_syneresis