summaryrefslogtreecommitdiff
path: root/src/portal/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/portal/scripts')
-rwxr-xr-xsrc/portal/scripts/create_vendor.sh28
-rwxr-xr-xsrc/portal/scripts/run_py.sh4
2 files changed, 32 insertions, 0 deletions
diff --git a/src/portal/scripts/create_vendor.sh b/src/portal/scripts/create_vendor.sh
new file mode 100755
index 0000000..f4d551e
--- /dev/null
+++ b/src/portal/scripts/create_vendor.sh
@@ -0,0 +1,28 @@
+#! /usr/bin/env sh
+
+python3 -m venv ./venv
+source ./venv/bin/activate
+
+cd vendor/
+rm -r vendor/
+
+pip3 install -r ../requirements.txt --upgrade --target=./vendor
+
+cd yt-dlp/
+pip3 install . --upgrade --target=../vendor
+cd ../
+
+cd snscrape/
+pip3 install . --upgrade --target=../vendor
+cd ../
+
+cd pixivpy/
+pip3 install . --upgrade --target=../vendor
+cd ../
+
+cd instagrapi/
+pip3 install . --upgrade --target=../vendor
+cd ../
+
+cd ../
+rm -r venv
diff --git a/src/portal/scripts/run_py.sh b/src/portal/scripts/run_py.sh
new file mode 100755
index 0000000..ddbe869
--- /dev/null
+++ b/src/portal/scripts/run_py.sh
@@ -0,0 +1,4 @@
+#! /usr/bin/env sh
+export PYTHONDONTWRITEBYTECODE=1
+export PYTHONPATH=$HOME/c/camu/src/portal/vendor/vendor
+python3 $@