MASCOT UPDATE
Package Release Number better licence image
This commit is contained in:
parent
05a1723805
commit
9cc868abef
10 changed files with 42 additions and 6 deletions
|
|
@ -35,12 +35,15 @@ RUN echo "Building Linux binary..." && \
|
|||
|
||||
# Build 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 \
|
||||
-a \
|
||||
-ldflags="-s -w" \
|
||||
-trimpath \
|
||||
-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
|
||||
RUN ls -lh bin/ && \
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -2,4 +2,4 @@ build:
|
|||
go build -o bin/main ./app/gopherbook
|
||||
|
||||
clean:
|
||||
rm -rf watch etc library cache
|
||||
rm -rf watch etc library cache binaries releases
|
||||
|
|
|
|||
14
README.md
14
README.md
|
|
@ -1,11 +1,21 @@
|
|||
# Gopherbook – Self-Hosted Comic Library & CBZ/CBT Reader
|
||||
<div align="center">
|
||||
|
||||

|
||||
|
||||
</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.
|
||||
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)
|
||||
[](LICENSE)
|
||||
|
||||
## Features
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import (
|
|||
"regexp"
|
||||
"sort"
|
||||
"strings"
|
||||
"io/fs"
|
||||
"sync"
|
||||
"time"
|
||||
"runtime"
|
||||
|
|
@ -39,6 +40,9 @@ import (
|
|||
//go:embed templates/index.html
|
||||
var templateFS embed.FS
|
||||
|
||||
//go:embed all:static
|
||||
var staticFS embed.FS
|
||||
|
||||
// ComicInfo represents the standard ComicInfo.xml metadata
|
||||
type ComicInfo struct {
|
||||
XMLName xml.Name `xml:"ComicInfo"`
|
||||
|
|
@ -135,6 +139,14 @@ func main() {
|
|||
|
||||
loadUsers()
|
||||
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/login", handleLogin)
|
||||
|
|
@ -154,6 +166,7 @@ func main() {
|
|||
http.HandleFunc("/api/admin/delete-comic/", authMiddleware(handleDeleteComic))
|
||||
http.HandleFunc("/api/watch-folder", authMiddleware(handleWatchFolder))
|
||||
http.HandleFunc("/", serveUI)
|
||||
http.Handle("/static/", http.StripPrefix("/static/", staticHandler))
|
||||
|
||||
go func() {
|
||||
for {
|
||||
|
|
|
|||
BIN
app/gopherbook/static/images/favicon/favicon.ico
(Stored with Git LFS)
Normal file
BIN
app/gopherbook/static/images/favicon/favicon.ico
(Stored with Git LFS)
Normal file
Binary file not shown.
|
|
@ -3,6 +3,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<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>
|
||||
<style>
|
||||
* {
|
||||
|
|
|
|||
BIN
docs/images/gopherbook-title.png
(Stored with Git LFS)
Normal file
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
BIN
docs/images/svgs/PIL.svg
(Stored with Git LFS)
Normal file
Binary file not shown.
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
set -e
|
||||
|
||||
VERSION="${1:-v1.1.000}"
|
||||
VERSION="${1:-v1.2.000}"
|
||||
RELEASE_DIR="./releases"
|
||||
BINARIES_DIR="./binaries"
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,6 @@ echo "Cleaning up old images..."
|
|||
podman image prune --force
|
||||
|
||||
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 "Aggressive GC enabled (GOGC=50)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue