ge-cancellation-checker icon indicating copy to clipboard operation
ge-cancellation-checker copied to clipboard

Additions in forks

Open paulirish opened this issue 9 years ago • 12 comments

I'm about to set this up.. and just noticed some nice work in various forks.. just FYI for you

  • apangar set things up with SMS (via twilio) instead of email: https://github.com/apanagar/ge-cancellation-checker/commit/251ab407887befd13552ced65aa7aa7c0604c378 also seems to include a phantomjs fix.
  • zeemonkeez used some straight up SMTP settings https://github.com/zeeMonkeez/ge-cancellation-checker/commit/ff79334705da35448081a71b1daad212cc48534a
  • mw1993 has some interesting updates including making the appointment change immediately: https://github.com/Mw1993/ge-cancellation-checker/commits/master

thanks for the project!

paulirish avatar May 05 '16 04:05 paulirish

Awesome! Wow, thanks for bringing these to my attention, @paulirish! I'll get these great changes merged in when I can :)

And as always, feel free to open a PR if you're making changes of your own!

davidofwatkins avatar May 06 '16 05:05 davidofwatkins

And then over in my fork I made a few changes (some that break the cron & email flow)

  • can check multiple locations
  • better error reporting
  • mapping location IDs to readable names

image

downside is the python doesn't yet handle the multi-location results from the phantom script

but other than that it's feeling p good

paulirish avatar May 11 '16 17:05 paulirish

I've made extensive changes in my fork as well.

I haven't documented them yet, but in summary:

  • Fully refactored the python code to make it easier to understand and more extensible
  • Added support for flags, added the following flags:
    1. config for sending through a gmail account, so you don't have to set up sendmail locally
    2. no mail flag
    3. osx specific: notify via the notification center when a new appointment is found
  • Since cron isn't well supported on osx, I added a plist file for an osx launch daemon which is currently configured to run every 30 minutes. Instructions for setting up the daemon are currently in a comment at the top of the file.

@paulirish When I have time next week, I can pull in your latest changes on the phantomjs side and make updates to the python script to support multiple locations.

@davidofwatkins The pull request #3 I opened 2 weeks ago with small bug fixes hasn't been acknowledged, so if you're interested in merging any of these changes feel free to reach out to me.

nnja avatar May 30 '16 08:05 nnja

@nnja Thanks for submitting the PR! Apologies for not responding yet; I've been swamped with other work recently, but I'll try to take a look as soon as I can! :)

davidofwatkins avatar May 31 '16 09:05 davidofwatkins

@davidofwatkins - Would you like me to open a PR with the bigger changeset including the features I mention above? The additions I made are backwards compatible with your branch.

nnja avatar Jun 01 '16 15:06 nnja

@nnja you're a champion! thanks for sorting this out. :)

paulirish avatar Jun 01 '16 16:06 paulirish

@nnja Awesome, yes that would be great. All sound like good improvements.

davidofwatkins avatar Jun 01 '16 20:06 davidofwatkins

@nnja did you ever get that plist stuff done? I don't see anything about that in the files...

pixitha avatar Sep 27 '16 16:09 pixitha

@pixitha Yes, along with some refactoring so I had an easier time working on the code - but there were conflicts before I had an opportunity to open a PR and I don't have time to work on this anymore.

If you want to take a look, my branch is here: https://github.com/nnja/ge-cancellation-checker

I added some additional flags:

parser.add_argument('--no-email', action='store_true', dest='no_email', default=False, help='Don\'t send an e-mail when the script runs.')
parser.add_argument('--use-gmail', action='store_true', dest='use_gmail', default=False, help='Use the gmail SMTP server instead of sendmail.')
parser.add_argument('--notify-osx', action='store_true', dest='notify_osx', default=False, help='If better date is found, notify on the osx desktop.')

The plist is here with instructions for how to run it as a comment at the top of the file.

Unfortunately I never did update the README, so it's a big ad-hoc.

Hope that helps!

nnja avatar Sep 27 '16 22:09 nnja

@pixitha I'm mistaken and the changes with the flags were merged in, just not the plist.

I'll submit a proper PR for the plist when I have time, as well as updates to the README with instructions.

In the meantime, this should be enough to get you started.

nnja avatar Sep 27 '16 22:09 nnja

Dumb question about the plist, having issues getting it to work correctly.

When I load the plist, it runs the python script just fine, but then python appears to have issues locating phantomjs, even though I can run everything by hand just fine?

09/28/2016 09:32:05 PM Running GE cron with arguments: {'no_email': False, 'configfile': '/Users/xxxxx/ge-cancellation-checker/config.json', 'notify_osx': True, 'use_gmail': False} 09/28/2016 09:32:05 PM Something went wrong when trying to run ge-cancellation-checker.phantom.js. Is phantomjs is installed?

pixitha avatar Sep 29 '16 04:09 pixitha

@pixitha Did you do this step? https://github.com/nnja/ge-cancellation-checker/blob/master/com.util.GlobalEntryCancellationChecker.plist#L5

nnja avatar Oct 05 '16 19:10 nnja