Compare commits

...

4 Commits

Author SHA1 Message Date
daf3acd8a2 moving to trixie
All checks were successful
/ Plan (push) Successful in 8m17s
/ Plan (pull_request) Successful in 29s
/ Deploy (pull_request) Successful in 25s
2025-08-18 14:39:16 -05:00
56a0f40d01 added the missing period
All checks were successful
/ Plan (push) Successful in 42s
/ Plan (pull_request) Successful in 3m50s
/ Deploy (pull_request) Successful in 14s
2025-01-01 00:27:32 -06:00
45f67c3cce changing logic for ill check
All checks were successful
/ Plan (push) Successful in 50s
/ Plan (pull_request) Successful in 8s
/ Deploy (pull_request) Successful in 18s
2025-01-01 00:23:48 -06:00
6ad7709983 forgot to initialize isill properly
All checks were successful
/ Plan (push) Successful in 1m4s
/ Plan (pull_request) Successful in 9s
/ Deploy (pull_request) Successful in 19s
2025-01-01 00:18:32 -06:00
2 changed files with 8 additions and 16 deletions

View File

@@ -1,19 +1,9 @@
FROM debian:bullseye-slim
FROM debian:trixie-slim
#
RUN apt update && apt install cron apache2 python3 python3-pip php libapache2-mod-php -y
RUN a2enmod php*
COPY crontab /crontab
COPY requirements.txt crontab init.sh /
COPY refresh.php /var/www/html/
RUN apt update && apt install cron apache2 python3 python3-pip php libapache2-mod-php -y && pip3 install -r /requirements.txt --break-system-packages && apt clean && a2enmod php* && chmod +x /init.sh && mkdir /var/www/.aws
COPY libnotices.py /usr/local/bin/
COPY requirements.txt /
COPY init.sh /
RUN chmod +x /init.sh
RUN pip3 install -r /requirements.txt
RUN mkdir /var/www/.aws
RUN chmod +x /usr/local/bin/libnotices.py
RUN chown www-data:www-data /var/www -R
RUN crontab -u www-data /crontab
RUN apt clean
RUN chmod +x /usr/local/bin/libnotices.py && chown www-data:www-data /var/www -R && crontab -u www-data /crontab
EXPOSE 80
CMD ["/init.sh"]
#(cron -l 8 & ) && su - www-data -s /usr/local/bin/libnotices.py & apache2ctl -D FOREGROUND]
CMD ["/init.sh"]

View File

@@ -131,6 +131,7 @@ for myaccount in accounts:
outs = session.get(checkoutsuri)
if len(outs.json()) >=1:
for mybook in outs.json():
isill=False
if mybook['vendor']=='overdrive':
continue
if mybook['vendor']=='hoopla':
@@ -139,7 +140,8 @@ for myaccount in accounts:
myisbn = mybook['resource']['coverUrl']['small'].split('=')[1].split("/")[0]
except:
myisbn=''
if re.match("*ILL",mybook['resource']['title']):
if myisbn=='':
if re.match(".*ILL",mybook['resource']['title']):
isill=True
try:
mycoverurl = mybook['resource']['coverUrl']['small']