Forum New Posts Notifier for NiftyHost
|
11-15-2010, 08:18 PM,
(This post was last modified: 05-30-2011, 12:21 AM by RichardGv.)
|
|||
|
|||
Forum New Posts Notifier for NiftyHost
I just wrote a script that notifies users of new posts on NiftyHost Forums. (Actually it's generic forum new post notifier that supports more than one forum.)
Current version: 0.01 Pre-Alpha 1 Developmental Preview 20110428 Nightly (I'm trying to break the world record of the longest software version number! :D ) Features: It does what its name implies: Periodically send a request to forums and filter the response to find new posts. It then can display a message in the terminal, or execute a set of commands to show a notification window, or play some sound. (On POSIX systems, like Linux or BSD, it additionally provides shell-quoted strings for the commands.) It shows unread posts in "View new posts" page (you may change it to "View daily posts", though), so sometimes it won't show all unread posts. If NiftyHost Forums has a plugin like View Unread Posts, after a small modification my script should be able to display all unread posts. It's only tested on my Gentoo box. In fact I'm too lazy to reboot to Windows to test it. :) Theoretically, it should work on any platform where Python runs on, this includes Windows, Linux, BSD, Mac OS X, Darwin, Nintendo DS, Nokia N800, Nokia N810, Xbox, and PlayStation 2/3 (provided that there's an Internet connection). Use it at your own risk. It may burn your CPU and I won't offer you a compensation if that happens! :D Changelog: Nightly May 29th: Nightly April 28th: http://www.niftyhost.us/support/thread-7...ml#pid8894 Nightly 20110408: http://www.niftyhost.us/support/thread-7...ml#pid8536 Nightly 20101118: http://www.niftyhost.us/support/thread-7...ml#pid6154 Nightly 20101117: http://www.niftyhost.us/support/thread-7...ml#pid6151 Nightly 20101116: http://www.niftyhost.us/support/thread-7...ml#pid6134 Nightly 20101115: Initial version. Installation: It's written with Python 3, and you will need a Python 3 interpreter to try it. For the latest version, Python 3.2 is required, and optionally, lxml. For the unfortunate Windows users, it's required to install Python 3.2+ to use it. Most Linux users should have it pre-installed, yet not necessarily the latest version. Installation wizard? No, we don't offer such a stupid thing. My principle of programming is to make programs as complicated as possible, so that no newbies will dare to try it and it saves my time of answering the stupid questions they could ask. :D Take a look at the configuration part to learn about how to configure it. (Without proper configuration it won't run at all!) Configuration: The content below is obsolete in favor of the new XML external configuration system. (They still work, though.) Please read this reply for a description of the new system. I plan to write a comprehensive README file later, after I learn asciidoc. Following my tradition, this script is customizable in almost every aspect, and the options are all ill-documented. :D So there's a bunch of configuration options. You can change these options by editing the script file directly.
Hopefully you are not sleepy after reading all the boring stuffs above. :) Script is right here: https://github.com/richardgv/newpostsche...tscheck.py
Gentoo Linux User (w/ fvwm) / Loyal Firefox User / Owner of a Stupid Old Computer - My PGP Public Key
No man is an island, entire of itself; every man is a piece of the continent, a part of the main; if a clod be washed away by the sea, Europe is the less, as well as if a promontory were, as well as if a manor of thy friends or of thine own were; any man's death diminishes me, because I am involved in mankind; and therefore never send to know for whom the bell tolls; it tolls for thee. -- Devotions Upon Emergent Occasions (1624), John Donn |
|||
11-15-2010, 10:02 PM,
|
|||
|
|||
RE: Forum New Posts Notifier for NiftyHost
Richard, this is what makes you an awesome addition to staff. Before this, I relied on the New Threads RSS and frequent refreshs of the New Posts page.
Hi! I'm Zach, and I founded NiftyHost. If you need anything, just PM me! :)
|
|||
11-16-2010, 12:31 AM,
(This post was last modified: 11-16-2010, 12:33 AM by RichardGv.)
|
|||
|
|||
RE: Forum New Posts Notifier for NiftyHost
Nightly 20101116:
http://stc.hux.pp.ru/newpostscheck_20101116.py This version did not include many changes for NiftyHost.
(11-15-2010, 10:02 PM)Zack Wrote: Richard, this is what makes you an awesome addition to staff. Before this, I relied on the New Threads RSS and frequent refreshs of the New Posts page. Thanks. :) So, it works for you? Don't hesitate to post a bug report if you meet a bug. So far nobody has ever told me whether it works. Also, looks like most people are uninterested. Is the script plainly too hard for them to use?
Gentoo Linux User (w/ fvwm) / Loyal Firefox User / Owner of a Stupid Old Computer - My PGP Public Key
No man is an island, entire of itself; every man is a piece of the continent, a part of the main; if a clod be washed away by the sea, Europe is the less, as well as if a promontory were, as well as if a manor of thy friends or of thine own were; any man's death diminishes me, because I am involved in mankind; and therefore never send to know for whom the bell tolls; it tolls for thee. -- Devotions Upon Emergent Occasions (1624), John Donn |
|||
11-16-2010, 05:18 AM,
(This post was last modified: 11-16-2010, 05:21 AM by Vanilla.)
|
|||
|
|||
RE: Forum New Posts Notifier for NiftyHost
That's kinda neat! :) - Thanks for writing/providing it!
But, if I may: - It would be nice to have the login info made more visible (ie. be under some sort of settings sections/function) - I can confirm it working partially under Windows 7 - I was able to see the latest new post/thread, but i also got an error: Code: Checking the state of niftyhost... But nice work, nonetheless ;) |
|||
11-16-2010, 10:48 AM,
(This post was last modified: 11-16-2010, 11:43 AM by RichardGv.)
|
|||
|
|||
RE: Forum New Posts Notifier for NiftyHost
I'm adding support for vBulletin forums and SMF forums. (By the way, I'm kind of surprised that vBulletin uses MD5 on client side when submitting password!) But the vBulletin site I'm testing on have no new posts currently, and the SMF one is totally down. :) So I need to wait for some time to do a final test.
(11-16-2010, 05:18 AM)Vanilla Wrote: But, if I may: The configuration is only a one-time work, so it's not too much a burden, but maybe I will consider splitting the configuration to a separate file once the script gets stable. Currently I could update the script everyday so splitting the configuration will only create more troubles when upgrading. As for the exception, Vanilla, I thought you would at least carefully read the bold parts in my thread, but you did not, unfortunately. Your problem is caused by the default value of the option 'cmdexec', which is designed purely for Linux users instead of Windows users. I've stated that point clearly in my thread, and you did not notice it. Please read the bold part: (11-15-2010, 08:18 PM)RichardGv Wrote: Constant 'cmdexec'. Line 21. Commands executed when a new post is discovered. You can use it to, for example, play some sound or show a libnotify popup when a new post is found. It's written in the format of a Python tuple. Examples:The reason why it fails, technically, is {site_esc}, {title_esc}, and {author_esc} are all not provided for Windows, since they are shell-escaped in Unix fashion. In order to use the script on Windows, you need to change 'cmdexec' to a more reasonable value. For example, the first and the last example are both usable under Windows. With the last example, you can play a sound with VLC when there's a new post. (But make sure you change the path of VLC and the music file to a valid local path.) Code: # No command is the best command :D
Gentoo Linux User (w/ fvwm) / Loyal Firefox User / Owner of a Stupid Old Computer - My PGP Public Key
No man is an island, entire of itself; every man is a piece of the continent, a part of the main; if a clod be washed away by the sea, Europe is the less, as well as if a promontory were, as well as if a manor of thy friends or of thine own were; any man's death diminishes me, because I am involved in mankind; and therefore never send to know for whom the bell tolls; it tolls for thee. -- Devotions Upon Emergent Occasions (1624), John Donn |
|||
11-16-2010, 01:07 PM,
|
|||
|
|||
RE: Forum New Posts Notifier for NiftyHost
To make it easier to use, I woulduse the python compiler and cygwin or something to make a .exe when you have a final release. A majority of users have Windows.
Hi! I'm Zach, and I founded NiftyHost. If you need anything, just PM me! :)
|
|||
11-16-2010, 01:26 PM,
(This post was last modified: 11-16-2010, 01:27 PM by RichardGv.)
|
|||
|
|||
RE: Forum New Posts Notifier for NiftyHost
(11-16-2010, 01:07 PM)Zack Wrote: To make it easier to use, I woulduse the python compiler and cygwin or something to make a .exe when you have a final release. A majority of users have Windows. Yeah, I can use py2exe or cx_freeze to pack it, but:
Gentoo Linux User (w/ fvwm) / Loyal Firefox User / Owner of a Stupid Old Computer - My PGP Public Key
No man is an island, entire of itself; every man is a piece of the continent, a part of the main; if a clod be washed away by the sea, Europe is the less, as well as if a promontory were, as well as if a manor of thy friends or of thine own were; any man's death diminishes me, because I am involved in mankind; and therefore never send to know for whom the bell tolls; it tolls for thee. -- Devotions Upon Emergent Occasions (1624), John Donn |
|||
11-16-2010, 05:04 PM,
(This post was last modified: 11-16-2010, 05:10 PM by Vanilla.)
|
|||
|
|||
RE: Forum New Posts Notifier for NiftyHost
Quote:As for the exception, Vanilla, I thought you would at least carefully read the bold parts in my thread, but you did not, unfortunately. Your problem is caused by the default value of the option 'cmdexec', which is designed purely for Linux users instead of Windows users. I've stated that point clearly in my thread, and you did not notice it. Please read the bold part Well, sorry about that. As a lazy gaming windows user, you didn't expect me to both install Python, and then read the text thoroughly :P Well, tested it again (after having read the bold text), and now it works :) |
|||
11-18-2010, 07:47 PM,
(This post was last modified: 11-18-2010, 07:50 PM by RichardGv.)
|
|||
|
|||
RE: Forum New Posts Notifier for NiftyHost
Nightly 20101117:
http://stc.hux.pp.ru/newpostscheck_20101117.py This version did not include many changes for NiftyHost.
Nightly 20101118: (The version number is way ahead of the actual time! :D ) http://stc.hux.pp.ru/newpostscheck_20101118.py This version did not include many changes for NiftyHost.
Nightly 20101119: http://stc.hux.pp.ru/newpostscheck_20101119.py Fixes a bug that causes the script to throw an exception when a MyBB forum has a new post with more than one page of replies
Gentoo Linux User (w/ fvwm) / Loyal Firefox User / Owner of a Stupid Old Computer - My PGP Public Key
No man is an island, entire of itself; every man is a piece of the continent, a part of the main; if a clod be washed away by the sea, Europe is the less, as well as if a promontory were, as well as if a manor of thy friends or of thine own were; any man's death diminishes me, because I am involved in mankind; and therefore never send to know for whom the bell tolls; it tolls for thee. -- Devotions Upon Emergent Occasions (1624), John Donn |
|||
11-20-2010, 03:47 PM,
|
|||
|
|||
RE: Forum New Posts Notifier for NiftyHost
Just by a quick glance, it looks and sounds pretty good.
Good job. :) |
|||
« Next Oldest | Next Newest »
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
How did you find Niftyhost? | Serial Thrilla | 21 | 5,549 |
06-29-2012, 07:26 AM Last Post: Jennifer |
|
NiftyHost Server Monitor (created by Piotr GRD) | Piotr GRD | 21 | 12,949 |
01-18-2012, 05:12 AM Last Post: Serial Thrilla |
|
OMG COLORS! A Niftyhost Production | pspboy | 12 | 4,507 |
01-18-2012, 05:01 AM Last Post: Serial Thrilla |
|
NiftyHost Affiliate System | MyDigitalpoint | 4 | 2,042 |
10-09-2011, 01:12 PM Last Post: cuckooz |
|
How To Run A Board Forum Like myBB And SMF in Your Own PC [just for fun]! | KSubedi | 31 | 18,877 |
08-15-2011, 10:26 AM Last Post: MyDigitalpoint |
|
Niftyhost (Forums) reaches 500 registered members | Vanilla | 36 | 8,682 |
06-26-2011, 06:28 AM Last Post: micro |