Commit 9e126d05 authored by D1plo1d's avatar D1plo1d

Renaming printserve to prontserve. Adding .vagrant to the .gitignore.

parent a1703466
...@@ -4,3 +4,4 @@ ...@@ -4,3 +4,4 @@
*.bak *.bak
uploads uploads
.DS_Store .DS_Store
.vagrant
...@@ -14,13 +14,13 @@ If you want the newest, shiniest features, you can run Printrun from source usin ...@@ -14,13 +14,13 @@ If you want the newest, shiniest features, you can run Printrun from source usin
A precompiled version is available at http://koti.kapsi.fi/~kliment/printrun/ A precompiled version is available at http://koti.kapsi.fi/~kliment/printrun/
*Note:* Printserve is not currently included in the windows binary. *Note:* Prontserve is not currently included in the windows binary.
## Mac OS X ## Mac OS X
A precompiled version is available at http://koti.kapsi.fi/~kliment/printrun/ A precompiled version is available at http://koti.kapsi.fi/~kliment/printrun/
*Note:* Printserve is not currently included in the OSX binary. *Note:* Prontserve is not currently included in the OSX binary.
## Linux ## Linux
### Ubuntu/Debian ### Ubuntu/Debian
...@@ -57,7 +57,7 @@ Packages are available in AUR. Just run ...@@ -57,7 +57,7 @@ Packages are available in AUR. Just run
and enjoy the `pronterface`, `pronsole`, ... commands directly. and enjoy the `pronterface`, `pronsole`, ... commands directly.
*Note:* Printserve is not currently included in the arch package. *Note:* Prontserve is not currently included in the arch package.
# USING PRONTERFACE # USING PRONTERFACE
...@@ -73,9 +73,9 @@ See the Slic3r readme for more details on integration. ...@@ -73,9 +73,9 @@ See the Slic3r readme for more details on integration.
# USING PRONSERVE # USING PRONSERVE
Printserve runs a server for remotely monitoring and controlling your 3D printer over your network. Prontserve runs a server for remotely monitoring and controlling your 3D printer over your network.
To start the server you can run `./printserve.py` in the directory you git cloned printrun too. Once the server starts you can verify it's working by going to http://localhost:8888 in your web browser. To start the server you can run `./prontserve.py` in the directory you git cloned printrun too. Once the server starts you can verify it's working by going to http://localhost:8888 in your web browser.
# USING PRONSOLE # USING PRONSOLE
......
...@@ -77,33 +77,33 @@ class RootHandler(tornado.web.RequestHandler): ...@@ -77,33 +77,33 @@ class RootHandler(tornado.web.RequestHandler):
class PrintHandler(tornado.web.RequestHandler): class PrintHandler(tornado.web.RequestHandler):
def put(self): def put(self):
printserve.do_print() prontserve.do_print()
self.finish("ACK") self.finish("ACK")
class PauseHandler(tornado.web.RequestHandler): class PauseHandler(tornado.web.RequestHandler):
def put(self): def put(self):
printserve.do_pause() prontserve.do_pause()
self.finish("ACK") self.finish("ACK")
class StopHandler(tornado.web.RequestHandler): class StopHandler(tornado.web.RequestHandler):
def put(self): def put(self):
printserve.do_stop() prontserve.do_stop()
self.finish("ACK") self.finish("ACK")
class JobsHandler(tornado.web.RequestHandler): class JobsHandler(tornado.web.RequestHandler):
def post(self): def post(self):
fileinfo = self.request.files['job'][0] fileinfo = self.request.files['job'][0]
printserve.do_add_job(fileinfo['filename'], fileinfo['body']) prontserve.do_add_job(fileinfo['filename'], fileinfo['body'])
self.finish("ACK") self.finish("ACK")
class JobHandler(tornado.web.RequestHandler): class JobHandler(tornado.web.RequestHandler):
def delete(self, job_id): def delete(self, job_id):
printserve.do_rm_job(job_id) prontserve.do_rm_job(job_id)
self.finish("ACK") self.finish("ACK")
def put(self, job_id): def put(self, job_id):
args = {'position': int(self.get_argument("job[position]"))} args = {'position': int(self.get_argument("job[position]"))}
printserve.do_change_job(job_id, **args) prontserve.do_change_job(job_id, **args)
self.finish("ACK") self.finish("ACK")
...@@ -120,14 +120,14 @@ class ConstructSocketHandler(tornado.websocket.WebSocketHandler): ...@@ -120,14 +120,14 @@ class ConstructSocketHandler(tornado.websocket.WebSocketHandler):
def on_sensor_changed(self): def on_sensor_changed(self):
for name in ['bed', 'extruder']: for name in ['bed', 'extruder']:
self.send( self.send(
sensor_changed= {'name': name, 'value': printserve.sensors[name]}, sensor_changed= {'name': name, 'value': prontserve.sensors[name]},
) )
def on_uncaught_event(self, event_name, data): def on_uncaught_event(self, event_name, data):
listener = "on_%s"%event_name listener = "on_%s"%event_name
if event_name[:4] == 'job_' and event_name != "job_progress_changed": if event_name[:4] == 'job_' and event_name != "job_progress_changed":
data = printserve.jobs.sanitize(data) data = prontserve.jobs.sanitize(data)
self.send({event_name: data}) self.send({event_name: data})
def _execute(self, transforms, *args, **kwargs): def _execute(self, transforms, *args, **kwargs):
...@@ -141,12 +141,12 @@ class ConstructSocketHandler(tornado.websocket.WebSocketHandler): ...@@ -141,12 +141,12 @@ class ConstructSocketHandler(tornado.websocket.WebSocketHandler):
return "construct.text.0.0.1" return "construct.text.0.0.1"
def open(self): def open(self):
printserve.listeners.add(self) prontserve.listeners.add(self)
self.write_message({'headers': { self.write_message({'headers': {
'jobs': printserve.jobs.public_list(), 'jobs': prontserve.jobs.public_list(),
'continous_movement': False 'continous_movement': False
}}) }})
print "WebSocket opened. %i sockets currently open." % len(printserve.listeners) print "WebSocket opened. %i sockets currently open." % len(prontserve.listeners)
def send(self, dict_args = {}, **kwargs): def send(self, dict_args = {}, **kwargs):
args = dict(dict_args.items() + kwargs.items()) args = dict(dict_args.items() + kwargs.items())
...@@ -190,7 +190,7 @@ class ConstructSocketHandler(tornado.websocket.WebSocketHandler): ...@@ -190,7 +190,7 @@ class ConstructSocketHandler(tornado.websocket.WebSocketHandler):
if cmd in cmds_whitelist: if cmd in cmds_whitelist:
try: try:
if cmd == "set": cmd = "construct_set" if cmd == "set": cmd = "construct_set"
response = getattr(printserve, "do_%s"%cmd)(*args, **kwargs) response = getattr(prontserve, "do_%s"%cmd)(*args, **kwargs)
print response print response
if response is not None: self.write_message(response) if response is not None: self.write_message(response)
except: except:
...@@ -200,8 +200,8 @@ class ConstructSocketHandler(tornado.websocket.WebSocketHandler): ...@@ -200,8 +200,8 @@ class ConstructSocketHandler(tornado.websocket.WebSocketHandler):
self.write_message({"error": "%s command does not exist."%cmd}) self.write_message({"error": "%s command does not exist."%cmd})
def on_close(self): def on_close(self):
printserve.listeners.remove(self) prontserve.listeners.remove(self)
print "WebSocket closed. %i sockets currently open." % len(printserve.listeners) print "WebSocket closed. %i sockets currently open." % len(prontserve.listeners)
dir = os.path.dirname(__file__) dir = os.path.dirname(__file__)
settings = dict( settings = dict(
...@@ -242,16 +242,16 @@ class EventEmitter(object): ...@@ -242,16 +242,16 @@ class EventEmitter(object):
continue continue
# Printserve: Server-specific functionality # Prontserve: Server-specific functionality
# ------------------------------------------------- # -------------------------------------------------
class Printserve(pronsole.pronsole, EventEmitter): class Prontserve(pronsole.pronsole, EventEmitter):
def __init__(self, **kwargs): def __init__(self, **kwargs):
pronsole.pronsole.__init__(self) pronsole.pronsole.__init__(self)
EventEmitter.__init__(self) EventEmitter.__init__(self)
self.settings.sensor_names = {'T': 'extruder', 'B': 'bed'} self.settings.sensor_names = {'T': 'extruder', 'B': 'bed'}
self.settings.name = 'Printserve Printer' self.settings.name = 'Prontserve Printer'
self.settings.pause_between_prints = True self.settings.pause_between_prints = True
self.dry_run = kwargs['dry_run'] == True self.dry_run = kwargs['dry_run'] == True
self.stdout = sys.stdout self.stdout = sys.stdout
...@@ -535,19 +535,19 @@ def warn_if_dry_run(): ...@@ -535,19 +535,19 @@ def warn_if_dry_run():
sys.stdout.write("\x1B[0;33m Dry Run \x1B[0m") sys.stdout.write("\x1B[0;33m Dry Run \x1B[0m")
print "" print ""
print "Printserve is starting..." print "Prontserve is starting..."
printserve = Printserve(dry_run=dry_run) prontserve = Prontserve(dry_run=dry_run)
if dry_run==False: printserve.do_connect("") if dry_run==False: prontserve.do_connect("")
time.sleep(1) time.sleep(1)
printserve.run_sensor_loop() prontserve.run_sensor_loop()
printserve.run_print_queue_loop() prontserve.run_print_queue_loop()
if __name__ == "__main__": if __name__ == "__main__":
application.listen(8888) application.listen(8888)
print "\n"+"-"*80 print "\n"+"-"*80
welcome = textwrap.dedent(u""" welcome = textwrap.dedent(u"""
+---+ \x1B[0;32mPrintserve: Your printer just got a whole lot better.\x1B[0m +---+ \x1B[0;32mProntserve: Your printer just got a whole lot better.\x1B[0m
| \u2713 | Ready to print. | \u2713 | Ready to print.
+---+ More details at http://localhost:8888/""") +---+ More details at http://localhost:8888/""")
warn_if_dry_run() warn_if_dry_run()
...@@ -557,6 +557,6 @@ if __name__ == "__main__": ...@@ -557,6 +557,6 @@ if __name__ == "__main__":
print "-"*80 + "\n" print "-"*80 + "\n"
try: try:
printserve.ioloop.start() prontserve.ioloop.start()
except: except:
printserve.p.disconnect() prontserve.p.disconnect()
<!doctype html> <!doctype html>
<html> <html>
<head> <head>
<title>Printserve</title> <title>Prontserve</title>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet"> <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
<link href="/static/css/index.css" rel="stylesheet"> <link href="/static/css/index.css" rel="stylesheet">
</head> </head>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
Your printer just got a whole lot better. Your printer just got a whole lot better.
</h1> </h1>
<p class="lead"> <p class="lead">
Printserve is ready to print. Why not try it out with Prontserve is ready to print. Why not try it out with
<a href="/inspect">Inspector</a> or <a href="/inspect">Inspector</a> or
<a href="https://github.com/D1plo1d/ctrlpanel">Ctrl Panel</a>? <a href="https://github.com/D1plo1d/ctrlpanel">Ctrl Panel</a>?
</p> </p>
......
<!doctype html> <!doctype html>
<html> <html>
<head> <head>
<title>Printserve Inspector</title> <title>Prontserve Inspector</title>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet"> <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
<link rel="stylesheet" href="http://cdn.oesmith.co.uk/morris-0.4.1.min.css"> <link rel="stylesheet" href="http://cdn.oesmith.co.uk/morris-0.4.1.min.css">
<link href="/static/css/inspect.css" rel="stylesheet"> <link href="/static/css/inspect.css" rel="stylesheet">
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div class="row-fluid"> <div class="row-fluid">
<div class="span12"> <div class="span12">
<h1> <h1>
Printserve Inspector Prontserve Inspector
</h1> </h1>
<h2>Console</h2> <h2>Console</h2>
<div class="well console"> <div class="well console">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment