This repository has been archived on 2021-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
pubscripts/generate.sh

43 lines
777 B
Bash
Executable File

#!/bin/sh
mkdir -p output
echo "Using $CALENDAR_URL as Nextcloud calendar URL..."
clone_repos() {
if ! type git > /dev/null 2>&1; then
apk add --no-cache git
fi
git clone https://git.autonomic.zone/ruangrupa/lumbung-video-prototype
git clone https://git.autonomic.zone/ruangrupa/lumbung-calendar-prototype
}
install_deps() {
cd lumbung-video-prototype
pip install -r requirements.txt -q
cd -
cd lumbung-calendar-prototype
pip install -r requirements.txt -q
cd -
}
gen_vid() {
export OUTPUT_DIR=/drone/src/output/video
cd lumbung-video-prototype
python video-feed.py
cd -
}
gen_cal() {
export OUTPUT_DIR=/drone/src/output/calendar
cd lumbung-calendar-prototype
python event_feed.py
cd -
}
clone_repos
install_deps
gen_vid
gen_cal