diff --git a/README.md b/README.md index 910c179..e65df94 100644 --- a/README.md +++ b/README.md @@ -47,11 +47,12 @@ Everytime the webpage load it will first get the New/Full moon dates from the AP 1. clone the repository 2. install requirements `pip install -r requirements.txt` -3. create a file with name `.env` in the root folder containing the `ftp` logs, like this +3. install lftp `sudo apt install lftp` +4. create a file with name `.env` in the root folder containing the `ftp` logs, like this ```bash -$HOST = "" -$USERNAME = "" -$PASSWORD = "" +FTP_HOST="" +FTP_USERNAME="" +FTP_PASSWORD="" ``` ### For every updates of the website @@ -59,7 +60,7 @@ $PASSWORD = "" 1. make your edits to the `content/` folder 2. `add`, `commit` and `push` your changes to the directory 3. open a terminal in the root folder of this project and launch the `pelican` command to regenerate -4. launch `sync.sh` +4. launch `./sync.sh` If a change don't appear immediatly it's possible you have to hard refresh using `ctrl`+`shift`+`r`. diff --git a/sync.sh b/sync.sh index 3707d2d..9061726 100644 --- a/sync.sh +++ b/sync.sh @@ -1,6 +1,20 @@ -if [ ! -f .env ] +#!/usr/bin/env bash + +# get variable from .env file +if [ -f .env ] then export $(cat .env | xargs) fi -lftp -e "open $HOST; user $USERNAME $PASSWORD; mirror -Rnev --ignore-time --parallel=10 ./output /www/moonwalks.be/ ;" \ No newline at end of file + +# https://lftp.yar.ru/lftp-man.html + +# -R, --reverse reverse mirror (put files) +# -n, --only-newer download only newer files (-c won't work) +# -e, --delete delete files not present at the source +# -v, --verbose[=level] verbose operation + +# --parallel[=N] download N files in parallel +# note: the number of maximum parallels connections accepted by the ftp can vary, if you get an error reduce it. + +lftp -e "set ssl:verify-certificate false; open $FTP_HOST; user $FTP_USERNAME $FTP_PASSWORD; mirror -Rnev --ignore-time --parallel=4 ./output /www/moonwalks.be ; bye" \ No newline at end of file diff --git a/theme/static/fonts/Symbola.otf b/theme/static/fonts/Symbola.otf deleted file mode 100644 index bbd5f85..0000000 Binary files a/theme/static/fonts/Symbola.otf and /dev/null differ