diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-07-21 14:57:50 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-07-21 14:57:50 +0300 |
commit | 932a32fec88f086bdbc179a02966e358523294f4 (patch) | |
tree | 019566465fbded8bd9497b80c9953b810b4457da | |
parent | spawn_ssh_agent: bugfix (diff) | |
download | linux-home-932a32fec88f086bdbc179a02966e358523294f4.tar.gz linux-home-932a32fec88f086bdbc179a02966e358523294f4.zip |
add slice_pgn_moves, normalize_pgn
-rw-r--r-- | .bashrc | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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 "$@" +} |