Giter VIP home page Giter VIP logo

metafates / mangal Goto Github PK

View Code? Open in Web Editor NEW
1.2K 1.2K 44.0 30.72 MB

πŸ“– The most advanced (yet simple) cli manga downloader in the entire universe! Lua scrapers, export formats, anilist integration, fancy TUI and more!

License: MIT License

Go 85.59% Dockerfile 0.18% Shell 12.85% PowerShell 0.70% Makefile 0.27% Lua 0.41%
anilist anime cli comic-downloader command-line go golang linux lua macos manga manga-downloader manga-reader mangadex mangal pdf scraper terminal tui windows

mangal's People

Contributors

2096779623 avatar an-prata avatar arabcoders avatar avidseeker avatar dependabot[bot] avatar folliehiyuki avatar jojoxd avatar metafates avatar raj23689 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mangal's Issues

FreeBSD support

Feature Description

Since Mangal tends to be cross-platform, it would be a nice addition to add support for FreeBSD systems

Solution you would like

FreeBSD support + prebuilt binaries with package manager install option (?)

Alternatives you have considered

Try to build from source using go

Additional context

It may be compatible already (if building from source) but I don't have access to any freebsd machine right now (nor time to setup vm)

version 1.5.2 is broken

Describe the bug
looking for mangas and reading chapters isn't working properly

To Reproduce
Steps to reproduce the behavior:

  1. Search for 'chainsaw man'
    Nothing shows up
  2. Search for 'tomodachi game'
  3. Select first one
    Chapters\n no items

Expected behavior
Should work

Screenshots
image
image

System

  • OS: Mac OS
  • Go Version 1.18.3

Additional context
This is using the default provider (manganelo) and both pdf and cbz as filetypes

Search doesn't work on Termux

Describe the bug

Searching for manga always returns no results, even though the device is connected to the Internet.
Screenshot_20220707-080146
Running mangal doctor yields a very weird result as well:
Screenshot_20220707-080207
(I have the latest version, installed with curl -L -o mangal https://github.com/metafates/mangal/releases/download/v2.2.0/mangal-android-arm64

Reproduction steps

  1. Download mangal with curl -L -o mangal https://github.com/metafates/mangal/releases/download/v2.2.0/mangal-android-arm64
  2. Run chmod u+x mangal to make execution possible.
  3. Run ./mangal config init
  4. ./mangal inline -q "berserk" returns no results as well as any other search query

Expected behavior

Mangal should display a list of mangas to read

Additional context

I'm running Termux v0.118.0 from F-droid on a OnePlus 7 Pro running Android 11
Edit: The same thing happens on the version that can be downloaded from Github

Operating System

Linux

Checks

  • I've used mangal doctor and it didn't help

Edit: fixed some typos

Search error

Describe the bug

i get this error running on arch linux
tried both installing through brew and using the binary

   "https://m.manganelo.tv/search/berserk": dial tcp: lookup                
   m.manganelo.tv on [::1]:53: read udp [::1]:42958->[::1]:53: read:        
   connection refused                                                       
  stack traceback:                                                          
                                                                            
                                                                            
                                                                            
        [G]: in function 'error'                                                  
                                                                            
                                                                            
                                                                            
                                                                            
        /home/luc/.config/mangal/sources/manganelo.lua:75: in                     
   function 'AssertFalse'                                                   
                                                                            
                                                                            
        /home/luc/.config/mangal/sources/manganelo.lua:11: in                     
   main chunk                                                               
                                                                            
                                                                            
        [G]: ?  
while trying to run any search, even custom scrapers


Search with multiple sources at once

Feature Description

Search among multiple sources at the same time

Solution you would like

Select what sources to use for search in the TUI by pressing select key

Alternatives you have considered

No response

Additional context

Originally posted by @omaru-ok in #7 (comment)

Docker Build

Is your feature request related to a problem? Please describe.

  • I prefer to self host things on my NAS for convenience.

Describe the solution you'd like

  • Would be great if we could have a docker build please?

Describe alternatives you've considered

  • Try a competitor like Mango

Additional context

ComicInfo.xml support for CBZ format

Is your feature request related to a problem? Please describe.
ComicInfo.xml is a metadata file used by some comic readers. It holds information about comic such as series name, chapters count, reading direction and so on. You can read more about it here

Describe the solution you'd like
An option in config file that would specify whether to create ComicInfo.xml file or not

Describe alternatives you've considered
None

Additional context
Even though this format is very rarely used still this would be a nice addition to existing functionality

Installation issues

After a quick apt-get install golang-go i get those errors on installation:

go install github.com/metafates/mangal@latest
can't load package: package github.com/metafates/mangal@latest: can only use path@version syntax with 'go get'
go get github.com/metafates/mangal@latest
go get github.com/metafates/mangal@latest: can't request explicit version of path in main module

Infos:
Go Version: go1.13.8 linux/amd64
System: Ubuntu 20.04.4 LTS on Windows 10 x86

Mangakakalot is broken

Describe the bug

Mangakakalot (built-in provider) shows no chapters.

Reproduction steps

  1. Select mangakakalot provider
  2. Search for any manga and select any
  3. See no chapters available

Expected behavior

To see chapters

Additional context

If you try to restart mangal after unsuccessful search and open the same manga you will see chapters. Weird.

Use manganelo for now, it's has the same mangas as mangakakalot

[source request] mangadex/comick(.)fun

Feature Description

Uncompressed sources along with fast cache

Solution you would like

Can you please add the usage of their api
Since both of these sources have the most chapters

Alternatives you have considered

No response

Additional context

No response

Anilist integration for syncing progress

Is your feature request related to a problem? Please describe.

when I finish my reading session using the read option, I need to either manually go to anilist's website and update my reading progress there or use an external custom script which makes a post request to anilist's api with my tokens

Describe the solution you'd like

if possible, i would like a solution integrated withing this project itself

Describe alternatives you've considered

Anilist's website manually or external custom script

Windows download/config issue

When downloading files on windows it nevers creates the file with a file extension (e.g. .pdf)
Even when specify file type via config or CLI it just saves them as a file (no extension)

Volume Packer

Feature Description

Having All chapters inside a single volume

Solution you would like

pack all chapter inside a single volume cbz {with option if possibel to add a ongoing volume {because if user adds a volume that is ongoing, adds again , the client would have to unzip , check existing , and add new images of the latest chapter , further complicating the process, unless dev can possibly give a try}

Alternatives you have considered

extracting images out of the cbz in the volume folder and repacking furhter outsourcing a internal feature.

Additional context

No response

Add command to check for updates

Is your feature request related to a problem? Please describe.

It would be very convenient to be able to check if new version was released without going to GitHub page manually

Describe the solution you'd like
A command like mangal check-update

Describe alternatives you've considered
Use package manager (scoop, Homebrew)

Mangadex volume creation

Feature Description

Smol chapters without able to add meta data from comictagger, even thou komf exist to add data from other places into komga

Solution you would like

If possible packing chapters into volumes

Alternatives you have considered

Making a custom script to do that, but a built in support for some sources would be nice, can probably be used with managdex api to do the same with other sources to fetch chapters per volume

Additional context

No response

Completion command tries to create configuration file

Describe the bug

Running the completion command (mangal completion) tries to create the main configuration file and fails if not possible.
This becomes an issue when we want to package mangal in an isolated build environment, without a user home, as mangal fails with a panic: mkdir /homeless-shelter: permission denied error.

Reproduction steps

You can reproduce the same behavior restricting the ~/.config/mangal folder permissions when using mangal, i,e, setting the configuration folder owner to root.
Mangal will then try to create a folder in /homeless-shelter.

Expected behavior

The completion command should be available without requiring the generation a configuration file.

Additional context

I'm currently packaging it for Nix. You can also reproduce the same behavior in the branch mangal-permission-error of this repository using nix build .#mangal using a nix flakes or nix-build -A mangal from either a Linux distribution or MacOS with nix installed.

As a workaround I'm setting the HOME variable to a temporary folder while building the app.

Operating System

Linux

Crashes when trying to read chapter from history in mini mode

Describe the bug

When trying to read chapter from history with mini mode mangal will panic

Reproduction steps

  1. mangal mini --continue
  2. Select any chapter (just press enter)
  3. See panic message

Expected behavior

The same as mangal --continue

Additional context

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x20 pc=0x102fbed80]

goroutine 54 [running]:
github.com/metafates/mangal/downloader.Read(0x14000879ec0, 0x14000171f88)
	github.com/metafates/mangal/downloader/read.go:24 +0x60
github.com/metafates/mangal/mini.(*mini).handleChapterReadState.func1(0x14000879ec0, 0x14000482cc0, 0x0, 0x1)
	github.com/metafates/mangal/mini/states.go:240 +0x78
created by github.com/metafates/mangal/mini.(*mini).handleChapterReadState
	github.com/metafates/mangal/mini/states.go:302 +0x278

Operating System

macOS

Ability to pass anilist id in inline mode

Feature Description

Sometimes there can be more than one anilist match and if we are using the inline mode, it is not possible to select one.

Solution you would like

Can you add an ability to pass an anilist id in inline mode?

Alternatives you have considered

No response

Additional context

oae/kaizoku#6

Read does not work for chapters with colon in title in Windows

Describe the bug
When trying to read a chapter that has a colon in title nothing happens (e.g. "Chapter 1 : Lorem Ipsum")

To Reproduce
Steps to reproduce the behavior:

  1. Search for 'death note'
  2. Select second manga
  3. Select first entry
  4. Press read (r)
  5. Chapter downloads but doesn't open

Expected behavior
It is expected to be opened in the default reader app

System

  • OS: Windows 11
  • Mangal 1.5.1

Additional context
When downloading such chapters everything is fine, this happens only when trying to use the read option

Auto-delete temp files or download them to directory specified in config

When I press r on a manga to read the single chapter, Mangal downloads it to a temporary directory on my Mac.

I think it would be better for the manga downloaded with this option to be saved in the directory specified in the config file.

Another plausible solution would be to auto-delete the temporary file when quitting Mangal.

Incorrect image extension for inline mode json output

Describe the bug

Screenshot

Reproduction steps

  1. Install Mangasee scraper (with mangal install)
mangal inline  -S Mangasee -q "death note" -m first -c 0 -p -j
  1. See incorrect image extension for pages

Expected behavior

In this case it should be .png

Additional context

Mangasee scraper has nothing to do with it, it's just an example

Operating System

macOS

Image: Unknown format

Describe the bug

Download chapter get "Image: Unknown format" error

Reproduction steps

  1. Use mangal TUI
  2. Choose first source
  3. Input "Nozo"
  4. Choose "Nozo x Kimi"
  5. Select chapter 39
  6. Get the error: "Unknown format"

Expected behavior

Download complete

Additional context

No response

Operating System

Linux

HTTP client timeout for custom scrapers

Describe the bug

Some custom scrapers fail to download pages due to exceeding http timeout of 10 seconds, even though pages are downloading normally (just slow)

Reproduction steps

No response

Expected behavior

To have 20-30s of timeout

[Packaging] System package manager-friendly vendoring

Greetings, glorious mangal maintainers! I quietly package awesome software for Gentoo Linux. Because mangal is clearly both awesome and software, packaging mangal for Gentoo is what I am now doing.

Except... I can't. Cue sadness cat.

sadness cat is sad

mangal: We Don't Need No "vendor/".

The mangal repository (and thus source tarballs derived from this repository) currently omits the top-level vendor/ directory required to reproducibly build and install mangal from source.

That's usually fine. In the absence of a vendor/ directory, go subcommands silently download and cache dependencies listed in go.mod into the user-local module cache (e.g., ~/go/pkg/mod/). Go developers and brave end users manually building mangal from scratch are accustomed to that.

That's less fine for foolhardy packagers (such as myself) attempting to package mangal for source-based redistribution at the system level. But "source-based redistribution at the system level" is the literal definition of Gentoo Linux. In other words, Gentoo isn't happy. Let's make Gentoo happy.

Gentoo: Actually, We Really Need "vendor/".

Most system-level package managers (e.g., emerge under Gentoo Linux) and language-level package managers (e.g., the Swift Package Manager (SPM)) sandbox at least filesystem access for security. Increasingly many also sandbox network access for the same reason. This is where our packaging trouble starts and ends.

Since mangal omits a vendor/ directory, go subcommands silently:

  • Download dependencies, thus violating network sandboxing during installation.
  • Cache dependencies, thus violating filesystem sandboxing during installation.

Admittedly, Gentoo can trivially circumvent filesystem sandboxing by just (A) caching to a temporary non-sandboxed work directory while building and then (A) deleting that directory after building. That's fine.

Gentoo cannot trivially circumvent network sandboxing, however. In theory, Gentoo could vendor mangal dependencies into a new source tarball that we host and maintain on your behalf... which is the problem. Gentoo ...okay, I mean me doesn't want to host and maintain separate source vendor tarballs for every single Go application in existence.

We're lazy and slovenly. Vendoring Go dependencies is non-trivial, error-prone, time-consuming, and anti-fun. Moreover, every single other Linux distribution (of which there are a countably infinite number) would need to reduplicate that same work. This is probably why most Linux distributions that currently package mangal sidestep this issue by just redistributing your binary Linux executables. That is what Arch does, for example. But that's bad – or at least fundamentally incompatible with the Gentoo religion.

We're zealous fanatics about source-based installation. We couldn't be wrong! πŸ˜…

mangal: Yah. We're Still Unconvinced.

Omitting vendor/ is typically the best practice for Go middleware like libraries and frameworks. Conversely, committing vendor/ is typically the best practice for actual Go applications shipping executable binaries... like mangal. Sources or it didn't happen, so:

The answer to the age-old question of, β€œshould I commit the vendor dependencies in my Go project to source control?” is β€œalmost always.β€œ

For my own peace of mind I would always prefer to commit the vendor/ directory alongside go.mod and go.sum...

mangal: We Still Don't Care.

Very well. I can see that neither the lolcat nor the two blog articles I linked to above have convinced you. In that case, I shall now bludgeon you with verbose words.

There's really only one valid reasons to omit vendor/: repository size. But that's not a particularly valid reason in the modern era, because GitHub ...so, Microsoft is what I'm saying is already committed to taking the bandwidth and storage hit on your behalf.

There are many valid reasons to commit vendor/, however – including:

  • Compatibility with package managers that sandbox. Gentoo. Always Gentoo.
  • Deterministic builds. mangal builds are currently non-deterministic. By deferring to go subcommands that bang on remote servers for online installation, mangal builds tacitly assume that URLs, versions, and licenses are perfectly stable across all dependencies – forever. But that's never the case. Packaging is a constantly shifting landscape wrapped in a badly documented enigma inside a vanishing mystery of 404 errors. The Node.js world discovered this the rough way when left-pad spontaneously blew everything up.
  • Better faster harder CI/D. Continuous integration (CI) and deployment (CD) workflows suddenly become substantially faster and more robust, because go no longer needs to bang on remote servers for online installation. Since requisite dependencies are locally available under vendor/, CI/D turnaround (and thus turnaround for tests and PRs) measurably improves.

Gentoo: I Am Very Tired Now.

Thanks so much for all the automated manga downloading, mangal magicians. My manga backlog may currently be crying, but everyone here is a spectacular gift to humanity.

Only download new chapters with inline

Feature Description

Thanks for making a great tool!
When downloading with inline, for example:
inline --source "Sourcename" --query "Manganame" --manga first --chapters all -d
It seems like all chapters get downloaded every time, which isn't great if you are using mangal to do batch downloads of multiple series.

Solution you would like

Would be awesome if there is a --check-local flag or something like that.
All that's really needed is to check if the file exists before downloading.

I guess there could be instances where a chapter is updated, which then would not be downloaded.
That would not an issue for me at least.

Alternatives you have considered

No response

Additional context

From what I can see, this is not a feature yet.
Hopefully I'm wrong, and in that case I apologize for creating this issue.

Plain and CBZ formats conflict

Describe the bug
Chapters are failing to download in cbz format if plain folder exists

To Reproduce
Steps to reproduce the behavior:

  1. Run mangal with plain format (either in config of mangal -f plain)
  2. Search for any manga
  3. Download any chapters
  4. Close mangal
  5. Run mangal with cbz format (either in config of mangal -f cbz)
  6. Search for the same manga as before
  7. Try to download the same chapters
  8. See fail message

Expected behavior
It is expected to not produce any errors and just download chapters

Screenshots

Issue.mov

System

  • OS: MacOS Ventura
  • Go Version 1.18.3
  • Mangal 1.15

Additional context
This error appears only for this combination and sequence of formats. (e.g. cbz -> plain works fine, but plain -> cbz fails)

Improved Docker Container

Feature Description

Hi, The Docker file i linked was just that an example to build based on, not meant to be used publicly as it might lead to permissions issues.

Solution you would like

FROM alpine:latest

ENV VERSION=v2.0.0
ENV USER=abc
ENV UID=1000
ENV GID=1000

ENV XDG_CONFIG_HOME=/config

WORKDIR /config

VOLUME /config

RUN addgroup -g "$GID" "$USER"

RUN adduser \
    --disabled-password \
    --gecos "" \
    --home "$(pwd)" \
    --ingroup "$USER" \
    --no-create-home \
    --uid "$UID" \
    "$USER"

ADD https://github.com/metafates/mangal/releases/download/${VERSION}/mangal-linux-amd64 /usr/local/bin/mangal

RUN chmod +x /usr/local/bin/mangal

USER abc

ENTRYPOINT ["/usr/local/bin/mangal"]

This version is more appropriate for public as it run the tool in non-root user context.

Alternatives you have considered

No response

Additional context

Please do take look at this build file i use for my own tool,

https://github.com/ArabCoders/watchstate/blob/master/.github/workflows/build.yml

it will help you make an auto build.

It will help greatly to also add some environment variables for data locations i.e. MANGAL_PATH for config storage, MANGAL_DOWNLOADS for where data is stored.

History feature

Feature Description

When I run mangal I would like to continue reading where I left off during my last session

Solution you would like

A -c | --continue flag where I can select a manga and which will automatically take me to where I last left off

Alternatives you have considered

No response

Additional context

No response

Inline mode for scripting

Feature Description

It would be nice to have an option to integrate Mangal into scripts.

Solution you would like

Something like that

 mangal inline --source "..." --search "..." --manga 1 --from 1 --to 42 --download

Alternatives you have considered

Use mangal mini and do some magic with stdin. But idk if it's even possible

Additional context

No response

Invalid character names in downloaded chapters

Describe the bug

Right now it seems the tool uses whatever the chapter name is as filename, which is good idea, however some manga and or chapters uses characters which are illegals in windows.

For example, Lets take Berserk as example the first 3 chapters are named:

'[1] Vol.1 Chapter 0.01: The Black Swordsman.pdf'
'[2] Vol.1 Chapter 0.02: The Brand.pdf'
'[3] Vol.1 Chapter 0.03: The Guardians Of Desire (1).pdf'

they works correctly in Linux host, however viewing them via windows produce file names like

xx

you could see list of those characters here for example

https://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names

Reproduction steps

No response

Expected behavior

No response

Additional context

No response

Operating System

Windows

Checks

  • I'm using the latest version of Mangal

Show read chapters from Anilist profile inside Mangal

Feature Description

It would be awesome to see what chapters were read on Anilist inside Mangal.

Solution you would like

Some mark next to the chapter title that would indicate that this chapter was read.

Also, an option in config to enable/disable this behavior

Alternatives you have considered

No response

Additional context

No response

Does not warn when using the wrong format from the flag

Describe the bug

When using invalid format from --format flag mangal won't warn you about it and will crash later

Reproduction steps

  1. Run mangal --format something
  2. Try to download or read any chapter
  3. See runtime error

Expected behavior

It is expected to see that message
Screenshot 2022-06-27 at 10 13 08

Additional context

When using invalid format from the config file everything works as expected. This issue is only related to the command line argument

Operating System

macOS

Checks

  • I've used mangal doctor and it didn't help

Inline search without download

Feature Description

Is it possible to add a parameter for searching manga in inline mode?

Solution you would like

No response

Alternatives you have considered

No response

Additional context

No response

Crashes when pressing space or enter on empty list

Describe the bug
When pressing select button (space or enter) on empty list (e.g. when nothing was found) mangal crashes

To Reproduce
Steps to reproduce the behavior:

  1. Search for manga that does not exist (e.g. type something like 'faofigagjiaogj')
  2. Press space or enter
  3. See error

Expected behavior
It is expected that nothing happens

System

  • OS: MacOS Ventura
  • Go Version 1.18.3
  • Mangal 1.5

Support eBook formats

Is your feature request related to a problem? Please describe.
I would like to read manga in ebook readers and having an option to export manga as .epub and other formats would be very helpful

Describe the solution you'd like
An option for format in config

Describe alternatives you've considered
Download as pdf or plain images and then use an external script or online converter

How do I build the binary?

Feature Description

I'm always frustrated when there are 0 build instructions.

I want to build this app on an ARM device, but can't find any instructions.
I am not a Go developer, but I can use Dockerfiles. Usually, they build the binaries from source. Otherwise, what's the point? I can download the binary myself, no need for a Docker image.

Solution you would like

Shell instructions that build the binary would be nice. An official Dockerfile that runs these instructions would be even better.
Both would be perfect.

Alternatives you have considered

I see a Makefile, but don't really know how to use these. Do I build the binary by executing make?

Additional context

Typically, the basics of a Dockerfile are to put shell instructions into lines e.g.

RUN mkdir /aaa
RUN echo 123

and to execute the binary in the end with CMD or ENTRYPOINT or both.

Advanced scraping system

Feature Description

Current scraping system is very weak and unstable with a lot of restrictions. If one site gets blocked it is very complicated to find a new one that would pass all the requirements. So I propose to use embedded scripts that would allow to define more complex actions.

Solution you would like

Ferret

Ferret is a declarative query language. It has the ability to scrape JS rendered pages, handle all page events and emulate user interactions.

Syntax looks like that

LET doc = DOCUMENT('https://github.com/topics')

FOR el IN ELEMENTS(doc, '.py-4.border-bottom')
    LIMIT 10

    LET url = ELEMENT(el, 'a')
    LET name = ELEMENT(el, '.f3')
    LET description = ELEMENT(el, '.f5')

    RETURN {
        name: TRIM(name.innerText),
        description: TRIM(description.innerText),
        url: 'https://github.com' + url.attributes.href
    }
            

Alternatives you have considered

Integrate Lua scripts with Gopher Lua. But that is way more complicated than Ferret and unnecessary to be honest

Anko is a great alternative!

Additional context

No response

Unable to change download path in config.toml

Describe the bug

I'm trying to download manga to a specific folder, but mangal keeps downloading to some temporary folder instead regardless of what I put in the download path. I am using the default config file (from config init) with only the download path changed to
download_path = '/mangal/someFolder'

Reproduction steps

  1. Change download_path in config.toml
  2. Download manga chapter (currently using chapter 1 of one piece on manganelo)
  3. Chapter is downloaded to a folder called 'private/var/folders/0m/zj0991.../T'

Expected behavior

Chapter should be downloaded to the specified filepath.

Additional context

No response

Operating System

macOS

Checks

  • I've used mangal doctor and it didn't help

Empty files when downloading from windows

Description
When downloading any manga via Powershell or Command Line, only blank files with 0B get downloaded, yet it states that the download was successfull. Also if you download via powershell you can't remove them via explorer.

To Reproduce
Steps to reproduce the behavior:

  1. Open mangal normally
  2. Download any manga (i tested with Jujutsu Kaisen, Naruto, One Piece, The Promised Neverland)
  3. Open folder and see the blank files

Expected behavior
Standard file type gets downloaded to default location (PDF file to home folder).

Screenshots
Image

Desktop:

  • Browser: Firefox 101.0.1 (64-Bit)
  • OS: Windows 10
  • Version 10.0.19044 Build 19044

Add .deb and .rpm packages

Feature Description

Me thinking what else should I add
catherine-heath-i4W8OINLI_I-unsplash

Solution you would like

No response

Alternatives you have considered

No response

Additional context

No response

Updated Docker container build

Hi, I've made an updated docker container build to take advantage of the new ENV variables.

FROM alpine:latest

ENV MANGAL_VERSION=v2.1.1
ENV MANGAL_CONFIG_PATH=/config/mangal.toml
ENV MANGAL_DOWNLOAD_PATH=/downloads
ENV MANGAL_USER=abc
ENV MANGAL_UID=1000
ENV MANGAL_GID=1000

WORKDIR "/config"

RUN mkdir -p "${MANGAL_DOWNLOAD_PATH}" && addgroup -g "${MANGAL_GID}" "${MANGAL_USER}" && adduser \
    --disabled-password \
    --gecos "" \
    --home "$(pwd)" \
    --ingroup "${MANGAL_USER}" \
    --no-create-home \
    --uid "${MANGAL_UID}" \
    "${MANGAL_USER}" && \
    chown abc:abc /config "${MANGAL_DOWNLOAD_PATH}"

ADD https://github.com/metafates/mangal/releases/download/${MANGAL_VERSION}/mangal-linux-amd64 /usr/local/bin/mangal

RUN chmod +x /usr/local/bin/mangal

USER "${MANGAL_USER}"

ENTRYPOINT ["/usr/local/bin/mangal"]

I think MANGAL_CONFIG_PATH is kind of incorrectly named, as of v2.1.1 it points to a FILE directly not a PATH, this might cause misinterpretation as i did when i was updating my docker container. I think it should take PATH which gives you the possibility in the future to migrate config files when breaking changes happens.

For example, right now config is at mangal_v1.toml, in the future you make breaking change, you can create mangal_v2.toml and migrate settings from mangal_v1.toml.

Also, making more config options configurable via ENV variables is really helpful. prime example at least in my case is formats.default i always set it to cbz

Wrong ComicInfo.xml generation when date in metadata is incomplete

Describe the bug

If the date field is incomplete in anilist (for example year and month exist but the day is null), mangal writes 0 as the value in ComicInfo.xml. This causes komga to fail.

image

Reproduction steps

You can see an example manga in this link

image

Expected behavior

It should not put an invalid value for dates.

Additional context

No response

Operating System

Linux

PowerShell script to run mangal

Feature Description

It would be awesome to have a powershell script to run mangal just like this shell script does

Here's my attempt to make it run.ps1 but I was not able to test it (I don't have a windows machine and setting up windows vm on m1 is a pain) and I'm not familiar with PowerShell.

If someone wishes to test it or point out some issues with it I would be very grateful

Support environment variables in the config

Feature Description

Title says its all

Solution you would like

[downloader]
path = "$XDG_CONFIG_HOME/..."
# or any other variable like $MANGA_PATH

Alternatives you have considered

Use env-based configuration rather than file one

Additional context

No response

better debug info

Feature Description

I added custom scrapper for my source but nothing got scrapped, or yes. I really don't know what is happening or any information to fix that problem. All I got was

Checking if latest version is used... OK
Checking config... OK
Please, enter a manga title to test customsource: isekai
Checking source customsource... Fail
Source customsource is not available
Try to reinitialize your config with mangal config init --force
Note, that this will overwrite your current config

Why did the source not available? How can the default source solve my problem?

Solution you would like

Add a debug flag or atleast write the log somewhere

Alternatives you have considered

No response

Additional context

No response

Volume Mode

Is your feature request related to a problem? Please describe.
It would be cool to be able to grab entire volumes instead of by chapter.

Describe the solution you'd like
A flag or something to add a step to roll up chapters into a single pdf for each volume.

Describe alternatives you've considered
n/a

Additional context
Obviously pretty dependent on structure of the manga since some don't use volumes but just an idea..

Inline mode chapters range selector does not work

Describe the bug

When using a range selector --chapters x-y it will select all available chapters

Reproduction steps

mangal inline --source Manganelo --query "death note" --manga first --chapters 1-3 -d

Expected behavior

Select only specified chapters

Additional context

No response

Operating System

macOS

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.