aki-txpr-macro
aki-txpr-macro is the more easy to use libaki-*.
Features
- old style rust macro
- multi-threaded libaki-*
- minimum support rustc 1.56.1 (59eed8a2a 2021-11-01)
Examples
Example:
The pipe line text processing.
shell command:
aki-xcat -n -f "fixtures/target-list.txt" |\
aki-mline -e "gnu" |\
aki-stats -a --locale "en"
convert this to rust code:
let (next_in, handles) = pipe_line! {
(next_in, handles);
libaki_xcat "xcat" "-n" "-f" "fixtures/target-list.txt";
libaki_mline "mline" "-e" "gnu";
libaki_stats "stats" "-a" "--locale" "en";
};
the full rust example:
libaki-*
command | description |
---|---|
aki-gsub | substitude text command, replace via regex. |
aki-mcolor | mark up text with color |
aki-mcycle | mark up text with cycling color |
aki-mline | match line, regex text filter like a grep of linux command. |
aki-resort | sort lines of text. You can use regex to specify the KEY. |
aki-stats | output the statistics of text, like a wc of linux command. |
aki-unbody | output first or last n lines, like a head and tail of linux command. |
aki-xcat | concatenate files that are plain, gzip, xz and zstd. |
aki-xtee | copy standard input to each files and standard output. |
Changelogs
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.