Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/awk -f
- BEGIN {
- FS = " ";
- module = "";
- }
- /^\** Module .*$/ {
- module = $3;
- FS = ": *";
- gsub (/\./, "/", module);
- module = module ".py";
- }
- /^[CWEF]: *[0-9]+,[0-9]+/ {
- split ($2, tokens, ",");
- line_num = tokens[1];
- print $0
- system ("source-highlight --line-range=" (line_num - 1) \
- "-" (line_num + 1) " --failsafe -f esc " \
- "--style-file=esc.style -s python -n -i " module);
- print "";
- next;
- }
- {
- print;
- }
Advertisement
Add Comment
Please, Sign In to add comment