News for hackers. Stuff that matters.
Re:Scripting the Haiku GUI with hey by petre on Wednesday November 15, 2017 @12:42AM (#15701702)
Sounds like a good usage case for Perl rather than bash. The former has good Unicode support and you can use the standard lib + Mojolicious to fetch data from the web and serve other data to Safari. No need for bash + command line tools + PHP + web server.
Re:Scripting the Haiku GUI with hey by peterburkimsher on Wednesday November 15, 2017 @01:17AM (#15701799)
I'm not trying to serve data to Safari (usually), I'm trying to read data from Safari. I often need to get the source of a webpage that's already loaded after a login screen, or with some user interaction.

For example, scrolling down to load all my Facebook messages into the left-hand bar. Or segmenting text into 5000-character blocks, copy-pasting into Google Translate, and getting the output.

With any command-line tools, it would be a hassle, if it's possible at all. With AppleScript, it's easy.

Re:Scripting the Haiku GUI with hey by waddlesplash on Sunday November 19, 2017 @12:34PM (#15734844)
You realize that "hey" is just the command-line interface to Haiku's view scripting system, right? We don't have a JS/Python interface (yet), but the C++ interface is well documented (see this: https://www.haiku-os.org/legacy-docs/bebook/TheApplicationKi... for an introduction, and also hey's source code: https://github.com/haiku/haiku/blob/master/src/bin/hey.cpp).
Re:Scripting the Haiku GUI with hey by jcelerier on Wednesday November 15, 2017 @04:24AM (#15702536)
> For example, scrolling down to load all my Facebook messages into the left-hand bar.

sounds like an X-Y problem. Why wouldn't you just use the facebook API ?

Re:Scripting the Haiku GUI with hey by peterburkimsher on Wednesday November 15, 2017 @04:45AM (#15702637)
I don't think there's an API to export all my messages.