Install from git
This commit is contained in:
parent
3444cdbc59
commit
e46d8145a7
@ -1,7 +1,8 @@
|
|||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
ENV TARGET=/opt/polyphonic
|
ENV TARGET=/opt/polyphonic
|
||||||
ENV RELEASE=polyphonic-0.8.4-py3-none-any.whl
|
#ENV RELEASE=polyphonic-0.8.4-py3-none-any.whl
|
||||||
|
ENV RELEASE=git+https://gitea.tfconsulting.com.au/projects/polyphonic.git
|
||||||
|
|
||||||
RUN apk add --no-cache python3 py3-pip git ghostscript sqlite
|
RUN apk add --no-cache python3 py3-pip git ghostscript sqlite
|
||||||
|
|
||||||
@ -10,7 +11,7 @@ WORKDIR /root
|
|||||||
RUN python3 -m venv ${TARGET}
|
RUN python3 -m venv ${TARGET}
|
||||||
ENV PATH="${TARGET}/bin:$PATH"
|
ENV PATH="${TARGET}/bin:$PATH"
|
||||||
|
|
||||||
COPY dist/${RELEASE} .
|
#COPY dist/${RELEASE} .
|
||||||
RUN pip3 install ${RELEASE} --no-cache-dir
|
RUN pip3 install ${RELEASE} --no-cache-dir
|
||||||
RUN pip3 install gunicorn whitenoise
|
RUN pip3 install gunicorn whitenoise
|
||||||
|
|
||||||
|
|||||||
@ -65,7 +65,7 @@
|
|||||||
<td class="select-cell">
|
<td class="select-cell">
|
||||||
<input type="hidden" name="works" value="{{ item.work.pk }}"/>
|
<input type="hidden" name="works" value="{{ item.work.pk }}"/>
|
||||||
<span class="select is-small" style="width: 100%">
|
<span class="select is-small" style="width: 100%">
|
||||||
<select name="instruments" id="part-{{ item.work.pk }}" style="width: 100%">
|
<select name="instrument-selection" id="part-{{ item.work.pk }}" style="width: 100%">
|
||||||
<option value='-'>None</option>
|
<option value='-'>None</option>
|
||||||
{% for tag, name in item.work.digital_parts %}
|
{% for tag, name in item.work.digital_parts %}
|
||||||
<option value='{{ tag }}'>{{ name }}</option>
|
<option value='{{ tag }}'>{{ name }}</option>
|
||||||
@ -112,16 +112,23 @@
|
|||||||
const INSTRUMENTS = JSON.parse(document.getElementById('instruments').innerText);
|
const INSTRUMENTS = JSON.parse(document.getElementById('instruments').innerText);
|
||||||
|
|
||||||
function updateParts() {
|
function updateParts() {
|
||||||
var inst = document.getElementById("instrument-name").value;
|
var inst = document.getElementById("instrument-name").value.toLowerCase();
|
||||||
window.localStorage.setItem('instrument-name', inst);
|
window.localStorage.setItem('instrument-name', inst);
|
||||||
|
console.log("Changing to", inst);
|
||||||
|
|
||||||
for (let i of INSTRUMENTS) {
|
for (let i of INSTRUMENTS) {
|
||||||
if (i[1] === inst) inst = i[0];
|
if (i[1].toLowerCase() === inst) {
|
||||||
|
inst = i[0];
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
console.log("Instrument code:", inst);
|
||||||
|
|
||||||
|
|
||||||
let part = document.getElementById("part-preference").value;
|
let part = document.getElementById("part-preference").value;
|
||||||
window.localStorage.setItem('part-preference', part);
|
window.localStorage.setItem('part-preference', part);
|
||||||
|
console.log("Part preference:", part);
|
||||||
|
|
||||||
|
|
||||||
selectParts(inst, part);
|
selectParts(inst, part);
|
||||||
@ -132,10 +139,11 @@ function selectParts(inst, part) {
|
|||||||
|
|
||||||
let prefix = inst + "-" + part;
|
let prefix = inst + "-" + part;
|
||||||
|
|
||||||
let instruments = document.getElementsByName("instruments");
|
let selections = document.getElementsByName("instrument-selection");
|
||||||
for(let i=0; i<instruments.length; i++) {
|
console.log("Updating selections:", prefix, selections);
|
||||||
|
for(let i=0; i<selections.length; i++) {
|
||||||
var result = "-"
|
var result = "-"
|
||||||
let options = instruments[i].children;
|
let options = selections[i].children;
|
||||||
for(let j=0; j<options.length; j++) {
|
for(let j=0; j<options.length; j++) {
|
||||||
let value = options[j].value;
|
let value = options[j].value;
|
||||||
if (value.startsWith(prefix)) {
|
if (value.startsWith(prefix)) {
|
||||||
@ -146,7 +154,8 @@ function selectParts(inst, part) {
|
|||||||
result = value;
|
result = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
instruments[i].value = result;
|
console.log("Selected:", result);
|
||||||
|
selections[i].value = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -168,4 +177,4 @@ updateParts();
|
|||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user