Welcome to %s forums

BrainModular Users Forum

Login Register

Replicating Weather API

I need help on a Patch
Post Reply
dmitriyc
Member
Posts: 84
Contact:

Unread post by dmitriyc » 16 Dec 2018, 21:40

Hey guys. Was wondering if there was a way for me to get updated information from internet like weather information? I thought about get file and ftp, but can't wrap my mind around collecting text from a URL like in your example www.sensomusic.org/file.txt. Any thoughts?

Blaakk
Member
Posts: 96
Location: Tyne and Wear, UK
Contact:

Unread post by Blaakk » 17 Dec 2018, 00:55

Hey.

You can use the Get-File module and use "http://wttr.in", which should give you details for your area. Then feed it to a 'CommaTxt Get Str' module and the relevant details begin at index 297. Then you can just use whatever string-manipulation techniques to extract the data you want.

Or you could use the 'Shell Command' to run cURL (and/or whatever else) from a command-line which could offer more flexiblilty when parsing the returned html. Then you can just load the parsed, saved file after the fact. ;)

drakh
Member
Posts: 198
Location: Bratislava, SK
Contact:

Unread post by drakh » 17 Dec 2018, 09:44

i thinks best way to solve this is outside hollyhock. i reccomend to write your own application using nodejs - which is better platform for this tasks, and then translate it to OSC and let hollyhock listen to those OSC signals

Post Reply

Who is online

Users browsing this forum: No registered users and 57 guests