From 932a32fec88f086bdbc179a02966e358523294f4 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 21 Jul 2016 14:57:50 +0300 Subject: add slice_pgn_moves, normalize_pgn --- .bashrc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index e986c91..c92e51b 100644 --- a/.bashrc +++ b/.bashrc @@ -347,4 +347,13 @@ runcxx() ( PYTHONSTARTUP="$HOME/.pythonrc" -alias strip_pgn_clk='sed --binary --in-place '"'"'s/ {\[%clk [[:digit:]]:[[:digit:]]\{2\}:[[:digit:]]\{2\}\]}//g'"'" +alias strip_pgn_clk='sed --binary --in-place '"'"'s/ {\[%clk [[:digit:]]\+:[[:digit:]]\+\(:[[:digit:]]\+\)*\]}//g'"'" +alias slice_pgn_moves='sed --binary --in-place '"'"'s/ \([[:digit:]]\+\.\)/\n\1/g'"'" + +normalize_pgn() { + dos2eol "$@" \ + && lint "$@" \ + && strip_pgn_clk "$@" \ + && slice_pgn_moves "$@" \ + && eol2dos "$@" +} -- cgit v1.2.3