From 974c5197cf1333ef8cc0f9546c3a38c1cc4c15c4 Mon Sep 17 00:00:00 2001 From: Vincenzo Garambone Date: Sun, 31 Mar 2024 11:23:17 +0200 Subject: [PATCH] Update Readme, Version, wording --- README.md | 17 +++++++++++++++++ VERSION | 2 +- .../repository/InMemoryFootballRepository.java | 2 +- src/main/resources/templates/football.html | 2 +- .../resources/templates/fragments/header.html | 2 +- 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9c54897..f67ebdb 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ RetroSearch is a Spring Web Application that presents very simple HTML pages whi It provides the ability to search the Web using DuckDuckGo with a custom scraper that loads the first page of results and allows you to browse pages in plain text. You can deploy it on your local network and access it from your old computer! +## News and sports APIs support + ### Enabling the News API RetroSearch can fetch news articles by using the GNews API, to allow this, add the environment variables as follows when running the Docker image: @@ -25,8 +27,23 @@ RetroSearch can fetch news articles by using the GNews API, to allow this, add t docker run -e NEWS_ACTIVE=true -e NEWS_API_KEY={your GNews API Key} -d -p80:8080 garambo/retrosearch:{Retro Search Version} --restart unless-stopped ``` +### Enabling the football-data.org API + +RetroSearch can fetch the latest football scores using the football-data.org API, to allow this, add the environment variables as follows when running the Docker image: + +``` +docker run -e FOOTBALL_API_ACTIVE=true -e FOOTBALL_API_KEY={your football-data.org API Key} -d -p80:8080 garambo/retrosearch:{Retro Search Version} --restart unless-stopped +``` + +### Enabling both + +``` +docker run -e NEWS_ACTIVE=true -e NEWS_API_KEY={your GNews API Key} FOOTBALL_API_ACTIVE=true -e FOOTBALL_API_KEY={your football-data.org API Key} -d -p80:8080 garambo/retrosearch:{Retro Search Version} --restart unless-stopped +``` + If running locally, just replace the property values in `application.properties` or create a new Spring run configuration. + ### WIP Currently in progress: - Improve the parsing abilities for the browsing functionality diff --git a/VERSION b/VERSION index 616de50..5a2a580 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.2-testing +0.6 diff --git a/src/main/java/it/garambo/retrosearch/sports/football/repository/InMemoryFootballRepository.java b/src/main/java/it/garambo/retrosearch/sports/football/repository/InMemoryFootballRepository.java index d259bcd..6134994 100644 --- a/src/main/java/it/garambo/retrosearch/sports/football/repository/InMemoryFootballRepository.java +++ b/src/main/java/it/garambo/retrosearch/sports/football/repository/InMemoryFootballRepository.java @@ -33,7 +33,7 @@ public void updateAll(List newMatches) { updatedMatches.putIfAbsent(areaName, new HashSet<>()); updatedMatches.get(areaName).add(match); }); - log.info("Football Results updated"); + log.info("Football scores updated"); matchesByArea = updatedMatches; updatedAt = new Date(); } diff --git a/src/main/resources/templates/football.html b/src/main/resources/templates/football.html index 2df701d..9d11f7d 100644 --- a/src/main/resources/templates/football.html +++ b/src/main/resources/templates/football.html @@ -5,7 +5,7 @@ -

Latest football results

+

Latest football scores

Updated: