Giter Club home page Giter Club logo

mendo's Introduction

mendo

Was it worth the time? Definitely not. Was fun though.

CI: Build Status
License: License: GPL v3

The story

So, I use Anilist to keep track of my anime/manga list.
Usually, when I read manga online, there are various extensions to automatically track and update my manga progress like MALSync (the one I'm using, there should be more). My manga site of choice is Mangadex - they provide high quality images and no ads, pretty decent reader, it's a no-brainer choice. Unfortunately, they do not allow official rips. That's why sometime I would read my manga offline using my favourite manga reader MComix.

The problem

There are one problem with this method though...
MComix has not released any new version since 2016-02-12 (the last version they released was MComix-1.2.1). So integrating a native update client to sync your progress with a tracking site like Anilist is out of the question. Which means I don't really have any good option to update my manga progress when I read offline.

The solutions

So there are two solutions to this:

  1. Occasionally Alt-tab to Anilist and press the + button to update your progress. Super easy, super convenient.
  2. Use the external command support feature of MComix to run an external command and make use Anilist's API to automate this process. And you can already guess what I chose to do.

Mendo help page

mendo 0.2.1
Rudo2204 <[email protected]>
A CLI program to update manga progress

USAGE:
    mendo [FLAGS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information
    -v, --verbose    Sets the level of debug information verbosity

SUBCOMMANDS:
    auth      Authorizes mendo to update progress
    update    Updates manga progress

Authorization process

You need to authorize mendo to use the main feature of the program which is the update feature. To start the authorization process, simply type mendo auth in your terminal. It will open your browser and redirect you to Anilist page where you would press another green button Authorize to complete the process. That's it.
Note: If you somehow mess up something and need to reauthorize, you can use mendo auth --force to force mendo to reauthorize you.

How to integrate with MComix

Open MComix, File -> Open with -> Edit commands. Add a new external command, call it whatever you want.
And the command would be /path/to/mendo update %a. You can add a some -v to increase debug information logged to your data directory. You should find a directory named mendo in there. Refer to the table below.

Platform Value Example
Linux $XDG_DATA_HOME/mendo or $HOME/.local/share/mendo /home/alice/.local/share/mendo
OSX $HOME/Library/Application Support/mendo /Users/Alice/Library/Application Support/mendo
Windows {FOLDERID_RoamingAppData}\mendo\data C:\Users\Alice\AppData\Roaming\mendo\data

How to actually use it

So when you are done with the integration process, open your manga archives and read them like normal. When you come to a new chapter, press the assigned external button corresponding to mendo command. It will automatically update +1 to your manga progress. Yay.
NOTE: By default, the regex pattern ^(.*) (v?|c?)\d+ (most manga rippers use this naming convention) is used to get the manga title from the archived file. You can override this pattern with the optional flag --regexp (or -e for short). The manga title can be in their native name, romaji or english. As long as it's the first result when you search on Anilist it should work.

Contribute

Create new issue if you meet any bugs or have any ideas.
Pull requests are welcomed.

mendo's People

Contributors

rudo2204 avatar

Stargazers

 avatar

Watchers

 avatar

mendo's Issues

Lock a file to avoid updating a same progress multiple time

This could happen if the user use mendo multiple times in short session, it would spawn multiple mendo instances which will attempt to update the same progress.
The solution is to use something like fd-lock to lock the log file and unlock it when the update process is finished. This way the other process which spawned later will block until it can acquires the log file lock and then start its process.

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.