Coder Social home page Coder Social logo

onigoetz / comics-reader Goto Github PK

View Code? Open in Web Editor NEW
33.0 5.0 4.0 71.75 MB

Read your comic book scans on tablet !

License: MIT License

CSS 10.43% JavaScript 88.83% Shell 0.20% Dockerfile 0.54%
comics-reader cbz comic-books pdf-support cbr new-topic

comics-reader's Introduction

Comics reader

Latest Version Software License GitHub Workflow Status Docker Pulls

Read your comics on your tablet

What is it ?

A nice little comic book reader for tablets and mobile phones. It is not intended to work on a desktop computer.

Features

  • Watch your comic books on your phone or tablet, at home or on the go.
  • Uses your filesystem, has an embedded database.
  • Supports most comics formats : CBZ/CBR/ZIP/RAR, PDF, simple image directory.
  • Internal search engine to find your comics easily
  • Use basic auth credentials (from Nginx/Apache) or use the embedded Database to manage users.

Installing

Using docker (Recommended)

docker run -v /your-images-dir:/comics -p 8080:8080 --rm onigoetz/comicsreader

Will start the comics reader using your comic books at /your-images-dir and be available at http://localhost:8080.

With Node

First, you need

  • Nodejs

  • MuPDF for PDF support (brew install mupdf-tools / apt install mupdf-tools)

  • Download/clone this repository on your server

  • Symlink your comics to images in the app's directory

  • Make the images/cache directory writable

  • Run yarn install

  • Run yarn build

You can then start the server with yarn start.

This will index the books and start the server.

Authentication

Authentication is an optional feature, you can either leverage the basic auth credentials from a server (Apache/Nginx) Or use the built-in database.

This option can be with the COMICS_AUTH_TYPE environment variable. possible values are "basic" (default) or "db"

When using the "db" authentication mode, you need to create users, for this we provide a command-line tool to create them.

Note that the container has to be stopped in order to use the CLI tool as the database is otherwise readonly.

Creating users

sudo docker run --rm -it -v your_images_dir:/comics onigoetz/comicsreader node comics createUser

Changing password

sudo docker run --rm -it -v your_images_dir:/comics onigoetz/comicsreader node comics changePassword

Tweaking the configuration

Basedir

Basedir has to be specified as an environment variable when starting the server.

COMICS_BASE="comics" yarn start
# OR
docker run -e "COMICS_BASE=comics" ...

Reverse proxy through nginx

location /BD/ {
    proxy_pass http://comics:8080/BD/;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Host $server_name;
    proxy_set_header X-Forwarded-Proto $scheme;
}

Known issues

  • Files with accents in zip (cbz) files don't work.

Credits and technologies

comics-reader's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar onigoetz avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

comics-reader's Issues

Failing to run.

Here is the output.

Thank you.

# docker run -v /share/ebooks:/comics -p 8080:8080 --rm onigoetz/comicsreader
Unable to find image 'onigoetz/comicsreader:latest' locally
latest: Pulling from onigoetz/comicsreader
54f7e8ac135a: Pull complete 
d6341e30912f: Pull complete 
087a57faf949: Pull complete 
5d71636fb824: Pull complete 
0c1db9598990: Pull complete 
89669bc2deb2: Pull complete 
680b586c807d: Pull complete 
16f1b885efe0: Pull complete 
3a4fa74685f5: Pull complete 
278d8a99f6c7: Pull complete 
731ab23fc19a: Pull complete 
2eb1d60288ec: Pull complete 
23714a9e6e6d: Pull complete 
390cd13be2ed: Pull complete 
9bd43f543fbd: Pull complete 
1b733308760e: Pull complete 
9c003f24828b: Pull complete 
Digest: sha256:2b57bf4550bc3ad26cb83912ee97fc35767ae578644ec13298582b7d497b81ac
Status: Downloaded newer image for onigoetz/comicsreader:latest
yarn run v1.12.3
$ node src/server/index.js

/usr/src/app/node_modules/better-sqlite3/lib/database.js:43
        return new CPPDatabase(filename, filenameGiven, memory || anonymous, readonly, fileMustExist, timeout);
               ^
SqliteError: unable to open database file
    at Database (/usr/src/app/node_modules/better-sqlite3/lib/database.js:43:9)
    at Object.<anonymous> (/usr/src/app/src/server/db.js:9:12)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/usr/src/app/src/server/index.js:25:12)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Can browse comics but no pictures get loaded (docker)

Hi,
I am running the docker version like that:

$ docker run -v $HOME/Downloads/comics:/comics -p 8080:8080 --rm onigoetz/comicsreader

I can browse comics but the page get stuck on "Loading..." forever.

$ docker run -v $HOME/Downloads/Comics:/comics -p 8080:8080 --rm onigoetz/comicsreader
yarn run v1.12.3
$ node src/server/index.js
Creating migration table
Applying migrations, your DB is at version 0 going to 2
Applying migrations to version 1
Creating 'read' table
Applying migrations to version 2
Creating 'users' table
Your DB is up to date
Starting server
Started server on port 8080 with baseurl /
Generating index
Found 2 books and directories in 0.025 s
Computed thumbnails in 0.001 s
GET / 200 - - 6.460 ms
GET /static/css/app.min.css 200 - - 7.755 ms                                                           
GET /static/js/default.f8c12c2b.js 200 - - 6.310 ms                                                    
GET /api/books 200 103 - 1.683 ms                                                                      
GET /api/read 200 2 - 1.164 ms                                                                         
GET /static/images/apple-touch-512.png 404 172 - 2.280 ms                                              
GET /static/images/favicon.ico 200 - - 3.207 ms                                                        
GET /thumb/1/Kill%20Them%20All 302 71 - 3.936 ms                                                       
GET /images/cache/thumb/Kill%20Them%20All/TPB/001.jpg 200 4493 - 33.285 ms                             
GET /thumb/1/Kill%20Them%20All/TPB 200 4493 - 0.710 ms                                                 
GET /static/js/book.a3632c77.chunk.js 200 - - 1.322 ms                                                 
GET /static/js/vendors~book.356bbf81.chunk.js 200 - - 1.250 ms                                         
GET /api/books/Kill%20Them%20All/TPB 200 4 - 1.174 ms

I don't see any errors in the browser console and I can't click any of the elements to get back to browsing the collections (home and back link don't work anymore).

Any ideas :) ?

Error 500

Hello,

I am trying to run this on a Synology and I am getting the following error when trying to load the page.

Failed to load books with error:
Failed with status 500 and message: Internal Server Error

404 not found

Hello, trying to test your application but

docker run -v /your-images-dir:/root/comic/ -p 10000:8080 --rm onigoetz/comicsreader
yarn run v1.17.3
$ NODE_ENV=production node server/index.js
Generating index
Starting server
Started server on http://localhost:8080/
Found 0 books or directories in 0.264 s
Found 0 thumbnails already
Computed thumbnails in 0 s
Could not create index TypeError: Cannot read property 'toFixed' of undefined
at addRow (/usr/src/app/server/tree/IndexCreator.js:175:37)
at IndexCreator.writeStats (/usr/src/app/server/tree/IndexCreator.js:185:5)
at IndexCreator.getRootNode (/usr/src/app/server/tree/IndexCreator.js:214:10)
GET /api/auth_mode 200 16 - 11.781 ms
GET /api/indexready 200 50 - 1.283 ms
Creating migration table
Applying migrations, your DB is at version 0 going to 2
Applying migrations to version 1
Creating 'read' table
Applying migrations to version 2
Creating 'users' table
Your DB is up to date
GET /api/list 404 14 - 537.040 ms
Error: Failed with status 404 and message: Not Found
at onlySuccess (/usr/src/app/.next/server/static/G9Fc4B5gf2ZpvxMvsOAP-/pages/index.js:1013:11)
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at async Function.module.exports.czAh.ListManager.getInitialProps (/usr/src/app/.next/server/static/G9Fc4B5gf2ZpvxMvsOAP-/pages/index.js:1613:7)
at async Function.component.getInitialProps (/usr/src/app/.next/server/static/G9Fc4B5gf2ZpvxMvsOAP-/pages/index.js:1100:65)
at async Function.component.getInitialProps (/usr/src/app/.next/server/static/G9Fc4B5gf2ZpvxMvsOAP-/pages/index.js:356:65)
at async loadGetInitialProps (/usr/src/app/.next/server/static/G9Fc4B5gf2ZpvxMvsOAP-/pages/_document.js:1028:17)
GET / 500 - - 722.150 ms
GET /_next/static/G9Fc4B5gf2ZpvxMvsOAP-/pages/_app.js 200 - - 7.903 ms
GET /_next/static/chunks/commons.15009571affea72f6845.js 200 - - 6.130 ms
GET /_next/static/runtime/main-3a4d315d95379e5868a8.js 200 - - 3.830 ms
GET /_next/static/runtime/webpack-4b444dab214c6491079c.js 200 - - 3.709 ms
GET /_next/static/css/commons.b1d4bd72.chunk.css 200 - - 3.849 ms
GET /_next/static/G9Fc4B5gf2ZpvxMvsOAP-/pages/_error.js 200 - - 1.303 ms
GET /api/list 404 14 - 0.715 ms

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm @types/sharp Unavailable

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency read-chunk to v5
  • Update dependency rimraf to v6
  • Update docker/build-push-action action to v6
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

dockerfile
Dockerfile
  • node 18.20.4-alpine
github-actions
.github/workflows/build.yml
  • actions/checkout v4
  • actions/setup-node v4.0.3
.github/workflows/codeql-analysis.yml
  • actions/checkout v4
  • github/codeql-action v2
  • github/codeql-action v2
  • github/codeql-action v2
.github/workflows/docker.yml
  • actions/checkout v4
  • docker/login-action v3
  • docker/setup-buildx-action v2
  • docker/metadata-action v5
  • docker/build-push-action v5
npm
package.json
  • @next/bundle-analyzer ^14.0.0
  • archive-type ^4.0.0
  • basic-auth ^2.0.0
  • bcrypt ^5.0.0
  • better-sqlite3 ^9.4.1
  • cache-manager ^5.0.0
  • cache-manager-fs-hash ^1.0.0
  • classnames ^2.2.6
  • cli-table ^0.3.1
  • colorette ^2.0.20
  • compression ^1.7.1
  • core-js ^3.26.0
  • create-symlink ^1.0.0
  • debounce ^1.2.0
  • debug ^4.1.0
  • execa ^5.0.0
  • express ^4.16.3
  • iconv ^3.0.0
  • image-size ^1.0.0
  • js-cookie ^3.0.0
  • jwt-simple ^0.5.1
  • loud-rejection ^2.1.0
  • meow ^9.0.0
  • morgan ^1.9.1
  • natural-sort ^1.0.0
  • next 14.2.5
  • next-compose-plugins ^2.2.0
  • next-cookies 2.0.3
  • node-cron ^3.0.0
  • node-unrar-js ^2.0.0
  • normalize.css ^8.0.1
  • pdfjs-dist ^3.0.279
  • percentile ^1.2.2
  • promise-timeout ^1.3.0
  • prompts ^2.3.0
  • prop-types ^15.6.0
  • react ^18.0.0
  • react-dom ^18.0.0
  • react-headroom ^3.0.0
  • react-icons ^5.0.0
  • react-photoswipe ^1.3.0
  • react-portal ^4.1.5
  • read-chunk ^3.0.0
  • rimraf ^3.0.0
  • sharp ^0.33.0
  • tmp-promise ^3.0.2
  • typedarray-to-buffer ^4.0.0
  • unzipper ^0.12.0
  • web-streams-polyfill ^3.2.1
  • @swissquote/crafty 1.26.0
  • @swissquote/crafty-preset-eslint 1.26.0
  • @swissquote/crafty-preset-images-simple 1.26.0
  • @swissquote/crafty-preset-postcss 1.26.0
  • @swissquote/crafty-runner-gulp 1.26.0
  • @types/compression ^1.0.0
  • @types/express ^4.16.0
  • @types/morgan ^1.7.35
  • @types/sharp ^0.32.0
  • ava ^6.0.0
  • c8 ^9.0.0
  • yarn 4.3.1

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.