main
Dorian 3 years ago
parent 0316b1e2e1
commit 9788c2f9bd

@ -47,11 +47,12 @@ Everytime the webpage load it will first get the New/Full moon dates from the AP
1. clone the repository 1. clone the repository
2. install requirements `pip install -r requirements.txt` 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 ```bash
$HOST = "" FTP_HOST=""
$USERNAME = "" FTP_USERNAME=""
$PASSWORD = "" FTP_PASSWORD=""
``` ```
### For every updates of the website ### For every updates of the website
@ -59,7 +60,7 @@ $PASSWORD = ""
1. make your edits to the `content/` folder 1. make your edits to the `content/` folder
2. `add`, `commit` and `push` your changes to the directory 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 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`. If a change don't appear immediatly it's possible you have to hard refresh using `ctrl`+`shift`+`r`.

@ -1,6 +1,20 @@
if [ ! -f .env ] #!/usr/bin/env bash
# get variable from .env file
if [ -f .env ]
then then
export $(cat .env | xargs) export $(cat .env | xargs)
fi fi
lftp -e "open $HOST; user $USERNAME $PASSWORD; mirror -Rnev --ignore-time --parallel=10 ./output /www/moonwalks.be/ ;"
# 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"

Binary file not shown.
Loading…
Cancel
Save