It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
avatar
BoxOfSnoo: ...

I created a pull request if you're interested.
avatar
Magnitus: I am, though if I pull the merge now, it won't run without the shell script which is activated by default and I assume is Mac OS specific.

I made a recommendation in the pull request.
Nope, Linux. And not strictly Linux, it just happens to be a bash script extension. I presume Python will also execute .bat files with the same system call?

I added some stuff to print stock levels when in verbose mode, too.
avatar
BoxOfSnoo: Nope, Linux. And not strictly Linux, it just happens to be a bash script extension. I presume Python will also execute .bat files with the same system call?
It should yes.
Ok, I confirm too that it works now : )
Fixed: Some games with special character in title that look like to be handled properly but they broke the script when display on the screen the second time.

Link to updated version: https://github.com/phoeniixz/GOG-Flash-Promo-Script
avatar
phoeniixz: Fixed: Some games with special character in title that look like to be handled properly but they broke the script when display on the screen the second time.

Link to updated version: https://github.com/phoeniixz/GOG-Flash-Promo-Script
Merged to master.
Hey, I updated the insomnia promo warning script for the current march 2016 promo.

It seems to work for both new games and pattern notifications.

Will run with Python 2.x. Haven't tested it with Python 3.x. Probably won't get around to that until the weekend.

You can simply watch for new games or input the list of game title patterns that interest you in the patterns.txt file.

Link to the project: https://github.com/Magnitus-/GOG-Flash-Promo-Script

Enjoy a productive working day without missing out on the promos you want. Special thanks to the peeps who contributed to the project and extended its functionality last promo.

Cheers.
Post edited March 22, 2016 by Magnitus
avatar
Magnitus: Hey, I updated the insomnia promo warning script for the current march 2016 promo.

It seems to work for both new games and pattern notifications.
Thanks a lot for this :) It will be very useful !

Edit : Now if someone could explain me how to put a sound file as an alarm it would be perfect XD
(I'm setting "FILE_ALARM = False" to True, but after that, I don't know what to do :P)
Edit2 : Nevermind, I found ! For people like me : look for this line : " SoundFile = "Alarm.wav" "

Edit3 : I got an error for the Monkey Island package : I think it's certainly because there are two games included in one. The problem is that the script crashed (and didn't played sound), you have to close it and launch it again.
(Edit 4 : same problem with the Broken Sword bundle)
I made a screenshot in case it can help you !
Attachments:
Post edited March 22, 2016 by Splatsch
Fixed an issue where the script would be halted when the server returns gibberish between game promos.

Enjoy.
avatar
Splatsch: Edit3 : I got an error for the Monkey Island package : I think it's certainly because there are two games included in one. The problem is that the script crashed (and didn't played sound), you have to close it and launch it again.
(Edit 4 : same problem with the Broken Sword bundle)
I made a screenshot in case it can help you !
I found there is sometime a pause between promos where the server doesn't send the usual game data.

Make sure you get the latest commit (ie, version). It will still report an error, but it instead of aborting will keep trying until the next promo kicks it.

EDIT: Darn, I just checked and you are right. They have bundles with a different structure. Will have to adapt the code to process them so they are not skipped.
Post edited March 23, 2016 by Magnitus
Ok, I adapted the script for bundles.

They should be handled properly now.
The script won't work if run as executable :
chmod 755 FlashPromoScript.py
./FlashPromoScript.py

Python shebang and encoding lines must be at the top of the file:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
Post edited March 23, 2016 by phoeniixz
avatar
Magnitus: ...
EDIT: Darn, I just checked and you are right. They have bundles with a different structure. Will have to adapt the code to process them so they are not skipped.
avatar
Magnitus: Ok, I adapted the script for bundles.
They should be handled properly now.
Great !
Thanks for all of this ! It's very appreciated ! :)
If I notice something else, I'll report it, of course ;)
Edit : Bundles seems to be handled perfectly (Monkey Island bundle just passed, and triggered the alarm like any other game)) very good work ;)
Post edited March 23, 2016 by Splatsch
avatar
phoeniixz: The script won't work if run as executable :
chmod 755 FlashPromoScript.py
./FlashPromoScript.py

Python shebang and encoding lines must be at the top of the file:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
You can also do "chmod +x" if all you want to change is the executable bit for everyone.

I'll fix it.

EDIT: Done.

avatar
Splatsch: Great !
Thanks for all of this ! It's very appreciated ! :)
If I notice something else, I'll report it, of course ;)
Edit : Bundles seems to be handled perfectly (Monkey Island bundle just passed, and triggered the alarm like any other game)) very good work ;)
Glad to hear it :).
Post edited March 23, 2016 by Magnitus
Corrected typo for a variable name that caused bundles not to display properly.
Sorry for necroing this old thread, it's for a good cause.

I adapted the flash/insomnia promo script for the Chinese new years "flash" promo so you can keep track of potential promos for games you are interested in while still having a productive day.

The repo is here: https://github.com/Magnitus-/GOG-Flash-Promo-Script

I tested it with the pattern & new game recognition for like 15 minutes and it works so far.

Only thing I'm not sure about at this point is that the flash promo url which currently is https://www.gog.com/flashDealsSets/14674

Not sure if the 14674 is a constant or an evolving value (it's about ~100 days over the number of days since epoch, but that could just be a coincidence).

If the flash promo url stops working later for the script, I'll have to take a more serious look at where the number is coming from (that or just make the script try a couple of values before throwing the towel if the value simply increments in a predictable fashion, we'll see).
Post edited February 14, 2018 by Magnitus