docs: Get rid of domain in output folder

This commit is contained in:
Elian Doran 2024-07-20 12:26:52 +03:00
parent 30c1810211
commit 621cc4a065
No known key found for this signature in database
2 changed files with 11 additions and 1 deletions

View File

@ -1 +1,4 @@
SHARE_PROTOCOL=https
SHARE_HOST=notes.eliandoran.me
ROOT_NOTE_ID=4yYHqKbLovVX
SHARE_URL=https://notes.eliandoran.me/share/4yYHqKbLovVX

View File

@ -8,4 +8,11 @@ rm -rf "$output_dir"
mkdir -p "$output_dir"
source ./.env
wget -rp -e robots=off "$SHARE_URL" -P "$output_dir"
# Download everything in output/notes.example.com/share/...
share_url="$SHARE_PROTOCOL://$SHARE_HOST/share/$ROOT_NOTE_ID"
wget -rp -e robots=off "$share_url" -P "$output_dir"
# Get rid of the domain in the output folder
mv "$output_dir/$SHARE_HOST"/* "$output_dir/"
rmdir "$output_dir/$SHARE_HOST"