Grasshopper

algorithmic modeling for Rhino

I have an XML feed that I'd like to bring into Grasshopper, but unfortunately, the only data in which I'm interested falls within CDATA sections. Any thoughts on how to get around this?

 

A little background on what I'm doing- I'm trying to figure out a way to amass and analyze inbound SMS in Grasshopper. So far I've approached the problem in a horribly convoluted way- texts to a Google voice number, sent to my gmail, forwarded to an account that converts email to xml. The alone takes about a minute, but that's where my limited understanding of computers has led me. So unfortunately, the body of the email- the content of the SMS- becomes CDATA.

Views: 451

Replies to This Discussion

I wasn't really sure what to do with CDATA or who would need it.  I can certainly add it, although I'm in the process of rebuilding my computer so it may have to wait a couple of days.

 

If you've using an actual file as opposed to using a website, then you could also split the string with some fairly straight forward code.  If that's the case, then let me know and I can definitely get that to you much quicker.

 

If you don't mind my asking, where are these SMS messages coming from, and what is there exact usage?  I looked into SMS a little bit, and there's quite a bit out there to send them, but not much to receive them.  Depending on where there coming from, there just might be a better way to communicate.

That's great, thank you!!

 

So, the problem with the origin of the SMS messages is that I'd like it to remain as open as possible- currently, the targeted population consists of my peers at UVa with mobile phones.

 

I recently discovered how a link could be made between my phone and GH via Twitter and Pachube and was pretty excited about that. It takes anywhere between 20-60 sec, BUT, between pachtweet and pachube, things are very neatly parsed- good for someone like me, new to coding.

 

My new system is even more jerry-rigged. I looked into SMS MO services but of course there was always money involved... so I just signed up for a Google Voice number and intend to tell people to send their SMS responses that way. I feel like what follows could possibly be streamlined. The Google Voice application is pretty much just like any other webmail- is there any conceivable way to connect GH to that directly? I can't imagine one, but that's not saying much. Right now, I'm just forwarding those messages to this website- mmmmail.com- that converts email to RSS. (So yes, a website as opposed to an actual file)

 

Ultimately I'm probably OK with the delays this involves. I haven't decided how exactly I'm going to use the messages, but I think I'm more interested in a system that reacts to accumulated responses, rather than the most recent response.

 

But out of curiosity, what is there for sending SMS? I am just as interested with exporting as I am with importing...

Mobile phone updates to GH. Very interesting.

 

I certainly can't say that there's an easy way to do what your looking for, and the fact that you've got it working now with pretty limited programming intervention is actually pretty astonishing.  The only real good way of doing this would be to program a mobile app yourself that would be used on your friends mobile phones and utilize web services for the communication between the phones and a server, and a server and GH. Of course this would be an undertaking, so unless you've got some CompSci students that want to help you out, it would probably be beyond what you'd be willing to do based on both your coding skill and the time needed to implement it.

 

As far as sending SMS messages, that would be something that would be more suited to a compiled custom GH component rather than a regular GH script.  The reason being is that the solutions out there use web services to send the SMS message.  Working with these in Visual Studio isn't that much of an issue since you can add a web reference and refer to the methods that you need to call very easily.  Without adding web references things become much more complex and you'd have to basically determine what methods were exposed by the web service and how to call them at run time, which would either require a bunch of reflection, dynamic compiling, or writing the raw xml for the service request dynamically.  Neither one of those options are fun at all so that option is pretty much out the door.

 

You can find the WSDL for the webservice that you can use here.  If that looks completely foreign to you, then you can find an example of how to use that service on CodeProject here.  This isn't the only option/example out there, it was just one of the more complete ones that I found.

Thanks for the leads on sending SMS messages! I think I'll try to work out the kinks of receiving, for now. Have you had a chance to reconfigure the XML parser :)?

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service