mox

package module
v0.0.0-...-b77a325 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2023 License: MIT Imports: 14 Imported by: 0

README

mox - Comics downloader for Mox.moe

Note: This program is currently not working on the website.

Installation

git clone https://github.com/jlhg/mox.git
cd mox
make

Usage

Create config:

cp config/config.example.toml config/config.toml

Open config/config.toml and Set mox's account E-mail and password.

Download comics books:

bin/mox -c config/config.toml dl -i <id>
  • id: The comics ID on website's URL

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient() (client *http.Client, err error)

func WatchTask

func WatchTask(ctx context.Context)

Types

type Book

type Book struct {
	ID           string
	Name         string
	MobiVIPPath  string
	MobiVIP2Path string
	EpubVIPPath  string
	EpubVIP2Path string
}

type Comics

type Comics struct {
	Title   string
	Authors []string
	Books   []*Book
}

type Config

type Config struct {
	Mox MoxConfig `toml:"mox"`
}

func NewConfig

func NewConfig(path string) (config *Config, err error)

func (*Config) Init

func (c *Config) Init() (err error)

type MoxClient

type MoxClient struct {
	*http.Client
	Ctx context.Context
}

func NewMoxClient

func NewMoxClient(ctx context.Context) (c *MoxClient, err error)

func (*MoxClient) DownloadComics

func (c *MoxClient) DownloadComics(id int) (err error)

func (*MoxClient) GetComics

func (c *MoxClient) GetComics(id int) (comics *Comics, err error)

func (*MoxClient) Login

func (c *MoxClient) Login() (err error)

func (*MoxClient) Logout

func (c *MoxClient) Logout() (err error)

type MoxConfig

type MoxConfig struct {
	Email        string `toml:"email"`
	Password     string `toml:"password"`
	DownloadPath string `toml:"download_path"`
	Transfers    int    `toml:"transfers"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL