Skip to content
Snippets Groups Projects
Commit f0843df8 authored by Vanessa Stehr's avatar Vanessa Stehr
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
venv/
main.py 0 → 100644
import base64
import io
import json
import tarfile
import warnings
import bokehCssPTB
from bokeh.plotting import curdoc
from bokeh.layouts import column, row
from bokeh.models import FileInput, Div, CustomJS, Button, TabPanel, Tabs, Dropdown, TextInput, Button
from bokeh.events import ValueSubmit
VERSION = "0.1.0"
class page():
def __init__(self):
curdoc().template_variables["VERSION"] = VERSION
curdoc().title = "DSI to Latex"
curdoc().add_root(bokehCssPTB.getStyleDiv())
curdoc().theme = bokehCssPTB.getTheme()
self.dsiInput = TextInput(value="", title="DSI unit string:")
self.dsiInput.on_event(ValueSubmit, self.parseInput)
self.dsiSubmitButton = Button(label="Convert", button_type="primary")
self.dsiSubmitButton.on_click(self.parseInput)
self.inputRow = row(children = [self.dsiInput, self.dsiSubmitButton])
curdoc().add_root(self.inputRow)
def parseInput(self):
print(self.dsiInput.value)
thisPage = page()
bokeh~=3.3.2
-e git+https://dockerPull:-jVp9LBaxeKp9HKAe9dw@gitlab1.ptb.de/digitaldynamicmeasurement/bokehCssPtb.git#egg=bokehCssPTB
\ No newline at end of file
{% from macros import embed %}
<!DOCTYPE html>
<html lang="en">
{% block head %}
<head>
{% block inner_head %}
<meta charset="utf-8">
<title>{% block title %}{{ title | e if title else "Bokeh Plot" }}{% endblock %}</title>
{% block preamble -%}{%- endblock %}
{% block resources %}
<style>
html, body {
box-sizing: border-box;
display: flow-root;
height: 100%;
margin: 0;
padding: 0;
}
</style>
{% block css_resources -%}
{{- bokeh_css if bokeh_css }}
{%- endblock css_resources %}
{% block js_resources -%}
{{ bokeh_js if bokeh_js }}
{%- endblock js_resources %}
{% endblock resources %}
{% block postamble %}{% endblock %}
{% endblock inner_head %}
</head>
{% endblock head%}
{% block body %}
<body>
<header>
<h1>DSI Unit String to LaTeX</h1>
</header>
{% block inner_body %}
{% block contents %}
{% for doc in docs %}
{{ embed(doc) if doc.elementid }}
{%- for root in doc.roots %}
{% block root scoped %}
{{ embed(root) }}
{% endblock %}
{% endfor %}
{% endfor %}
{% endblock contents %}
{{ plot_script | indent(4) }}
{% endblock inner_body %}
<footer>
<div class="container">
<div>Contact: <a href="mailto:vanessa.stehr@ptb.de">vanessa.stehr@ptb.de</a></div>
<div>Version: {{ VERSION }}</div>
<div><a href="">this project on Gitlab</a></div>
<div><a href="https://gitlab1.ptb.de/digitaldynamicmeasurement/python_dsi_latex_converter">this functionality as a python library</a></div>
</div>
</footer>
</body>
{% endblock body%}
</html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment