Skip to content

Golang project which aims to download Scan chapters and convert them into EPUB for e-book reader.

Notifications You must be signed in to change notification settings

LordPax/go-scan2epub

Repository files navigation

Scan to epub

Description

Golang project, which aims to download Scan chapters and convert them into EPUB for e-reader.

Source

Scans can be downloaded from lelscans

Source url format

http://www.example.com/{chap}/{page}.{ext}
  • {chap}: Chapter number
  • {page}: Page number
  • {ext}: Image extension (png, jpg, jpeg, webp)

Build and install

  1. Clone the repository:
git clone https://github.com/LordPax/go-scan2epub.git
cd go-scan2epub
  1. Build the project:
go mod download
go build
./install.sh
  1. Execute the script to generate config

Will generate a config file at ~/.config/scan2epub/config.ini create directory ~/scan2epub to save converted epub

./scan2epub
  1. Modify your config at ~/.config/scan2epub/config.ini

Config example

default="onepiece"

[onepiece]
name="One Piece"
author="Echiro Oda"
url="https://lelscans.net/mangas/one-piece/{chap}/{page}.{ext}"
epub_dir="/home/lordpax/scan2epub"
# epub_dir="/books" # Use this line if you are using docker
file_name="{author} - {name} {chap}.epub"
description="Scan of One Piece generated by scan2epub"

start_at=0
format=true
create_dir_per_file=true
cron="30 15 * * 0,3" # Every Sunday and Wednesday at 15:30
cron_chap=1132
  • default: Default manga to download

  • name: Name of the manga

  • author: Author of the manga

  • url: URL format of the manga

  • epub_dir: Directory to save the generated epub

  • file_name: Name of the generated epub

  • description: Description of the manga

  • start_at: Chapter to start downloading

  • format: Add "0" to page number if less than 10

  • create_dir_per_file: Create a directory per chapter

  • cron: Cron format to download the manga

  • cron_chap: Chapter to start downloading when using cron

Epub file name format

{author} - {name} {chap}.epub
  • {author}: Author of the manga
  • {name}: Name of the manga
  • {chap}: Chapter number

Docker

docker run -d --rm --name scan2epub -v ./config:/root/.config/scan2epub -v ./books:/books lordpax/scan2epub:latest

Docker compose

version: '3.7'

services:
  scan2epub:
    image: lordpax/scan2epub:latest
    container_name: scan2epub
    volumes:
      - ./config:/root/.config/scan2epub
      - ./books:/books

About

Golang project which aims to download Scan chapters and convert them into EPUB for e-book reader.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published