Skip to content

Build your personal knowledge base with Trilium Notes

docs: Set up basic download script

Elian Doran30c18102118d
diff --git a/docs-new/.env b/docs-new/.env
new file mode 100644
index 0000000000..fa85707e4a
--- /dev/null
+++ b/docs-new/.env
@@ -0,0 +1 @@
+SHARE_URL=https://notes.eliandoran.me/share/4yYHqKbLovVX
\ No newline at end of file
diff --git a/docs-new/.env.example b/docs-new/.env.example
new file mode 100644
index 0000000000..51661dcd3f
--- /dev/null
+++ b/docs-new/.env.example
@@ -0,0 +1 @@
+SHARE_URL=https://notes.example.com/share/4yYHqKbLovVY
\ No newline at end of file
diff --git a/docs-new/.gitignore b/docs-new/.gitignore
new file mode 100644
index 0000000000..6caf68aff4
--- /dev/null
+++ b/docs-new/.gitignore
@@ -0,0 +1 @@
+output
\ No newline at end of file
diff --git a/docs-new/prepare.sh b/docs-new/prepare.sh
new file mode 100755
index 0000000000..735af9818f
--- /dev/null
+++ b/docs-new/prepare.sh
@@ -0,0 +1,11 @@
+if [ ! -f .env ]; then
+ echo "Missing .env file, cannot proceed."
+ exit 1
+fi
+
+output_dir="output"
+rm -rf "$output_dir"
+mkdir -p "$output_dir"
+
+source ./.env
+wget -rp -e robots=off "$SHARE_URL" -P "$output_dir"
\ No newline at end of file