https://github.com/harperreed/newspapers
Newspapers - go-newspaper-display
https://github.com/harperreed/newspapers
dashboard eink newspaper
Last synced: 9 months ago
JSON representation
Newspapers - go-newspaper-display
- Host: GitHub
- URL: https://github.com/harperreed/newspapers
- Owner: harperreed
- Created: 2024-03-23T04:13:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-16T04:32:30.000Z (11 months ago)
- Last Synced: 2025-03-11T11:14:06.643Z (9 months ago)
- Topics: dashboard, eink, newspaper
- Language: Go
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-newspaper-display ๐ฐ๐๏ธ
Welcome to my `go-newspaper-display` repository! ๐ This is where I showcase my love for newspapers and Go programming. ๐
## What's Inside? ๐
Here's a quick overview of what you'll find in this repo:
```
go-newspaper-display/
โโโ Dockerfile ๐ณ
โโโ README.md ๐
โโโ cache ๐
โโโ config.yaml โ๏ธ
โโโ docker-compose.yaml ๐
โโโ go.mod ๐ฆ
โโโ go.sum ๐
โโโ main.go ๐
โโโ main_test.go ๐งช
โโโ templates
โโโ home_with_image.html ๐
```
- `Dockerfile`: The recipe for building our Docker image ๐๏ธ
- `README.md`: You're reading it right now! ๐
- `cache`: Where we store our cached newspaper images ๐ผ๏ธ
- `config.yaml`: Configuration file for specifying PDF URLs and cache time โ
- `docker-compose.yaml`: Defines our Docker Compose services ๐ณ
- `go.mod` and `go.sum`: Go module files for managing dependencies ๐ฆ
- `main.go`: The heart of our application, where all the magic happens โจ
- `main_test.go`: Unit tests for our application ๐งช
- `templates/home_with_image.html`: HTML template for displaying the newspaper image ๐๏ธ
## How to Use ๐ค
1. Make sure you have Go and Docker installed on your machine ๐ป
2. Clone this repository and navigate to the project directory ๐
3. Update the `config.yaml` file with your desired PDF URLs and cache time โ๏ธ
4. Run `docker-compose up` to start the application ๐
5. Open your web browser and visit `http://localhost:8080` to see the newspaper display! ๐
## Running Tests ๐งช
To run the unit tests for this project, follow these steps:
1. Make sure you're in the project directory
2. Run the following command:
```
go test -v
```
3. The test results will be displayed in your terminal, showing which tests passed or failed
## Contributions Welcome! ๐
If you have any suggestions, bug reports, or want to contribute to this project, feel free to open an issue or submit a pull request. Let's make this the best newspaper display ever! ๐ฐ๐ช
Happy coding! ๐จโ๐ป๐ฉโ๐ป