jxmorris12 / PokemonGo-Finder

Live visualization of all the pokemon in your area... and more!
GNU General Public License v3.0
171 stars 43 forks source link

Add the ability to specify unwanted pokemon instead of wanted pokemon #8

Closed everix1992 closed 7 years ago

everix1992 commented 7 years ago

This pull request includes a

The following changes were made

{ "auth_service": "google", "username": "your_email_here", "password": "your_password_here", "step_limit": 5, "location": "1 White House Lane", "do_not_notify": "rattata,raticate,pidgey,pidgeotto,pidgeot,weedle,kakuna,caterpie,metapod,zubat,golbat,venonat,oddish,magikarp,spearow,paras,ekans,goldeen,doduo,pinsir,poliwag", "pushbullet": "o.m5fgAZaBFiZ0gHrNg21ZLFOKZStckql" }

jxmorris12 commented 7 years ago

still a lot of pushes. i'd like to offer both options

everix1992 commented 7 years ago

This should still allow both options. It basically has three states:

  1. If the "notify" and "do_not_notify" options are not present, you will be notified of all pokemon.
  2. If the "notify" list is present, you will only be notified of pokemon in that list.
  3. If the "notify" list is not present, but the "do_not_notify" list is present, you will be notified of all pokemon except the ones in the "do_not_notify" list.
karlhe commented 7 years ago

I've noticed that main.py already supports and handles both ignore and only in the options. So even the notify list in notifier.py is already duplicated functionality?

everix1992 commented 7 years ago

@karlhe They are sort of different behaviors. Ignore and Only completely filter them from the map, whereas with "notify" and "do_not_notify" they are only filtered from notifications, but not the map.

jxmorris12 commented 7 years ago

yeah exactly @everix1992

jxmorris12 commented 7 years ago

I like this! can you also add an update to the README?

everix1992 commented 7 years ago

@jxmorris12 Absolutely. I probably can't do it until later tonight as I'm out right now, but I will when I get home.

jxmorris12 commented 7 years ago

awesome

everix1992 commented 7 years ago

@jxmorris12 I've now updated the README per your request. Note that some unrelated changes are also included in my branch (commit 423622a825529817aa7404822522d4b469b09ccf). These were made to fix some problems I had with specifying a different hostname in the config file. I just added a new list that defines the types of each argument and converts the argument value to that type if possible. Honestly, it would probably be best to use the python argument library, but I wasn't familiar enough with it to try doing it myself.

jxmorris12 commented 7 years ago

this is really cool, great work