#!/usr/bin/env bash set -eu go build -o tmp/intake rm tmp/intake.db* || true export INTAKE_DATA_DIR="tmp" tmp/intake migrate tmp/intake source add -s feedtest tmp/intake item add -s feedtest --id "this-item-has-no-title" tmp/intake item add -s feedtest --title "This item has only a title" tmp/intake item add -s feedtest --title "Title and body" --body "This is the item body" tmp/intake item add -s feedtest --title "Title and link" --link "#" tmp/intake item add -s feedtest --title "Title, link, body" --link "#" --body "This is the body" tmp/intake item add -s feedtest --title "HTML title" --link "#" --body "HTML body" tmp/intake item add -s feedtest --title "Title and author" --author "Authorname" tmp/intake item add -s feedtest --title "Title, author, time" --author "Authorname" --time 1700000000 tmp/intake item add -s feedtest --title "Title, time" --time 1737780324 tmp/intake item add -s feedtest --title "Title, author, body" --author "Authorname" --body "Hello body!" tmp/intake item add -s feedtest --title "Title, author, time, body" --author "Authorname" --time 1700000000 --body "Hello body!" tmp/intake item add -s feedtest --title "Title, time, body" --time 1737780324 --body "Hello, body!" tmp/intake item add -s feedtest --title "TTL 30s" --ttl 30 tmp/intake item add -s feedtest --title "TTL 10d" --ttl 864000 tmp/intake item add -s feedtest --title "TTD 30s" --ttd 30 tmp/intake item add -s feedtest --title "TTS 30s" --tts 30 tmp/intake item add -s feedtest --title "TTS -10d" --tts "-864000" tmp/intake source add -s spook tmp/intake action add -s spook -a spookier -- jq -c '.title = .title + "o"' tmp/intake item add -s spook --id boo --title "Boo" --action '{"spookier": true}' tmp/intake source add -s nothing tmp/intake channel add -c all -s feedtest tmp/intake channel add -c all -s spook tmp/intake channel add -c none -s nothing