TLFi-light

Le Trésor de la Langue Française informatisé dans votre terminal - retour accueil

git clone git://bebou.netlib.re/TLFi-light
Log | Files | Refs |

parseword (927B)


      1 #! /bin/sh
      2 
      3 dom="\x1b[91m"
      4 def="\x1b[93m"
      5 synt="\x1b[92m"
      6 cit="\x1b[94m"
      7 ital="\x1b[3m"
      8 empl="\x1b[95m"
      9 syn="\x1b[36m"
     10 autre="\x1b[96m"
     11 norm="\x1b[0m"
     12 cat |
     13 	sed -n '/vtoolbar/,$ p' |
     14 	sed -E "s,<span class=\"tlf_cdomaine\">,$dom,g;
     15 	     s,<span class=\"tlf_cdefinition\">,\n$def,g;
     16 	     s,<span class=\"tlf_cplan\">,\n\
     17 \n,g;
     18 	     s,<span class=\"tlf_csyntagme\">,\n$synt,g;
     19 	     s,<span class=\"tlf_cemploi\">,$empl,g;
     20 	     s,<span class=\"tlf_cmot\">,\n$autre,g;
     21 	     s,<span class=\"tlf_csynonime\">,\n$syn,g;
     22 	     s,<span class=\"tlf_ccode\">,$norm,g;
     23 	     s,<div class=\"tlf_parsynt\">,\n\
     24 \n$synt,g;
     25 	     s,<div class=\"tlf_(tabulation|parothers)\">,$norm\n\
     26  \n	,g;
     27 		 s,<div class=\"tlf_paraputir\">,\n\
     28 \n,g;
     29 		 s,<span class=\"tlf_cexemple\">,$norm$ital,g;" |
     30 	sed -E "s,<[^>]*>,,g;" |
     31 	sed -E "s#\([^)]*p\. [0-9]+\)#\n$cit&$norm#g" |
     32 	sed -zE "s,\n\n,\n$norm\n,g" |
     33 	sed -E 's,^ +, ,' |
     34 	grep -v '^	**$'
     35