aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/mt-webface.rs
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2017-01-28 21:18:19 -0800
committerbnewbold <bnewbold@robocracy.org>2017-01-28 21:18:19 -0800
commit3bc4e5baae51ef622a2cac98f677487cf9342286 (patch)
tree0af365e1e922708930eda4a00e090023df275df8 /src/bin/mt-webface.rs
parent288ed7bf6c557723b658f9be5694e7a496e5d1f5 (diff)
downloadmodelthing-3bc4e5baae51ef622a2cac98f677487cf9342286.tar.gz
modelthing-3bc4e5baae51ef622a2cac98f677487cf9342286.zip
basic python compiling
Diffstat (limited to 'src/bin/mt-webface.rs')
-rw-r--r--src/bin/mt-webface.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bin/mt-webface.rs b/src/bin/mt-webface.rs
index 4d26d21..8ddcf2e 100644
--- a/src/bin/mt-webface.rs
+++ b/src/bin/mt-webface.rs
@@ -21,6 +21,7 @@ use pencil::method::{Get, Post};
use regex::Regex;
use modelthing::transpile_scheme::TranspileScheme;
use modelthing::transpile_js::{TranspileJS, TranspileJSODE};
+use modelthing::transpile_python::{TranspilePython, TranspilePythonODE};
use modelthing::repr_latex::{ReprLaTeX, ReprVarsHTML};
/*
@@ -111,9 +112,11 @@ fn model_repr(r: &mut Request) -> PencilResult {
match modelthing::load_model_entry(model_path.as_path()) {
Ok(me) => {
match format {
- "scheme" => Ok(Response::from(me.ast.transpile_scheme().unwrap())),
"javascript" => Ok(Response::from(me.ast.transpile_js().unwrap())),
"javascript_ode" => Ok(Response::from(me.ast.transpile_js_ode().unwrap())),
+ "python" => Ok(Response::from(me.ast.transpile_python().unwrap())),
+ "python_ode" => Ok(Response::from(me.ast.transpile_python_ode().unwrap())),
+ "scheme" => Ok(Response::from(me.ast.transpile_scheme().unwrap())),
"latex" => Ok(Response::from(me.ast.repr_latex().unwrap())),
_ => abort(403),
}