Log in Color
How to activate the log in color as it was before the api update?
The colors have been stripped. There is no easy toggle at the moment.
Why was the color removed in the first place?
It's somewhere in https://github.com/keyphact/pgoapi right?
No. It isn't in the pgoapi, and there is no easy way to turn it in.
They stripped the color before the change if I recall then the API changed. It's sort of a mess right now compared to before. I don't know if they plan to move this info to the map or not. The old map you could just drop clones of folders with different configs for different bots and open each index to see where they were at. They changed that as well so I haven't bothered to look again.
I do miss that color coding as I run multiple monitors so if I'm walking by or happen to be at the desk I know exactly what's going and if things are running correctly. I'll have to look and see if the map is any good like before.
It is such a mess right now without colors... Please somebody bring them back
+1 I favor the colors as well! Much easier to read back
Quick and dirty fix: Save this as colorizer.sh in the PokemonGo-Bot directory:
#!/bin/bash
red=$(tput bold;tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput bold;tput setaf 3)
fawn=$(tput setaf 3)
blue=$(tput bold;tput setaf 4)
purple=$(tput setaf 5)
pink=$(tput bold;tput setaf 5)
cyan=$(tput bold;tput setaf 6)
gray=$(tput setaf 7)
white=$(tput bold;tput setaf 7)
normal=$(tput sgr0)
sep=`echo -e '\001'` # use \001 as a separator instead of '/'
while [ -n "$1" ] ; do
color=${!1}
pattern="$2"
shift 2
rules="$rules;s$sep\($pattern\)$sep$color\1$normal${sep}g"
done
#stdbuf -o0 -i0 sed -u -e "$rules"
sed -u -e "$rules"
(from https://stackoverflow.com/questions/241325/color-regex-matches-without-dropping-misses)
Then run something like this:
python pokecli.py 2>&1 | ./colorizer.sh red ".*PokemonCatchWorker.*" blue ".*TransferPokemon.*" green ".*IncubateEggs.*" yellow ".*SpinFort.*" pink ".*CollectLevelUpReward.*"
Then run something like this: python pokecli.py 2>&1 | ./colorizer.sh red ".PokemonCatchWorker." blue ".TransferPokemon." green ".IncubateEggs." yellow ".SpinFort." pink ".CollectLevelUpReward."
If you're using Mac you may need to install gnu-sed using brew.
Then you must change sed -u -e "$rules" to gsed -u -e "$rules"
anyone know how to do this in windows?
python pokecli.py 2>&1 | ./colorizer.sh red ".*PokemonCatchWorker.*" blue ".*TransferPokemon.*" green ".*IncubateEggs.*" yellow ".*SpinFort.*" pink ".*CollectLevelUpReward.*"
end up giving an error
That script works only on *nix systems. You might want to have a look at Cygwin, which gives you a unix style terminal under Windows. edit: or if you used Git for Windows to clone this repo, you can just as well use the MINGW64 shell that comes with it - which is what I'm doing.
@nikmess works perfectly with Git for Windows! I was previously attempting to run the line from Windows command line.
Thank you for your help!
@nikmess Using your script I donc have any stats when session end :/
It seems the problem is not (only?) my script, but rather the mingw shell. Killing "python pokecli.py" with ^c gives no stats either in mingw.
@serberus7 not working for Windows 10 unfortunately.
Lol @Zedronar then what is this?

@serberus7 Must be something wrong with my configuration then.
For anyone on OSX, go to the directory, and type
source bin/activate
brew install gsed
sudo vim colorizer.sh
then inside vim copy paste this version of @nikmess 's script
#!/bin/bash
red=$(tput bold;tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput bold;tput setaf 3)
fawn=$(tput setaf 3)
blue=$(tput bold;tput setaf 4)
purple=$(tput setaf 5)
pink=$(tput bold;tput setaf 5)
cyan=$(tput bold;tput setaf 6)
gray=$(tput setaf 7)
white=$(tput bold;tput setaf 7)
normal=$(tput sgr0)
sep=`echo -e '\001'` # use \001 as a separator instead of '/'
while [ -n "$1" ] ; do
color=${!1}
pattern="$2"
shift 2
rules="$rules;s$sep\($pattern\)$sep$color\1$normal${sep}g"
done
#stdbuf -o0 -i0 gsed -u -e "$rules"
gsed -u -e "$rules"
type :wq to save and quit the file
then type
sudo chmod 777 colorizer.sh
After that you can use @nikmess 's script again
python pokecli.py 2>&1 | ./colorizer.sh red ".*PokemonCatchWorker.*" blue ".*TransferPokemon.*" green ".*IncubateEggs.*" yellow ".*SpinFort.*" pink ".*CollectLevelUpReward.*"
@serberus7 Works great. Thank you.
Win7x64.