An open API service indexing awesome lists of open source software.

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

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! ๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘ฉโ€๐Ÿ’ป