rimgo/README.md

107 lines
3.6 KiB
Markdown
Raw Normal View History

2022-01-17 23:08:00 +00:00
# rimgo
An alternative frontend for Imgur. Based on [rimgu](https://codeberg.org/3np/rimgu) and rewritten in Go.
2021-10-06 16:19:35 +00:00
2022-01-17 23:08:00 +00:00
<a href="https://www.gnu.org/licenses/agpl-3.0.en.html">
<img alt="License: AGPLv3+" src="https://shields.io/badge/License-AGPL%20v3+-blue.svg">
</a>
2021-10-06 16:19:35 +00:00
2022-01-17 23:08:00 +00:00
It's read-only and works without JavaScript. Images and albums can be viewed without wasting resources from downloading and running tracking scripts. No sign-up nags.
2021-10-06 16:19:35 +00:00
Inspired by and (soon) integratable with:
* [searx](https://github.com/searx/searx)
2021-10-07 13:24:37 +00:00
* [teddit](https://codeberg.org/teddit/teddit) ([integration](https://codeberg.org/teddit/teddit/pulls/249))
* [Privacy Redirect](https://github.com/SimonBrazell/privacy-redirect) ([integration](https://github.com/SimonBrazell/privacy-redirect/pull/303))
2021-10-06 16:19:35 +00:00
* [nitter](https://github.com/zedeus/nitter)
* [bibliogram](https://sr.ht/~cadence/bibliogram/)
2021-10-07 13:24:37 +00:00
2022-01-17 23:08:00 +00:00
## Features
2021-10-07 13:24:37 +00:00
- [x] URL-compatible with i.imgur.com - just replace the domain in the URL
- [x] Images and videos (gifv, mp4) returned directly
2022-01-17 23:08:00 +00:00
- [ ] Galleries with comments
2021-10-07 13:24:37 +00:00
- [x] Albums
2022-01-17 23:08:00 +00:00
- [ ] User page
- [ ] Tag page
2021-10-07 13:24:37 +00:00
This is currently very early stage software. Some things left to implement (contributions welcome!):
2022-01-17 22:11:33 +00:00
- [x] Streaming (currently media is downloaded in full in rimgu before it's returned)
2021-10-07 13:24:37 +00:00
- [ ] Localization/internationalization
2022-01-17 22:11:33 +00:00
- [x] Pretty CSS styling (responsive?)
2021-10-07 13:24:37 +00:00
- [ ] Support for other popular image sites than only imgur
2021-10-08 07:42:23 +00:00
- [ ] Filtering and exploration on user/tags pages
- [ ] Responsive scaling of videos on user/tags pages
2022-01-17 22:11:33 +00:00
- [x] Logo
2022-01-17 23:08:00 +00:00
Things that are considered out of scope:
* Uploading/commenting/voting/etc - rimgu is read-only for now.
2022-01-17 23:08:00 +00:00
* Authentication, serving HTTPS, rate limiting, etc - Use a reverse proxy or load balancer like Caddy, Traefik, or NGINX.
* Anything requiring client-side JS or client-side directly interacting with upstream servers
2022-01-17 23:08:00 +00:00
## Instances
Open an issue to have your instance listed here!
| Website | Country | Cloudflare |
|------------------------------------------------------------------------------------------------------------------------------------------|---------|------------|
| [i.bcow.xyz](https://i.bcow.xyz/) | 🇨🇦 CA | |
| [l4d4owboqr6xcmd6lf64gbegel62kbudu3x3jnldz2mx6mhn3bsv3zyd.onion](http://l4d4owboqr6xcmd6lf64gbegel62kbudu3x3jnldz2mx6mhn3bsv3zyd.onion/) | | |
2021-10-06 16:19:35 +00:00
## Building
### Locally
Dependencies:
2022-01-17 23:08:00 +00:00
* Go v1.16 or later
2021-10-06 16:19:35 +00:00
```
2022-01-17 23:08:00 +00:00
go build
2021-10-06 16:19:35 +00:00
```
### Docker
```
2022-01-17 23:08:00 +00:00
sudo docker build -t rimgo:latest .
2021-10-06 16:19:35 +00:00
```
## Running
### Locally
```
2022-01-17 23:08:00 +00:00
go run main.go
2021-10-06 16:19:35 +00:00
```
### Docker
2022-01-17 23:08:00 +00:00
Without docker-compose:
2021-10-06 16:19:35 +00:00
```
2022-01-17 23:08:00 +00:00
sudo docker run -p 8080:8080 -e -it RIMGU_ADDRESS=0.0.0.0 -e RIMGU_PORT=8080 rimgu:latest
2021-10-06 16:19:35 +00:00
```
2022-01-17 23:08:00 +00:00
With docker-compose:
```
sudo docker-compose up -d
```
2021-10-07 06:21:37 +00:00
2021-10-06 16:19:35 +00:00
## Configuration
2022-01-17 23:08:00 +00:00
rimgo can be configured using environment variables or a config file.
2022-01-17 23:08:00 +00:00
### Environment variables
2022-01-17 23:08:00 +00:00
| Name | Default |
|-----------------------|-----------------|
| RIMGU_PORT | 3000 |
| RIMGU_HOST | localhost |
| RIMGU_ADDRESS | 0.0.0.0 |
| RIMGU_IMGUR_CLIENT_ID | 546c25a59c58ad7 |
## Contributing
2022-01-17 23:08:00 +00:00
PRs are welcome!
2021-10-08 19:32:18 +00:00
2022-01-17 23:08:00 +00:00
This software is released under the AGPL 3.0 license. In short, this means that if you make any modifications to the code and then publish the result (e.g. by hosting the result on a webserver), you must publicly distribute your changes and declare that they also use AGPL 3.0.