reorg repo

This commit is contained in:
Bel LaPointe
2022-02-16 12:01:11 -07:00
parent 8cd9a5d472
commit 9739a73265
45 changed files with 12 additions and 13 deletions

7
server/testdata/fill_tree.sh vendored Normal file
View File

@@ -0,0 +1,7 @@
#! /bin/bash
curl localhost:3004/api/v0/files/A -X PUT -d 'A' -H 'Title: A'
curl localhost:3004/api/v0/files/A/AA -X PUT -d 'AA' -H 'Title: AA'
curl localhost:3004/api/v0/files/A/AA/AAA -X PUT -d 'AAA' -H 'Title: AAA'
curl localhost:3004/api/v0/files/A/AB -X PUT -d 'AB' -H 'Title: AB'
curl localhost:3004/api/v0/files/B -X PUT -d 'B' -H 'Title: B'

21
server/testdata/runbooks_to_files.sh vendored Normal file
View File

@@ -0,0 +1,21 @@
#! /bin/bash
cd "$(dirname "$BASH_SOURCE")"
files_d="$PWD/files"
runbooks_d="$HOME/repos/runbooks"
find "$runbooks_d" -type f -name "*.md" | while read -r line; do
relative="${line#$runbooks_d/}"
echo relative=$relative
mkdir -p "$files_d"/"${relative%.md}"
content="$(cat "$line" | jq -sR)"
printf '{
"content": %s,
"title": "%s"
}' "$content" "${relative##*/}" > "$files_d"/"${relative%.md}"/data.yaml
done
find "$files_d" -type d | while read -r files_d; do
echo asserting "$files_d/data.yaml"
if [ ! -f "$files_d"/data.yaml ]; then
printf '{"title": "%s"}' "${files_d##*/}" > "$files_d"/data.yaml
fi
done

1
server/testdata/ui vendored Symbolic link
View File

@@ -0,0 +1 @@
../../ui/