Remix
>>/11259/
> echo -e "{ \\
Double backslash messed it up. Intention: escape double quote + escape newline. Actuality: escape backslash. I made that code multiple lines for readability here. The code I run has no newlines.
>>/11261/
> Update it to do that
"Done". Script foal command which should work:
$ read -p "src:" src; read -p "tags:" tags; read -p "url:" \
url; read -p "time:" time; datetime=$(TZ=UTC date -u +%Y%m%d\
%H%M%S); echo -e "{ \"source\": \"$src\", \"url\": \"$url \"\
, \"uploaded\": \"$time\", \"tags\": \"$tags\" }" > $datetim\
e.json; echo $datetime.json; cat $datetime.json; cat $dateti\
me.json | xsel -ib; id="$(echo $url | sed "s/.*\///g")"; mkd\
ir -p "./memento/$datetime/derpibooru.org"; curl -sL https:/\
/derpibooru.org/$id > "./memento/$datetime/derpibooru.org/$i\
d"; mkdir -p "./memento/$datetime/derpibooru.org/api/v1/jso\
n"; curl -sL https://derpibooru.org/api/v1/json/images/$id >\
"./memento/$datetime/derpibooru.org/api/v1/json/$id"
This creates more data (folders), but should be better because it conforms to the memento archival standard.