Skip to content

padamupreti/smanga

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smanga

A manga reader/server for serving local manga images on desktop browser.
Provides a two-page view layout just as reading a physical copy.

Reader Demo

Requirements

Recommended: Python >= v3.8 and Node.js >= v16.4

Directory structure & naming

Following naming scheme is to be followed for all manga to be served:

| <manga-location-on-machine>
    |-- series-name-in-dash-case/
        |-- chapters/
            |-- 0001/
                |-- 001.png
                |-- 002.png
                ...
            |-- 0002/
            ...
        |-- volumes/
            |-- 030/
                |-- 001.png
                |-- 002.png
                ...
            |-- 031/
            ...
    |-- another-series/
    ...

Series require their own folder, like one-piece or attack-on-titan in dash-case.
Within each, chapters/, volumes/ or both are to be created.
Explicit renaming of images is not required, however they may be renamed while preserving proper order by file name.

Item No. of characters for naming Naming example
Chapter 4 Chapter 220 ⇒ 0220/
Volume 3 Volume 100 ⇒ 100/

Initial Setup

Note that pip and python are pip3 and python3 for Linux

First, clone this repository and navigate into it.
Run the following to install Django dependencies:

pip install -r requirements.txt

Now, run the following to configure manga location:

python configure.py <manga-location-on-machine>

Here, <manga-location-on-machine> is the absolute directory location where all manga is stored on machine. An optional -s flag may be passed to store chapters in database:

python configure.py -s <manga-location-on-machine>

This is useful for series with longer chapters. By default, only volumes are stored.

Next, run the following to create the database:

python manage.py makemigrations
python manage.py migrate

Finally, navigate into uireader and run the following to build the UI:

npm install
npm run build

The setup is complete.

Usage

Naviage into root of the project and run the following to launch local Django server:

python manage.py runserver

This should launch the server on localhost. Chapters and volumes are accessible through simple navigation.

Reader Interface

Clicking on the middle of screen activates the following menus:

Top Menu

  • Upper Menu

    • Reload : Rearrange/correct image order in the viewer
    • ← : Next chapter/volume
    • #0909 : Go to chapters/volumes listing
    • → : Previous chapter/volume
    • Home : Go to series listing
  • Lower Menu

Bottom Menu Provides slider to quickly move between pages

Keyboard shortcuts

  • J / / / Space - Next couple of pages (next view)
  • L / / - Previous couple of pages (previous view)
  • F - Toggle fullscreen mode
  • M - Toggle magnified mode