evolvedlight / pydashie Goto Github PK
View Code? Open in Web Editor NEWPort of Dashing to python
License: MIT License
Port of Dashing to python
License: MIT License
Dashing allow for updates from remote systems through a call to a widget
e.g.; curl -d '{ "auth_token": "YOUR_AUTH_TOKEN", "current": 100 }' http://localhost:5000/widgets/karma
Is there similar functionality here?
Can't seem to run this with this error
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 14218: ordinal not in range(128)
Steps I did
New venv
pip install -r requirenments
python setup.py install
cd pydashing
python main.py
Dashing.Comments, Dashing.Meter, etc is statically compiled into application.js. When a new widget is created in widgets/$widget_name, its associated class does not automagically get concatenated into application.js by main.py's javascripts() handlers.
I know how to fix this, but wanted to confirm that I'm not missing anything obvious to get a new widget working under pydashie dev.
It's not a real issue about pydashie, but the setup of the project. I would like to know how you deploy the project with uwsgi and nginx.
Everything seems to be ok for the assets but not the /events.
Would you have some nginx conf and .ini to show ?
Hi,
I'm sorry but I can't use pydashie.
I don't know how I could access to web interface
Thanks by advance
Best Regards
I can't seem to get numbers widget to update. Code is really simple in that it grabs a number from restful API and the app returns that number. I have text working perfectly right now and I ran through all of the samples. Any ideas?
21 s = {'number':count}
22 return s
23
Here I am printing up the the number=count so I know its getting there.
INFO:main:New Client 43076 connected. Total Clients: 5
{'number': 718}
Awesome project, I can't use it until I know what the open source license is, I assume it is the MIT similar to Dashie, but the license.txt is empty :)
Thanks!
The default "Synergy" widget updates fine in Chrome and Safari (Mac) and Chrome (Linux) but does not update on Firefox (Mac and Linux).
The Meter widget for Dashing (in Ruby) does update on Firefox on both Mac and Linux.
I've created a new widget and that's all working fine; the text in my widget is updating correctly when an event is fired.
I created the new widget by adding this to the app.js file:
(function() {
var __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Dashing.Quote = (function(_super) {
__extends(Quote, _super);
function Quote() {
return Quote.__super__.constructor.apply(this, arguments);
}
Quote.prototype.ready = function() {};
Quote.prototype.onData = function(data) {};
return Quote;
})(Dashing.Widget);
}).call(this);
And adding all the required files to widgets\quote
However, I'd also like the background-color of the widget to change when an update happens. I have the following in my widget's coffee file:
class Dashing.Quote extends Dashing.Widget
ready: ->
# This is fired when the widget is done being rendered
onData: (data) ->
# Handle incoming data
# You can access the html node of this widget with `@node`
# Example: $(@node).fadeOut().fadeIn() will make the node flash each time data comes in.
@setBackground()
setBackground: ->
$(@node).css("background-color", "#000000");
The background-color never changes....
Is this still supported?
I did install the app, and it is missing templates static files and I get errors when I hit locahost:5000
with python setup.py install
IOError: [Errno 20] Not a directory: '/home/eugenekim/virtualenvs/dashing/local/lib/python2.7/site-packages/PyDashie-0.1dev-py2.7.egg/pydashie/templates/main.html'
with python setup.py develop
Traceback (most recent call last):
File "/home/eugenekim/virtualenvs/dashing/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1836, in call
return self.wsgi_app(environ, start_response)
File "/home/eugenekim/virtualenvs/dashing/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/home/eugenekim/virtualenvs/dashing/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/eugenekim/virtualenvs/dashing/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/home/eugenekim/virtualenvs/dashing/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/eugenekim/virtualenvs/dashing/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/eugenekim/virtualenvs/dashing/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/home/eugenekim/virtualenvs/dashing/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/eugenekim/tmp/pydashie/pydashie/main.py", line 83, in application_css
output = output + open(path).read()
IOError: [Errno 2] No such file or directory: 'assets/stylesheets/application.css'
Traceback (most recent call last):
File "/home/eugenekim/virtualenvs/dashing/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1836, in call
return self.wsgi_app(environ, start_response)
File "/home/eugenekim/virtualenvs/dashing/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/home/eugenekim/virtualenvs/dashing/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/eugenekim/virtualenvs/dashing/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/home/eugenekim/virtualenvs/dashing/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/eugenekim/virtualenvs/dashing/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/eugenekim/virtualenvs/dashing/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/home/eugenekim/virtualenvs/dashing/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/eugenekim/tmp/pydashie/pydashie/main.py", line 54, in javascripts
f = open(path)
IOError: [Errno 2] No such file or directory: 'assets/javascripts/jquery.js'
with pip install -e git+git://github.com/evolvedlight/pydashie.git#egg=pydashie.egg
$ pydashie
Traceback (most recent call last):
File "/home/eugenekim/virtualenvs/dashing/bin/pydashie", line 5, in
from pkg_resources import load_entry_point
File "/home/eugenekim/virtualenvs/dashing/local/lib/python2.7/site-packages/pkg_resources.py", line 2829, in
working_set = WorkingSet._build_master()
File "/home/eugenekim/virtualenvs/dashing/local/lib/python2.7/site-packages/pkg_resources.py", line 449, in _build_master
ws.require(requires)
File "/home/eugenekim/virtualenvs/dashing/local/lib/python2.7/site-packages/pkg_resources.py", line 742, in require
needed = self.resolve(parse_requirements(requirements))
File "/home/eugenekim/virtualenvs/dashing/local/lib/python2.7/site-packages/pkg_resources.py", line 620, in resolve
if dist is None or (dist not in req and replace_conflicting):
File "/home/eugenekim/virtualenvs/dashing/local/lib/python2.7/site-packages/pkg_resources.py", line 2717, in contains
item = item.parsed_version
File "/home/eugenekim/virtualenvs/dashing/local/lib/python2.7/site-packages/pkg_resources.py", line 2321, in parsed_version
self._parsed_version = pv = parse_version(self.version)
File "/home/eugenekim/virtualenvs/dashing/local/lib/python2.7/site-packages/pkg_resources.py", line 2335, in version
raise ValueError(tmpl % self.PKG_INFO, self)
ValueError: ("Missing 'Version:' header and/or PKG-INFO file", pydashie unknown version)
What am I missing?
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.