Skip to content

Commit

Permalink
feat: json version of acset to latex (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwdchang committed Oct 17, 2023
1 parent 31502a0 commit d54f517
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/ModelService.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,20 @@ route("/api/petri-to-latex", method = POST) do
return model_latex.s
end

route("/api/petri-to-latex-json", method = POST) do
payload = jsonpayload()
model = parse_json_acset(LabelledPetriNet, json(payload))
model_odesys = ODESystem(model)
model_latex = latexify(model_odesys)
println(model_latex.s)
return json(
Dict([
(:latex, model_latex.s)
])
)
end



@swagger """
/api/stratify:
Expand Down

0 comments on commit d54f517

Please sign in to comment.