dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.0.11
[krisbulman] is now known as krisbulman
<dominikh> not really
krisbulman is now known as [krisbulman]
[krisbulman] is now known as krisbulman
krisbulman is now known as krisbulman|afk
krisbulman|afk is now known as [krisbulman|afk]
v1n has quit [Ping timeout: 272 seconds]
[krisbulman|afk] is now known as krisbulman
krisbulman is now known as krisbulman|afk
ex0a has quit [Quit: peace]
v1n has joined #cinch
Azure has quit [Read error: Connection reset by peer]
Azure has joined #cinch
krisbulman|afk is now known as [krisbulman|afk]
ntraum has joined #cinch
v1n has quit [Ping timeout: 252 seconds]
xeviox|afk is now known as xeviox
ntraum has quit [Quit: WeeChat 0.4.2]
Azure has quit [Read error: Connection reset by peer]
Azure has joined #cinch
[krisbulman|afk] is now known as krisbulman
krisbulman is now known as [krisbulman]
[krisbulman] is now known as krisbulman
krisbulman is now known as [krisbulman]
v0n has joined #cinch
[krisbulman] is now known as krisbulman
xeviox is now known as xeviox|afk
<somasonic> is there a :disconnect event or similar? for when cinch times out or gets killed etc
<ayonix> yes there is
txdv has quit [Read error: Connection reset by peer]
txdv has joined #cinch
krisbulman is now known as krisbulman|otp
krisbulman|otp is now known as krisbulman
krisbulman is now known as krisbulman|afk
UberDragon has left #cinch [#cinch]
krisbulman|afk is now known as [krisbulman|afk]
UberDragon_ has joined #cinch
UberDragon_ has quit [Quit: UberDragon_]
<CM-Punk> Alright, I need help, I haven't done much work with json until recently. "location = JSON.parse(open("http://api.wunderground.com/api/#{ENV['WUNDERGROUND_KEY']}/geolookup/q/#{zipcode}.json").read)" But when people ask for a zipcode with spaces it won't work unless they put an underscore, so my question would be how do I get it to parse a space?
UberDragon has joined #cinch
<onewheelskyward> Where does zipcode come from?
<onewheelskyward> It should be easy enough to urlencode it.
<Cinchy> [URL] Ruby url encoding string - Stack Overflow
<onewheelskyward> That seemed superfluous, Cinchy. :)
<onewheelskyward> What are you folks doing for bot deploys? I have mine deployed through cap and running in a screen instance, but restarts are manual.
<onewheelskyward> I'm trying to automate that.
UberDragon has quit [Quit: UberDragon]
UberDragon has joined #cinch
<CM-Punk> onewheelskyward
<CM-Punk> The zipcode comes from the ~forecast <zipcode>
<CM-Punk> matcher
postmodern has quit [Quit: Leaving]
postmodern has joined #cinch
<onewheelskyward> What is that matcher?
<onewheelskyward> Maybe it's a regex problem.
<CM-Punk> match /forecast (.+)/
<onewheelskyward> ok, that looks good. Now url encode the matched text and you should be set.
<CM-Punk> http://pastebin.com/JUwC9Gky I have that
<CM-Punk> But if someone does ~forecast CW2 6PD it won
<CM-Punk> It rescues
<CM-Punk> Because it has no results
<CM-Punk> You have to go
<CM-Punk> ~forecast CW2_6PD
<CM-Punk> Which I don't want users of the bot to have to do
<onewheelskyward> ok, then you need this:
<onewheelskyward> zipcode.gsub /\s/, '_'
<onewheelskyward> actually
<onewheelskyward> zipcode.gsub! /\s/, '_'
<onewheelskyward> Just before you call the wunderground api.
<CM-Punk> Okay
<CM-Punk> http://pastebin.com/JUwC9Gky so, where would I put that in this
<CM-Punk> Again, I am learning as I go...I have programming experience in other languages but I'm roughing it with Ruby :P
<onewheelskyward> Are all of your queries zip codes?
<CM-Punk> Yes
<onewheelskyward> I'd put it at line 16, before the call to geo_lookup
<CM-Punk> I am trying to find a way to make it search for actual places like ~forecast Los Angeles but I would need to research the wunderground API more.
<onewheelskyward> so query.gsub! /\s/, ''
<onewheelskyward> then location = geolookup(query)
<onewheelskyward> I use the google geocoder for that.
<CM-Punk> Oh?
<onewheelskyward> Yeah, let me share
<CM-Punk> For sure
<CM-Punk> https://github.com/Namasteh/Eve-Bot I've been working really hard on my project
<onewheelskyward> nice
<onewheelskyward> I use the geocoder to give me lat + long from basically anything
<CM-Punk> That is so much nicer than the one I'm trying to fix...
skybotalpha has joined #cinch
<onewheelskyward> I've done a lot of work on it.
<onewheelskyward> !weather random
<skybotalpha> Random, Lehigh Acres, FL 33974, USA weather is currently 66.79°F (19.33°C) and clear. Winds out of the NE at 4.44 mph. It will be clear for the hour, and clear throughout the day. There are also 266.84 ozones.
<CM-Punk> !wether normal
<CM-Punk> !weather normal
<skybotalpha> Normal, IL, USA weather is currently 5.76°F (-14.58°C) and clear. Winds out of the NW at 18.16 mph. It will be clear for the hour, and windy until tomorrow afternoon. There are also 498.01 ozones.
<onewheelskyward> brr.
<CM-Punk> Yeah
<CM-Punk> XDD
<CM-Punk> I need someone like you on the Eve project
<CM-Punk> XDD
<onewheelskyward> I have a bot. :)
<CM-Punk> I know
<CM-Punk> XD
<onewheelskyward> The geocoder was silly simple to integrate. Feel free to swipe that code.
<onewheelskyward> I don't know how you'd get zip out of it but if you can find wunderground's lat/long query that could work.
* CM-Punk nods
<CM-Punk> Makes sense
<CM-Punk> Thanks
v0n has quit [Ping timeout: 245 seconds]