Skip to content

Commit

Permalink
Update Readme, Version, wording
Browse files Browse the repository at this point in the history
  • Loading branch information
garamb1 committed Mar 31, 2024
1 parent a44ea15 commit 974c519
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.2-testing
0.6
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void updateAll(List<Match> 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();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/football.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</head>
<body>
<th:block th:insert="fragments/header.html"></th:block>
<h2>Latest football results</h2>
<h2>Latest football scores</h2>
<p>Updated: <em th:text="${updatedAt}"></em></p>
<ul>
<li th:each="matchesByCountry: ${results}">
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/fragments/header.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<a href="/"><img th:src="@{__${@logoPath}__}" alt="A RetroSearch Logo"></a>
<th:block th:if="${@environment.getProperty('retrosearch.news.enable') and
@environment.getProperty('retrosearch.sports.football.enable')}">
<h4><a href="/">Search and Browse</a> - <a href="/news">News</a> - <a href="/football">Football results</a></h4>
<h4><a href="/">Search and Browse</a> - <a href="/news">News</a> - <a href="/football">Football scores</a></h4>
</th:block>
<form action="/search" method="get">
Search Query:<input type="text" th:value="${searchResults?.query}" name="query">
Expand Down

0 comments on commit 974c519

Please sign in to comment.