aboutsummaryrefslogtreecommitdiffstats
path: root/hipchat-stfu.pl
AgeCommit message (Collapse)Author
2015-06-14Condense `signal_add` callv1.00Teddy Wing
Instead of using the hash syntax to add our `message public` signal listener, use the parameterised subroutine style call. Since we're only adding a single signal, we don't really need to use the hash syntax. I started out with it because I was following the example on http://juerd.nl/site.plp/irssiscripttut
2015-06-14Strip 'Priority:' and 'Status:'Teddy Wing
These single lines are irrelevant and don't need to be included in output.
2015-06-14Change title message format (single line)Teddy Wing
Change the format so that the title message is on a single line instead of 3. Typically this will mean that the message will appear on 2 lines, which is still better than 3 lines, saving us some vertical space.
2015-06-14Stop output of empty messagesTeddy Wing
Don't write blank messages, only write messages with text.
2015-06-14Transform messages from HipChat & output to channelTeddy Wing
Use the `signal_continue` sub to continue sending the message with transformed text. Thanks so much to `Nei` on Freenode#irssi for recommending `signal_continue`! Decided to get all variables from the caller to be able to pass them on to `signal_continue`.
2015-06-14Construct start messageTeddy Wing
Make the start message to correspond to the test expectation. Grab the issue link first because that should tip us off that this is the text that will give us the starter data. Also chomp the newline from the test string to match the function result.
2015-06-14prettify_hipchat: Collapse extra whitespace between wordsTeddy Wing
Turn extra whitespace between words (including non-breaking spaces because _that's a thing_) into a single space.
2015-06-14prettify_hipchat: Remove HTML tagsTeddy Wing
And add some comments to describe what we're matching.
2015-06-14prettify_hipchat: Also match non-breaking spacesTeddy Wing
Turns out the whitespace problem I was getting in d6f76b336715ca0fc9a11b2d2bd26500918a0e9f was due to the fact that HipChat sends non-breaking spaces in addition to regular spaces (WTF?!!!?!!!), so those weren't getting trimmed. Add non-breaking space characters to the regular expression so those get whacked by our substitution matcher also.
2015-06-14prettify_hipchat: Trim whitespaceTeddy Wing
Trim whitespace around the beginning and end of the text. Based on http://perlmaven.com/trim. There's some problem where some ending whitespace isn't getting trimmed from some of the strings. Still not sure what's going on here.
2015-06-14Add a new `prettify_hipchat` stub subTeddy Wing
This is what I'll be using to actually convert the text into something decent. Stubbing it for now to give me something to include in my test script.
2015-06-13Remove `Data::Dumper` importTeddy Wing
Not using it after 6cbc5ecddd2a52edfacb3754b74f35048095a3ad.
2015-06-13Drop empty messages from HipChat/JIRATeddy Wing
Now that I know what's going on with those empty messages from 8746a69bbb79902b6be5fd205efbb5bfc83feed7, we can kill those messages before they ever reach my chat screen using the `signal_stop` subroutine.
2015-06-13Delete old log file output codeTeddy Wing
Since I was just using that to test the signal and see what kind of input I was getting, this is no longer needed. Now that I know what's going on we can write the actual code to do the work.
2015-06-13Checking for empty messages from HipChat (WIP)Teddy Wing
Some trial and error in selecting the blank empty messages coming from HipChat/JIRA. Had to do the output-to-file thing again, this time a new different one. Was trying to match against an empty string message but it turns out the empty messages that HipChat sends have a single space in them, aggh!
2015-06-13Rename main sub to `hipchat_stfu`Teddy Wing
`test` was just a temporary name to see if I could get the signal working and to see what kind of information irssi would give me. Let's use a more final name now that we know it works.
2015-06-13Dump server information to logTeddy Wing
Let's see what's in the `$server` hash and if it could be useful to us in our checks.
2015-06-13Fix test `message public` listenerTeddy Wing
Turns out I got the argument list wrong. The argument list I was using was for a `command_bind` (based on the tutorial mentioned in 0370866db92e1916af5ee98acf948adc3916d545). I wanted to make a signal listener for public messages. Looked up the documentation and figured out the correct arguments. Also fixed my log message printing to append to the file instead of overwriting it for every message received (previously I only got the last message posted in my log output).
2015-06-02Test listener for `message public` signalTeddy Wing
Following this tutorial: http://juerd.nl/site.plp/irssiscripttut Add a test sub that receives a public message signal so I can prove that it works and see what kind of data I'm getting back when my sub is called.
2015-05-31Add base irssi scriptTeddy Wing
New file containing the minimum defaults needed for an irssi script, copied from http://juerd.nl/site.plp/irssiscripttut. Sets up `$VERSION` & `%IRSSI` variables.