SpaSca : open SCAffolding to SPAcially and textualy explore interfaces https://fabien.benetou.fr/pub/home/future_of_text_demo/engine/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
text-code-xr-engine/packing_directory_script

15 lines
566 B

1 month ago
#!/bin/bash
cd public
echo -n '[' > ../pack.json; for X in *;
do
echo -n "{\"filename\":\"$X\", \"content\":\"$(base64 -w0 $X)\"" >> ../pack.json;
# curl --insecure -I https://192.168.0.129:3000/$X | grep "Content-Type" | sed 's/;.*//' | sed 's/\(.*\): \(.*\)/,"\1":"\2"/' #>> ../pack.json;
echo -n ",\"contenttype\":\"" >> ../pack.json;
curl --insecure -I -s -o /dev/null -w '%header{Content-Type}' https://192.168.0.129:3000/$X | sed 's/;.*//' >> ../pack.json;
echo -n "\"}," >> ../pack.json;
done;
sed -i "s/.$//" ../pack.json;
echo -n "]" >> ../pack.json