Commit 0882a4af authored by D1plo1d's avatar D1plo1d

Renaming the project to Printserve (pronserve => printserve)

parent 03049645
......@@ -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/
*Note:* Pronserve is not currently included in the windows binary.
*Note:* Printserve is not currently included in the windows binary.
## Mac OS X
A precompiled version is available at http://koti.kapsi.fi/~kliment/printrun/
*Note:* Pronserve is not currently included in the OSX binary.
*Note:* Printserve is not currently included in the OSX binary.
## Linux
### Ubuntu/Debian
......@@ -47,7 +47,7 @@ Packages are available in AUR. Just run
and enjoy the `pronterface`, `pronsole`, ... commands directly.
*Note:* Pronserve is not currently included in the arch package.
*Note:* Printserve is not currently included in the arch package.
# USING PRONTERFACE
......@@ -63,9 +63,9 @@ See the Slic3r readme for more details on integration.
# USING PRONSERVE
Pronserve runs a server for remotely monitoring and controlling your 3D printer over your network.
Printserve runs a server for remotely monitoring and controlling your 3D printer over your network.
To start the server you can run `./pronserve.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 `./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.
# USING PRONSOLE
......
......@@ -78,33 +78,33 @@ class RootHandler(tornado.web.RequestHandler):
class PrintHandler(tornado.web.RequestHandler):
def put(self):
pronserve.do_print()
printserve.do_print()
self.finish("ACK")
class PauseHandler(tornado.web.RequestHandler):
def put(self):
pronserve.do_pause()
printserve.do_pause()
self.finish("ACK")
class StopHandler(tornado.web.RequestHandler):
def put(self):
pronserve.do_stop()
printserve.do_stop()
self.finish("ACK")
class JobsHandler(tornado.web.RequestHandler):
def post(self):
fileinfo = self.request.files['job'][0]
pronserve.do_add_job(fileinfo['filename'], fileinfo['body'])
printserve.do_add_job(fileinfo['filename'], fileinfo['body'])
self.finish("ACK")
class JobHandler(tornado.web.RequestHandler):
def delete(self, job_id):
pronserve.do_rm_job(job_id)
printserve.do_rm_job(job_id)
self.finish("ACK")
def put(self, job_id):
args = {'position': int(self.get_argument("job[position]"))}
pronserve.do_change_job(job_id, **args)
printserve.do_change_job(job_id, **args)
self.finish("ACK")
......@@ -121,14 +121,14 @@ class ConstructSocketHandler(tornado.websocket.WebSocketHandler):
def on_sensor_changed(self):
for name in ['bed', 'extruder']:
self.send(
sensor_changed= {'name': name, 'value': pronserve.sensors[name]},
sensor_changed= {'name': name, 'value': printserve.sensors[name]},
)
def on_uncaught_event(self, event_name, data):
listener = "on_%s"%event_name
if event_name[:4] == 'job_' and event_name != "job_progress_changed":
data = pronserve.jobs.sanitize(data)
data = printserve.jobs.sanitize(data)
self.send({event_name: data})
def _execute(self, transforms, *args, **kwargs):
......@@ -142,12 +142,12 @@ class ConstructSocketHandler(tornado.websocket.WebSocketHandler):
return "construct.text.0.0.1"
def open(self):
pronserve.listeners.add(self)
printserve.listeners.add(self)
self.write_message({'headers': {
'jobs': pronserve.jobs.public_list(),
'jobs': printserve.jobs.public_list(),
'continous_movement': False
}})
print "WebSocket opened. %i sockets currently open." % len(pronserve.listeners)
print "WebSocket opened. %i sockets currently open." % len(printserve.listeners)
def send(self, dict_args = {}, **kwargs):
args = dict(dict_args.items() + kwargs.items())
......@@ -191,7 +191,7 @@ class ConstructSocketHandler(tornado.websocket.WebSocketHandler):
if cmd in cmds_whitelist:
try:
if cmd == "set": cmd = "construct_set"
response = getattr(pronserve, "do_%s"%cmd)(*args, **kwargs)
response = getattr(printserve, "do_%s"%cmd)(*args, **kwargs)
print response
if response is not None: self.write_message(response)
except:
......@@ -201,8 +201,8 @@ class ConstructSocketHandler(tornado.websocket.WebSocketHandler):
self.write_message({"error": "%s command does not exist."%cmd})
def on_close(self):
pronserve.listeners.remove(self)
print "WebSocket closed. %i sockets currently open." % len(pronserve.listeners)
printserve.listeners.remove(self)
print "WebSocket closed. %i sockets currently open." % len(printserve.listeners)
dir = os.path.dirname(__file__)
settings = dict(
......@@ -243,16 +243,16 @@ class EventEmitter(object):
continue
# Pronserve: Server-specific functionality
# Printserve: Server-specific functionality
# -------------------------------------------------
class Pronserve(pronsole.pronsole, EventEmitter):
class Printserve(pronsole.pronsole, EventEmitter):
def __init__(self, **kwargs):
pronsole.pronsole.__init__(self)
EventEmitter.__init__(self)
self.settings.sensor_names = {'T': 'extruder', 'B': 'bed'}
self.settings.name = 'Pronserve Printer'
self.settings.name = 'Printserve Printer'
self.dry_run = kwargs['dry_run'] == True
self.stdout = sys.stdout
self.ioloop = tornado.ioloop.IOLoop.instance()
......@@ -535,19 +535,19 @@ def warn_if_dry_run():
sys.stdout.write("\x1B[0;33m Dry Run \x1B[0m")
print ""
print "Pronserve is starting..."
pronserve = Pronserve(dry_run=dry_run)
if dry_run==False: pronserve.do_connect("")
print "Printserve is starting..."
printserve = Printserve(dry_run=dry_run)
if dry_run==False: printserve.do_connect("")
time.sleep(1)
pronserve.run_sensor_loop()
pronserve.run_print_queue_loop()
printserve.run_sensor_loop()
printserve.run_print_queue_loop()
if __name__ == "__main__":
application.listen(8888)
print "\n"+"-"*80
welcome = textwrap.dedent(u"""
+---+ \x1B[0;32mPronserve: Your printer just got a whole lot better.\x1B[0m
+---+ \x1B[0;32mPrintserve: Your printer just got a whole lot better.\x1B[0m
| \u2713 | Ready to print.
+---+ More details at http://localhost:8888/""")
warn_if_dry_run()
......@@ -557,6 +557,6 @@ if __name__ == "__main__":
print "-"*80 + "\n"
try:
pronserve.ioloop.start()
printserve.ioloop.start()
except:
pronserve.p.disconnect()
printserve.p.disconnect()
<!doctype html>
<html>
<head>
<title>Pronserve</title>
<title>Printserve</title>
<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">
</head>
......@@ -13,7 +13,7 @@
Your printer just got a whole lot better.
</h1>
<p class="lead">
Pronserve is ready to print. Why not try it out with
Printserve is ready to print. Why not try it out with
<a href="/inspect">Inspector</a> or
<a href="https://github.com/D1plo1d/ctrlpanel">Ctrl Panel</a>?
</p>
......
<!doctype html>
<html>
<head>
<title>Pronserve Inspector</title>
<title>Printserve Inspector</title>
<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 href="/static/css/inspect.css" rel="stylesheet">
......@@ -13,7 +13,7 @@
<div class="row-fluid">
<div class="span12">
<h1>
Pronserve Inspector
Printserve Inspector
</h1>
<h2>Console</h2>
<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