1
0
Fork 0

Aggiornamento semi-automatico 2023-09-01T12:17:03CEST

This commit is contained in:
ZinRicky 2023-09-01 12:17:03 +02:00
parent 20440c2b6c
commit 22aa11b70d
Signed by: zinricky
GPG Key ID: 91361F2452ADD000
3 changed files with 28 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,2 +1 @@
make.*
public_html/

6
make.bat Normal file
View File

@ -0,0 +1,6 @@
@echo off
cd openring
python "openring.py"
cd ..
zola build

22
make.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
file="./templates/openring.html"
if [ -e "$file" ]; then
file_time=$(date -r "$file" +%s)
tempo_max=$(date -d '16 hours ago' +%s)
fi
if [ ! -e "$file" ] || (( $file_time < $tempo_max )); then
cd openring
./openring -S "feeds.txt" -n 5 < "in.html" > "../templates/openring.html"
./openring_it -S "feeds-it.txt" -n 5 < "in_it.html" > "../templates/openringit.html"
cd ..
else
echo "Feed generato troppo di recente. Operazione saltata."
fi
git add --all
git commit -S -m "Aggiornamento semi-automatico $(date +%Y-%m-%dT%H:%M:%S%Z)"
git push -u origin master
zola build