murgo / IrssiNotifier

notifies android phones from irc private messages
Apache License 2.0
171 stars 63 forks source link

add a Python Interface for IrssiNotifier #133

Closed evgeni closed 10 months ago

evgeni commented 11 years ago

While irssi itself loves Perl, Python is quite a nice language too. People even might want to send notifications from Python because

For all these people, let there be a Python interface:

>>> notifier = IrssiNotifier(API_KEY, PASSWORD)
>>> notifier.send_message("message", "#channel", "nick")
murgo commented 11 years ago

Thanks, I guess!

Not sure where this should go. I wish Irssi itself supported Python for scripting (since I suck at Perl), but for the time being, I'm not sure what I should do with this script :P.

I'll let this pull request hang around until I decide something. Still, thanks!

evgeni commented 11 years ago

Heh. Yeah, python for irssi would be cool. I often suck at Perl too.

I wrote the script to notify myself about different kind-of-IM events on my server at home w/o writing an IRC bot just to get it pushed to my mobile.

If you want, I could drop a weechat proof of concept script (would need to read weechat scripting first).

murgo commented 11 years ago

It seems that there is need for official weechat script, since there's at least three weechat -scripts already floating around.

http://www.weechat.org/files/scripts/irssinotifier.py (rude script since it's on the official site but doesn't even mention my name :P) https://github.com/webvictim/irssinotifier https://github.com/leitmedium/weechat-irssinotifier

evgeni commented 11 years ago

bah, they all call openssl directly (I know, your irssi script does too :))

let me hack a bit

murgo commented 11 years ago

I've received multiple pull requests with openssl changed to Perl's Crypt or whatever, but since that's not core module, I don't want to use it.

One of the goals for my IRC script has been the ease of installation, and many people use IRC from some random boxes they cannot install anything on, so it's best to keep the requirements minimum.

Of course, it's no way mandatory for derivative works.

evgeni commented 11 years ago

There is a working PoC. :)

And for random boxen: while I would not trust them, cpan works also w/o root access ;)