- Go 94.1%
- Makefile 3.1%
- Nix 1.5%
- Shell 1.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
Some checks failed
CI / test (push) Has been cancelled
- log User-Agent for every request to identify readers vs browsers - serve HTML landing page at / with <link rel=alternate> to /opds - serve SVG favicon instead of 404 - add feed-level author, icon and numeric UTC offset (as Calibre does) - add <content> and title to navigation entries, use kind=navigation for subsection links - cover landing page, favicon and navigation feed with tests |
||
| .forgejo/workflows | ||
| .github/workflows | ||
| cmd/archiveopds | ||
| deploy | ||
| docs | ||
| internal | ||
| .gitignore | ||
| .golangci.yml | ||
| .goreleaser.yaml | ||
| devenv.lock | ||
| devenv.nix | ||
| devenv.yaml | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| README_EN.md | ||
archiveopds
Русский: README.md
OPDS server for a local book library laid out as external ZIP volumes plus an INPX index (as in typical “library” distributions). Clients (e.g. OPDS-capable readers) get navigation, search, and acquisition links for files.
Flibusta
The program is primarily aimed at the layout and file set of the Flibusta library archive (.inpx catalogue, .inp lines, .zip volumes with FB2, etc.). Other collections using the same format may work, but development and checks target this case. This is not an official Flibusta project and is not affiliated with the site.
Build and run
Use the Go version from go.mod.
make # binary at bin/archiveopds
./bin/archiveopds serve --archive /path/to/library/root --base-url http://127.0.0.1:8080
User install (no root): make install — binary at ~/.local/bin/archiveopds, unit at ~/.config/systemd/user/archiveopds.service, example environment at ~/.config/archiveopds/environment.example. Copy the example to ~/.config/archiveopds/environment, set ARCHIVEOPDS_ARCHIVE/ARCHIVEOPDS_BASE_URL, then run make enable (same as systemctl --user enable --now archiveopds). Logs: journalctl --user -u archiveopds -f. Variables: PREFIX, CONFIGDIR, DESTDIR (see make help).
Arch Linux: deploy/archlinux/PKGBUILD downloads the tag source archive from Forgejo ($url/archive/v$pkgver.tar.gz, Gitea-style). Set pkgver in PKGBUILD to match an existing **v$pkgver** tag, then updpkgsums and makepkg -si from deploy/archlinux. Change url if you use another instance.
Flags and environment variables:
./archiveopds config
Memory usage, search behaviour, book delivery limits, and process shutdown are described in docs/runtime.md (Russian).
systemd: the user unit deploy/systemd/archiveopds.user.service is installed as ~/.config/systemd/user/archiveopds.service and reads **~/.config/archiveopds/environment** (ARCHIVEOPDS_* prefix, same as archiveopds config); example — deploy/systemd/archiveopds.env.example. The binary is expected at ~/.local/bin/archiveopds. For distro packages the repository also keeps the system unit deploy/systemd/archiveopds.service (/etc/archiveopds/environment, archiveopds user via deploy/sysusers.d/archiveopds.conf).
CI and releases
- GitHub Actions:
[.github/workflows/](.github/workflows/)— on push/PR tomainormaster, golangci-lint v2.11.4 (see[.golangci.yml](.golangci.yml)),go test, andgo build; on push of av* tag (e.g.v1.0.0), GoReleaser builds artifacts and publishes a GitHub Release (linux/windows/darwin, amd64/arm64, archives +checksums.txt). - Local lint:
make lint— install the officialgolangci-lintbinary (v2.11.4+ or equivalent), built with the same or newer Go minor as in go.mod; a binary built with an older Go cannot analyze this project. - Forgejo / Gitea Actions: workflow copies under
[.forgejo/workflows/](.forgejo/workflows/).
On Forgejo, GoReleaser uses origin and the instance API to publish releases; the job uses GITHUB_TOKEN — the built-in Actions-compat token (needs contents: write on the repo).
Local packaging check without publishing:
go run github.com/goreleaser/goreleaser/v2@v2.4.8 release --snapshot --clean
License
Licensed under the GNU General Public License v3.0. Full text: LICENSE.