bash script to import xml, fix proportion

This commit is contained in:
Tykayn 2021-03-03 16:04:26 +01:00 committed by tykayn
parent 42c92e6047
commit 79bf2f4847
3 changed files with 12 additions and 2 deletions

2
app.js
View File

@ -43,7 +43,7 @@ const port = 3300
app.listen(port, () => { app.listen(port, () => {
console.log(`Example app listening at http://localhost:${port}`) console.log(`gtg2json app listening at http://localhost:${port}`)
}) })
module.exports = app; module.exports = app;

10
import_xml.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
echo " _____ import files from ~/.var/app/org.gnome.GTG/data/gtg ____"
cp ~/.var/app/org.gnome.GTG/data/gtg/*.xml ./sources
ls -larth sources/*.xml
echo " _____ ok files imported ____"
echo " _____ you can convert with running 'node app.js' ____"
echo " _____ and open http://localhost:3300/ ____"

View File

@ -36,7 +36,7 @@ block content
if t.tasksListIsActiveByTitle if t.tasksListIsActiveByTitle
span.text-right.tasks #{t.tasksListIsActiveByTitle.length} span.text-right.tasks #{t.tasksListIsActiveByTitle.length}
span.text-right.tasks(class=computeBgColorOnProportionOfOpenTasks(getPercent(t.tasksListIsActiveByTitle.length, t.tasks))) #{getPercent(t.tasksListIsActiveByTitle.length, t.tasks)} % span.text-right.tasks(class=computeBgColorOnProportionOfOpenTasks(getPercent(t.tasksListIsActiveByTitle.length, t.tasks))) #{getPercent(t.tasksListIsActiveByTitle.length, t.tasks)} %
span.text-right.tasks #{getPercentOfOpenTasks(t.tasksListIsActiveByTitle.length)} % span.text-right.tasks #{getPercent(t.tasksListIsActiveByTitle.length,json.stats.listOpen.length )} %
button.text-right.toggle voir button.text-right.toggle voir
ul ul
each activetask in t.tasksListIsActiveByTitle each activetask in t.tasksListIsActiveByTitle