12 lines
390 B
Bash
12 lines
390 B
Bash
#!/bin/bash
|
|
# Punch in: set startTime, clear the rest.
|
|
set -euo pipefail
|
|
|
|
F="$HOME/long-day-factory.json"
|
|
TS="$(python3 -c 'import datetime;print(datetime.datetime.now().astimezone().isoformat(timespec="seconds"))')"
|
|
|
|
printf '{\n "startTime": "%s",\n "lunchTime": null,\n "backToWork": null\n}\n' "$TS" > "$F"
|
|
|
|
echo "Clocked in to the Long Day Factory at $TS"
|
|
echo "Wrote $F"
|