graffiti / prepare.sh
artificialhoney's picture
feat: graffiti.org palette
f5fc4d8
raw
history blame contribute delete
No virus
656 Bytes
#!/usr/bin/env bash
args=("$@")
list () {
echo "Running 'list' with '$1'"
rm -f files.list
find ./$1 -name '*.jpg' -print > files.list
}
meta () {
echo "Running 'meta' for '$1'"
rm -f ./data/$1/metadata.jsonl
while read p; do
jq . "$p".json -cM >> ./data/$1/metadata.jsonl
done < files.list
}
tar () {
echo "Running 'meta' for '$1' with '$2'"
rm -f ./data/$1/$2.tar.gz
tar czf ./data/$1/$2.tar.gz --files-from files.list
}
test () {
echo "Running 'test'"
datasets-cli test graffiti.py --save_info --all_config
}
if [ -z "${args[0]}" ]
then
echo "No task supplied"
exit 1
fi
${args[0]} ${args[1]} ${args[2]}