From e5bfb2121e3f755c64e240f6d995ca76ff639c78 Mon Sep 17 00:00:00 2001 From: Drew Fisher Date: Wed, 7 May 2014 19:33:18 -0700 Subject: [PATCH] Update README. ribbon_passthrough serves its own assets. --- README.md | 44 ++++++++++++++++++++++++++++--- reactornado/ribbon_passthrough.py | 3 +++ 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e56155d..6e0fec4 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,49 @@ imoo +==== -A cow-erful web frontend to bitlbee. +A web-based chat gateway. -SETUP +Dependencies: + - libpurple (tested against 2.10.9) + - qt5 + - python + - Linux (We currently rely on the Qt-glib eventloop integration, which only exists on Linux.) + - A modern web browser + +Setup +----- + +Build ribbon, the network-socket-to-libpurple adapter: + +```bash +cd ribbon +qmake-qt5 ribbon.pro +make +cd ../ +``` + +Prepare a virtualenv: + +```bash +virtualenv env +env/bin/pip install tornado +``` + +Run the server: + +```bash +cd reactornado +../env/bin/python ribbon_passthrough.py +``` + +Then, point your browser at http://localhost:8889 + +-------------------------------------------------- + +Some other stuff for server-side persistence (backburnered for now) ```bash virtualenv env -env/bin/pip install Flask Flask-Login Flask-SQLAlchemy Flask-WTF Flask-Scrypt Flask-RESTful sqlalchemy-migrate +env/bin/pip install Flask Flask-Login Flask-SQLAlchemy Flask-WTF Flask-Scrypt Flask-RESTful sqlalchemy-migrate tornado ./run.py ``` diff --git a/reactornado/ribbon_passthrough.py b/reactornado/ribbon_passthrough.py index 8d3c110..3a24aaa 100644 --- a/reactornado/ribbon_passthrough.py +++ b/reactornado/ribbon_passthrough.py @@ -72,6 +72,9 @@ class WSHandler(tornado.websocket.WebSocketHandler): application = tornado.web.Application([ + (r'/(index.html)', tornado.web.StaticFileHandler, {'path': pwd}), + (r'/([a-z]*\.js)', tornado.web.StaticFileHandler, {'path': pwd}), + (r'/([a-z]*\.css)', tornado.web.StaticFileHandler, {'path': pwd}), (r'/ws', WSHandler), ]) -- 2.39.5