tellomichmich / PokeNoxBot

Slow but safe Pokemon GO Bot
23 stars 19 forks source link

[EVO] Use INI file to init global var #30

Closed Picardu57 closed 8 years ago

Picardu57 commented 8 years ago

Hello,

For the global var like GreatBallCpLimit, Speed, IVLimit... Maybe you can init theses with an external INI file to not reconfigure at every update.

In my Python projects I use this import: import ConfigParser

Init it with that:

Fichier Ini de configuration

self.config = ConfigParser.ConfigParser() self.config.read('config.ini')

And after that, I init a var with this type of line:

self.path_images = self.config.get('photobooth', 'images') self.path_thumbs = self.config.get('photobooth', 'thumbs')

And I use a INI file like this:

[photobooth] images = /home/pi/Pictures/Photobooth/HD/ thumbs = /home/pi/Pictures/Photobooth/SD/ compteur = 1 post_traitement = False vitesse_animation = 0.5

You can add this in your branch if you want :) What do you think about ?

Charles.

antfuentes87 commented 8 years ago

Why not make a Pull Request?

tellomichmich commented 8 years ago

I really prefer JSON config file :), This is on the TODO List !

tellomichmich commented 8 years ago

Testing a new version with json config file

tellomichmich commented 8 years ago

Et voilà !