;; add colour to logs, with encode_attr ;; Antti Pietikäinen (heidel@operamail.com) ;; 2005 /require -q help_list.tf /help_add /help_colourlog create logs with colourcodes /def -i help_colourlog=\ /echo -aB Help for coloured log creator:%;\ /echo /log -c Start logging, adding colour codes.%;\ /echo /log_view View a log with saved colours.%;\ /echo /log_view -q Same as above, don't view headers.%;\ /echo /def -ag -Fp4000 -1 -q -hCONFLICT temp_hide_conflict /def -i log=\ /test getopts("c")%;\ /if (opt_c==1) \ /def -Fp0 -aL -mregexp -t"^.+" colour_logs=\ ; /echo -agG - $$[encode_attr({*})]%;\ /echo -agG - $$[encode_ansi({*})]%;\ /else \ /if ({#}>0) \ /if (ismacro("colour_logs")) \ /undef colour_logs%;\ /endif%;\ /endif%;\ /endif%;\ /@log %{*} /def -i log_view=\ /test getopts("q")%;\ /dokey pause%;\ /if (!opt_q) \ /echo -aLGBCyellow ######## LOG STARTS #########%;\ /endif%;\ /quote -S /log_view_helper '"%{*}"%;\ /if (!opt_q) \ /echo -aLGBCyellow ######### LOG ENDS ##########%;\ /endif%;\ /dokey page /def -i log_view_helper=\ ; /result decode_attr({*}) /result decode_ansi({*})