Note
Go find the the tool on https://codeberg.org/schnelles_geraet/checklist-tool
To simplifly development on Windows and Linux earthly is used to build the project.
earthly +run --tag="test"The outputs a image called ghcr.io/hmaier-dev/checklist-tool:test. Run this image by using the compose stack.
earthly +run --tag="test" && docker compose upA example compose stack is within the root of the project.
Use this command to run it raw without earthly
go build -x -v -p 4 -o ./bin/cltool main.go && tailwindcss -i ./static/base.css -o ./static/style.css && ./bin/cltool -db=sqlite.dbAll changes to the database schema/queries are done in the sql-files in root (schema.sql and query.sql). After making changes, you need to run
sqlc generatefrom the project-root which contains the config file sqlc.yml.
Warning
Please beware that sqlc does not run any migrations. You can break existing databases by adjusting your schema.
A example compose.yml can be found under the root of this project.
The gotenberg-Container is used for the creation of pdfs. The checklist-tool can be run without gotenberg, but will throw an error when a checklist gets exported:
checklist-tool/internal/pdf/pdf.go
Line 13 in 66159b4
This app uses yaml store the checklist itself and a preceding frontmatter to store all meta-data.
A checklist can look like this:
---
name: auf arbeit gehen
fields: [fullname,ticket,typ]
desc: ["Nachname, Vorname","Ticket Number","Modell"]
tab_desc_schema: [fullname,typ]
pdf_name_schema: [date,fullname,typ]
---
- task: "Auf Arbeit kommen."
checked: false
text: "Setze diesen Schlüssel, um ein Textfeld anzuzeigen."
children:
- task: "Kaffee trinken."
checked: false
- task: "Tickets bearbeiten."
checked: falseIs the place where all the meta-data is stored.
| Key | Data |
|---|---|
| fields | Takes a list of keys, which will store user input (need to be the same length as desc). E.g. fields[2] == desc[2] |
| desc | Takes a list of quoted strings, which function as labels for the input fields (need to be the same length as fields) E.g. desc[1] == fields[1] |
| tab_desc_schema | Defines the browser-tab-description-schema. Use the fields seperated by ,. Values will be display separated by | |
| pdf_name_schema | Defines how the pdf will be named. Use the fields seperated by ,. Values will be display separated by _. An extra field is date (only available in this key) which displays the current date when exporting in yyyyMMdd-format. |
Note
Note that, the task-string is used as an identifier and cannot be used twice!
At work I'm dealing with mobile devices, whose setup require multiple steps I need to keep track of. This is not just for me but also for quality assurance. Working with/in PDFs is tireseome in serveral ways. So I decided to write this small project, which should ease my time setup up the devices.