Downloading post files.

This commit is contained in:
Krzysztof Płaczek
2025-08-04 09:02:50 +02:00
parent 1ee5fbf655
commit 40f2b60962
2 changed files with 9 additions and 4 deletions

3
.gitignore vendored
View File

@@ -1,3 +1,4 @@
dist dist
node_modules node_modules
.idea .idea
/public/posts_*.json

View File

@@ -1,5 +1,9 @@
<?php <?php
file_put_contents('public/posts_2023.json',file_get_contents('https://bookmeter.xyz/api/posts?edition=2023')); if (!file_exists('public/posts_2023.json')) {
file_put_contents('public/posts_2024.json',file_get_contents('https://bookmeter.xyz/api/posts?edition=2024')); file_put_contents('public/posts_2023.json', file_get_contents('https://bookmeter.xyz/api/posts?edition=2023'));
file_put_contents('public/posts_2025.json',file_get_contents('https://bookmeter.xyz/api/posts?edition=2025')); }
if (!file_exists('public/posts_2024.json')) {
file_put_contents('public/posts_2024.json', file_get_contents('https://bookmeter.xyz/api/posts?edition=2024'));
}
file_put_contents('public/posts_2025.json', file_get_contents('https://bookmeter.xyz/api/posts?edition=2025'));