pda / slacktv Goto Github PK
View Code? Open in Web Editor NEWSlack bot to set URL shown on TV / digital signage
License: MIT License
Slack bot to set URL shown on TV / digital signage
License: MIT License
@botname: quit
should quit Chrome.
That would temporarily work around issues like #1 (quit and then load a URL) and other issues like tab accumulation and solving strange states like Chrome being off-screen.
In the long run, finer-grained control over Chrome is required.
Currently open(1)
is used to launch URLs in Chrome. There's a number of problems with this:
open
creates a new tab.open
pushes full-screen Chrome onto an invisible desktop.Instead, OSA / [JXA]([osascript -l JavaScript
][osascript]) should be used to control Chrome.
Go's text/template could be used to generate the JavaScript, or it could be static (and possibly pre-compiled) and parameterized for URLs etc.
Some examples / notes:
chrome = Application("Google Chrome");
chrome.activate()
win = chrome.windows[0]; // may not work if running with zero windows.
tab = win.tabs[win.activeTabIndex() - 1];
tab.url = "http://99designs.com/"
tab.reload()
chrome.quit()
An alternate IPC/RPC mechanism would be required for other platforms like GNU/Linux.
Commands @botname: refresh
and @botname: reload
should trigger a browser refresh. This probably requires something like AppleScript / OSA / JavaScript for Automation or something, rather than the currently used and very limited open
command.
It should be possible to install slacktv as a launchd agent/thing, so that it runs when Mac OS boots.
Ideally something like slacktv --install-launchd
or slacktv --install-launchd="SECRET-SLACK-TOKEN-HERE"
would take care of this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.