Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions README_dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
- [Taskfile](https://taskfile.dev/installation/)
- [httpie cli](https://httpie.io/cli)
- Node.js / npm
- [jq](https://jqlang.org/download/)
`sudo apt-get install jq`
- [qrencode](https://github.com/fukuchi/libqrencode)
`sudo apt-get install qrencode`
- [jq](https://jqlang.org/download/)
`sudo apt-get install jq` or `brew install jq`
- [qrencode](https://github.com/fukuchi/libqrencode)
`sudo apt-get install qrencode` or `brew install qrencode`
- (only on mac) [coreutils](https://formulae.brew.sh/formula/coreutils)
`brew install coreutils`

## Taskfile tasks

Expand Down
14 changes: 7 additions & 7 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ tasks:
vars: [STUDENT_ID]
vars:
LOGO_BASE64:
sh: 'cat assets/Logo_GM.png | {{if eq OS "darwin"}}base64{{else}}base64 -w 0{{end}}'
sh: "cat assets/Logo_GM.png | base64 -w 0"

create-onboarding-pdf-with-custom-values:
desc: Gets the onboarding document as PDF
Expand All @@ -66,7 +66,7 @@ tasks:
vars: [STUDENT_ID]
vars:
LOGO_BASE64:
sh: 'cat assets/Logo_GM.png | {{if eq OS "darwin"}}base64{{else}}base64 -w 0{{end}}'
sh: "cat assets/Logo_GM.png | base64 -w 0"

create-onboarding-pdf-with-custom-jpg-logo:
desc: Gets the onboarding document as PDF
Expand All @@ -76,7 +76,7 @@ tasks:
vars: [STUDENT_ID]
vars:
LOGO_BASE64:
sh: 'cat assets/Logo_GM.jpg | {{if eq OS "darwin"}}base64{{else}}base64 -w 0{{end}}'
sh: "cat assets/Logo_GM.jpg | base64 -w 0"

get-onboarding-png:
desc: Gets the onboarding document as PNG
Expand Down Expand Up @@ -105,7 +105,7 @@ tasks:
- 'echo "{{.FILE_BASE64}}"'
vars:
FILE_BASE64:
sh: 'cat assets/Zeugnis.pdf | {{if eq OS "darwin"}}base64{{else}}base64 -w 0{{end}}'
sh: "cat assets/Zeugnis.pdf | base64 -w 0"

get-student:
desc: Call the get-student endpoint
Expand Down Expand Up @@ -137,7 +137,7 @@ tasks:
- 'echo -n ''{"file": "{{.FILE_BASE64}}", "filename": "Abiturzeugnis.pdf", "title": "Abiturzeugnis", "mimetype": "application/pdf"}'' | http -b POST localhost:8099/students/{{.STUDENT_ID}}/files ''X-API-KEY: This_is_a_test_APIKEY_with_30_chars+'' | jq'
vars:
FILE_BASE64:
sh: 'cat assets/Zeugnis.pdf | {{if eq OS "darwin"}}base64{{else}}base64 -w 0{{end}}'
sh: "cat assets/Zeugnis.pdf | base64 -w 0"
requires:
vars: [STUDENT_ID]

Expand All @@ -147,7 +147,7 @@ tasks:
- 'echo -n ''{"file": "{{.FILE_BASE64}}"}'' | http -b POST localhost:8099/students/{{.STUDENT_ID}}/files/abiturzeugnis ''X-API-KEY: This_is_a_test_APIKEY_with_30_chars+'' | jq'
vars:
FILE_BASE64:
sh: 'cat assets/Zeugnis.pdf | {{if eq OS "darwin"}}base64{{else}}base64 -w 0{{end}}'
sh: "cat assets/Zeugnis.pdf | base64 -w 0"
requires:
vars: [STUDENT_ID]

Expand All @@ -157,7 +157,7 @@ tasks:
- 'echo -n ''{"file": "{{.FILE_BASE64}}", "messageSubject": "{{.SUBJECT}}", "messageBody": "{{.BODY}}"}'' | http -b POST localhost:8099/students/{{.STUDENT_ID}}/files/abiturzeugnis ''X-API-KEY: This_is_a_test_APIKEY_with_30_chars+'' | jq'
vars:
FILE_BASE64:
sh: 'cat assets/Zeugnis.pdf | {{if eq OS "darwin"}}base64{{else}}base64 -w 0{{end}}'
sh: "cat assets/Zeugnis.pdf | base64 -w 0"
SUBJECT: "Ihr Abiturzeugnis"
BODY: Hallo {{"{{"}}student.givenname{{"}}"}} {{"{{"}}student.surname{{"}}"}},\n\nherzlichen Glückwunsch zum Abitur! Wir freuen uns, Ihnen mitteilen zu können, dass wie ihnen ihr Abiturzeugnis zusenden können.\n\nIhr offizielles Zeugnis liegt in Ihren Dokumenten und Dateien zur weiteren Verwendung bereit.\n\nMit freundlichen Grüßen\nIhr {{"{{"}}organization.displayName{{"}}"}}
requires:
Expand Down