No description
  • Go 94.1%
  • Makefile 3.1%
  • Nix 1.5%
  • Shell 1.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
derfenix 47f9aa9699
Some checks failed
CI / test (push) Has been cancelled
feat(http): improve OPDS client compatibility
- 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
2026-10-20 22:18:15 +03:00
.forgejo/workflows ci: bump golangci-lint to v2.11.4 for Go 1.26 2026-04-25 20:50:22 +03:00
.github/workflows ci: bump golangci-lint to v2.11.4 for Go 1.26 2026-04-25 20:50:22 +03:00
cmd/archiveopds feat: OPDS-сервер для каталога INPX/ZIP (архив Флибусты) 2026-04-12 16:35:44 +03:00
deploy build: install as user systemd unit under ~/.local and ~/.config 2026-10-20 22:18:14 +03:00
docs feat: optimize archive search and zip access 2026-04-25 20:45:33 +03:00
internal feat(http): improve OPDS client compatibility 2026-10-20 22:18:15 +03:00
.gitignore chore(devenv): add devenv environment for Go toolchain and linting 2026-10-20 22:18:14 +03:00
.golangci.yml feat: optimize archive search and zip access 2026-04-25 20:45:33 +03:00
.goreleaser.yaml Forgejo CI fixes 2026-04-12 18:03:19 +03:00
devenv.lock chore(devenv): add devenv environment for Go toolchain and linting 2026-10-20 22:18:14 +03:00
devenv.nix chore(devenv): add devenv environment for Go toolchain and linting 2026-10-20 22:18:14 +03:00
devenv.yaml chore(devenv): add devenv environment for Go toolchain and linting 2026-10-20 22:18:14 +03:00
go.mod feat: optimize archive search and zip access 2026-04-25 20:45:33 +03:00
go.sum feat: optimize archive search and zip access 2026-04-25 20:45:33 +03:00
LICENSE feat: OPDS-сервер для каталога INPX/ZIP (архив Флибусты) 2026-04-12 16:35:44 +03:00
Makefile build: install as user systemd unit under ~/.local and ~/.config 2026-10-20 22:18:14 +03:00
README.md build: install as user systemd unit under ~/.local and ~/.config 2026-10-20 22:18:14 +03:00
README_EN.md build: install as user systemd unit under ~/.local and ~/.config 2026-10-20 22:18:14 +03:00

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 to main or master, golangci-lint v2.11.4 (see [.golangci.yml](.golangci.yml)), go test, and go build; on push of a v* 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 official golangci-lint binary (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.