Austraeoh 773 members · 31 stories
Comments ( 5 )
  • Viewing 1 - 50 of 5
Rainman Noodles
Group Contributor

I've created a script to send push notifications whenever a new chapter is released. I don't like relying on FiMFiction's notifications and my email is already flooded, so I use Pushover. If you wish, you can use any other notification service that has an API, you'll just have to edit the file appropriately. When the next book comes out, you'll also have to manually change the story_id that's set.

If you're observant, you may notice that there are some provisions in the statfile to allow for additional features. The original intent was to be able to check multiple stories at once. Then life came along, I got busy, and I said "SHIP IT NOW" and that was that. I may get back to it eventually, but currently it only supports a single story at a time. (Pro tip: don't run multiple copies of this version with a single stat file, it WILL break!)

The Python script is here:https://rainmannoodles.com/static/code/fim_notify_v1.py.

I assume you're using Linux or Mac OS X. WARNING: UNIX JOKE INCOMING:
Windows users can go fork() themselves. (Oh, wait, they can't!)

1. Create a Pushover account if you haven't yet done so
2. Edit PUSHOVER_USERTOKEN to match your Pushover user key
3. "Register an Application" in Pushover for your notification tool
4. Set PUSHOVER_APPTOKEN to match the new application's API token
5. If desired, choose a new location for STATFILE; this is where information about the last modification is stored
6. Make fim_notify.py executable using `chmod +x fim_notify.py`
7. Test by running `./fim_notify.py` - you should see a notification show up in Pushover
8. If step 7 failed: you probably have to install the requests module. Run `sudo pip install requests` and test again. You might have to install pip as well depending on your system. Just Google it.
9. Replace "user" and "/path/to/fim_notify.py" in the following line with your actual user and the actual path, then add the line to the /etc/crontab file (you'll have to use sudo):
*/15 * * * * user /path/to/fim_notify.py

To test again without actually waiting for a new chapter, just delete the STATFILE (or if you understand what's happening you can easily figure out how it works and trigger a repeat by editing it) and you should get another notification within 15 minutes. You can also adjust the crontab line with notification times of your choosing.

Also, before anyone complains: yes, you technically should use virtualenvs but that's beyond most people. If you know how to use virtualenvs you probably just skipped my instructions anyway.

OddOneOut
Group Contributor

this seems like a lot of extra work for not a whole lot of return.

North Bound
Group Contributor

I understood, like, half of that.

_00500005_
Group Contributor

Yay programmers.

I'll check it out later when I actually get some time

Rainman Noodles
Group Contributor

Of course, I could always just run a single instance and push notifications to everyone who's interested. But you'd have to trust me with your user token. I mean, if you do trust me I'd be happy to do it. But I'd recommend running your own.

  • Viewing 1 - 50 of 5