Home

/notify

File: `archive/todo.sh`
```
#!/usr/bin/env bash
set -euo pipefail

MSG="${*:-cli: sudo -E}"

curl -X POST \
  "https://todo-api.leanderziehm.com/texts" \
  -H "accept: */*" \
  -H "Content-Type: application/json" \
  -d "$(printf '{"text":"%s"}' "$MSG")"
```

File: `archive/todo.bat`
```
@echo off
setlocal

set "MSG=%*"

if "%MSG%"=="" exit

curl.exe -X POST ^
  "https://todo-api.leanderziehm.com/texts" ^
  -H "accept: */*" ^
  -H "Content-Type: application/json" ^
  -d "{\"text\":\"%MSG%\"}"

endlocal
```

File: `archive/notify.bat`
```
@echo off
setlocal

set "MSG=%*"

if "%MSG%"=="" set "MSG=cli: sudo -E"

curl.exe -X POST ^
  "https://notify.leanderziehm.com/notify/me" ^
  -H "accept: */*" ^
  -H "Content-Type: application/json" ^
  -d "{\"text\":\"%MSG%\"}"

endlocal
```

File: `archive/notify.sh`
```
#!/usr/bin/env bash
set -euo pipefail

MSG="${*:-cli: sudo -E}"

curl -X POST \
  "https://notify.leanderziehm.com/notify/me" \
  -H "accept: */*" \
  -H "Content-Type: application/json" \
  -d "$(printf '{"text":"%s"}' "$MSG")"
```