aMule Bug Tracker - aMule
View Issue Details
0000856aMuleFeature Requestpublic2006-03-30 15:392006-03-30 19:33
quinox 
Kry 
normaltweakN/A
resolvedfixed 
SVN 
SVN 
0000856: Extended amulecmd with 'show log' and 'reset' command
AmuleCMD is missing 2 commands that I like to use, show log and reset (to reset the log file). It's a trivial implementation ofcourse, I've added a patch to add those commands (I used the aMule-CVS-20060327 source).

When this is implemented, IMO http://bugs.amule.org/view.php?id=339 [^] will be solved too, since this can be achieved with a simple script like this one:

--begin--

#!/bin/sh

domule() {
  amulecmd -c "$@" | grep " >"
}
domule "show log" | sed "
/: Failed to / {s/: \(.*\)/: `tput setaf 1`\1`tput sgr0`/;}
/: Finished downloading/ {s/: \(.*\)/: `tput setaf 2`\1`tput sgr0`/;}
/: Downloading / {s/: \(.*\)/: `tput setaf 3`\1`tput sgr0`/;}
"
echo ""
domule "status" | sed "
/Download:/ {s/\(Download:\)\(.*\)/\1`tput setaf 3`\2`tput sgr0`/;}
/Upload:/ {s/\(Upload:\)\(.*\)/\1`tput setaf 2`\2`tput sgr0`/;}
"
domule "reset" >/dev/null

--end--

Which will give a nice coloured output as you can see here:
http://qtea.nl/tmp/extended.amulecmd.png [^]

Thanks for all the good work you guys do ;)
No tags attached.
patch extended.amulecmd.patch (2,352) 2006-03-30 15:39
https://bugs.amule.org/file_download.php?file_id=135&type=bug
Issue History
2006-03-30 15:39quinoxNew Issue
2006-03-30 15:39quinoxFile Added: extended.amulecmd.patch
2006-03-30 19:30KryStatusnew => assigned
2006-03-30 19:30KryAssigned To => Kry
2006-03-30 19:33KryStatusassigned => resolved
2006-03-30 19:33KryFixed in Version => CVS
2006-03-30 19:33KryResolutionopen => fixed
2006-03-30 19:33KryNote Added: 0001933

Notes
(0001933)
Kry   
2006-03-30 19:33   
Aplied on both upcoming 2.1.2 and SVN.

Seems you got the EC API kinnda fast. Good work :)