omoidasu

a flashcard review system built on oboeru
git clone anongit@rnpnr.xyz:omoidasu.git
Log | Files | Refs | Feed | README | LICENSE

rubify (292B)


      1 #!/bin/sed -f
      2 
      3 # convert kanji reading pairs of the form [kanji:reading] to ruby text
      4 # ex: echo "[少女:しょうじょ]" | rubify -> <ruby>少女<rt>しょうじょ</rt></ruby>
      5 # these pairs can be produced with the furigana script
      6 
      7 s;\[\([^]:]*\):\([^]]*\)\];<ruby>\1<rt>\2</rt></ruby>;g