MASCOT UPDATE

Package Release Number

better licence image
This commit is contained in:
riomoo 2026-01-25 17:36:35 -05:00
parent 05a1723805
commit 9cc868abef
Signed by: riomoo
SSH key fingerprint: SHA256:dP5B5iLpXU5V8aBA8eGm9tN5YtxXJybnv4McyltPyzM
10 changed files with 42 additions and 6 deletions

View file

@ -35,12 +35,15 @@ RUN echo "Building Linux binary..." && \
# Build Windows binary # Build Windows binary
RUN echo "Building Windows binary..." && \ RUN echo "Building Windows binary..." && \
echo 'IDI_ICON1 ICON "./app/gopherbook/static/images/favicon/favicon.ico"' > gopherbook.rc && \
x86_64-w64-mingw32-windres gopherbook.rc -o ./app/gopherbook/gopherbook.syso && \
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc go build \ CGO_ENABLED=1 GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc go build \
-a \ -a \
-ldflags="-s -w" \ -ldflags="-s -w" \
-trimpath \ -trimpath \
-o bin/gopherbook-windows.exe ./app/gopherbook && \ -o bin/gopherbook-windows.exe ./app/gopherbook && \
upx --best --ultra-brute bin/gopherbook-windows.exe upx --best --ultra-brute bin/gopherbook-windows.exe && \
rm ./app/gopherbook/gopherbook.syso gopherbook.rc
# Verify binaries were created # Verify binaries were created
RUN ls -lh bin/ && \ RUN ls -lh bin/ && \

View file

@ -2,4 +2,4 @@ build:
go build -o bin/main ./app/gopherbook go build -o bin/main ./app/gopherbook
clean: clean:
rm -rf watch etc library cache rm -rf watch etc library cache binaries releases

View file

@ -1,11 +1,21 @@
# Gopherbook Self-Hosted Comic Library & CBZ/CBT Reader <div align="center">
![Gopherbook Title](docs/images/gopherbook-title.png)
</div>
<div align="center">
## Self-Hosted Comic Library & CBZ/CBT Reader
Gopherbook is a lightweight, single-binary, self-hosted web comic reader and library manager written in Go. Gopherbook is a lightweight, single-binary, self-hosted web comic reader and library manager written in Go.
It is designed for people who want full control over their digital comic collection (CBZ/CBT files), including support for password-protected/encrypted archives, per-user libraries, tagging, automatic organization, and a clean modern reader. It is designed for people who want full control over their digital comic collection (CBZ/CBT files), including support for password-protected/encrypted archives, per-user libraries, tagging, automatic organization, and a clean modern reader.
</div>
## License ## License
[![Custom badge](https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fshare.jester-designs.com%2Fview%2Fpil.json)](LICENSE) [![Custom badge](docs/images/svgs/PIL.svg)](LICENSE)
## Features ## Features

View file

@ -21,6 +21,7 @@ import (
"regexp" "regexp"
"sort" "sort"
"strings" "strings"
"io/fs"
"sync" "sync"
"time" "time"
"runtime" "runtime"
@ -39,6 +40,9 @@ import (
//go:embed templates/index.html //go:embed templates/index.html
var templateFS embed.FS var templateFS embed.FS
//go:embed all:static
var staticFS embed.FS
// ComicInfo represents the standard ComicInfo.xml metadata // ComicInfo represents the standard ComicInfo.xml metadata
type ComicInfo struct { type ComicInfo struct {
XMLName xml.Name `xml:"ComicInfo"` XMLName xml.Name `xml:"ComicInfo"`
@ -135,6 +139,14 @@ func main() {
loadUsers() loadUsers()
initWatchFolders() initWatchFolders()
// Create static sub-filesystem once
staticSubFS, err := fs.Sub(staticFS, "static")
if err != nil {
log.Fatal(fmt.Errorf("failed to create static sub-filesystem: %w", err))
}
// Create handlers once and reuse
staticHandler := http.FileServer(http.FS(staticSubFS))
http.HandleFunc("/api/register", handleRegister) http.HandleFunc("/api/register", handleRegister)
http.HandleFunc("/api/login", handleLogin) http.HandleFunc("/api/login", handleLogin)
@ -154,6 +166,7 @@ func main() {
http.HandleFunc("/api/admin/delete-comic/", authMiddleware(handleDeleteComic)) http.HandleFunc("/api/admin/delete-comic/", authMiddleware(handleDeleteComic))
http.HandleFunc("/api/watch-folder", authMiddleware(handleWatchFolder)) http.HandleFunc("/api/watch-folder", authMiddleware(handleWatchFolder))
http.HandleFunc("/", serveUI) http.HandleFunc("/", serveUI)
http.Handle("/static/", http.StripPrefix("/static/", staticHandler))
go func() { go func() {
for { for {

BIN
app/gopherbook/static/images/favicon/favicon.ico (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -3,6 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/static/images/favicon/favicon.ico" rel="shortcut icon" type="image/x-icon">
<title>Gopherbook</title> <title>Gopherbook</title>
<style> <style>
* { * {

BIN
docs/images/gopherbook-title.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/images/svgs/PIL.svg (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -2,7 +2,7 @@
set -e set -e
VERSION="${1:-v1.1.000}" VERSION="${1:-v1.2.000}"
RELEASE_DIR="./releases" RELEASE_DIR="./releases"
BINARIES_DIR="./binaries" BINARIES_DIR="./binaries"

View file

@ -41,6 +41,6 @@ echo "Cleaning up old images..."
podman image prune --force podman image prune --force
echo "Update and cleanup complete!" echo "Update and cleanup complete!"
echo "Container is running with memory limit: 512MB, swap: 512MB" echo "Container is running with memory limit: 512MB"
echo "Go memory limit (GOMEMLIMIT): 512MiB" echo "Go memory limit (GOMEMLIMIT): 512MiB"
echo "Aggressive GC enabled (GOGC=50)" echo "Aggressive GC enabled (GOGC=50)"