Skip to main content

Tools for weebs

Project description

weebtools

A tool mostly for downloading anime related stuff.

Installation

pip install weebtools

Usage

weebtools uses subcommands to split functionality. Each subcommand has their own arguments and options.

CLI


Top level options:

  • --help - Prints help, also shows subcommands
  • --version - Prints package version

Examples:

python -m weebtools --help
python -m weebtools --version

utils

  • Used mostly for miscellaneous helper functions

General usage

python -m weebtools utils [some_option(s)]

Options:

  • --help - Print help
  • --getChromeVersion - Prints current google chrome version
  • --getChromeDriverVersion - Prints current chrome driver version, looking in $HOME/bin
  • --downloadChromeDriver - Downloads latest chrome driver for your google chrome version

Examples

python -m weebtools utils --help
python -m weebtools utils --getChromeVersion
python -m weebtools utils --getChromeDriverVersion
python -m weebtools utils --downloadChromeDriver

img

Sites and url format supported:

  • yande.re
    • https://yande.re/post/show/[PIC_ID]
    • https://yande.re/post?tags=[ARTIST_TAG_NAME]
  • pixiv
    • https://www.pixiv.net/en/artworks/[PIC_ID]
    • https://www.pixiv.net/en/users/[ARTIST_ID] - can take different routes, but they all will get from /artworks
  • More to come!

General usage:

python -m weebtools img <piclink> [some_option(s)]

Options:

  • No options given:
    • If link type is single, downloads the image
    • If link type is artist, downloads all images from that artist
  • -h / --help
    • Prints help
    • Shows what links are supported as well as link type (single vs artist)
  • -u / --update
    • If artist folder exist, gets new updates / images until it finds it finds an existing image. (Lazy update)
    • This is particularly useful if the url supplied has lots of pages and you don't want to wait for all page iterations
  • -ua / --update_all
    • If artist folder exist, gets any missing images.

Examples:

python -m weebtools img -h                                                 # Prints help
python -m weebtools img https://yande.re/post/show/[PIC_ID]                # Downloads single image
python -m weebtools img https://yande.re/post?tags=[ARTIST_TAG_NAME]       # Downloads all images from this artist
python -m weebtools img https://yande.re/post?tags=[ARTIST_TAG_NAME] -u    # Lazy update on this artist
python -m weebtools img https://yande.re/post?tags=[ARTIST_TAG_NAME] -ua   # Updates with any missing images

Images are downloaded to $HOME/Downloads/images

File system structure:

$HOME/Downloads/images
|
└───artist1
|    |
|    └───png
|    |   |
|    │   └── *.png
|    |
|    └───jpg
|    |   |
|    │   └── *.jpg
|    │
|    └───source
|        |
|        └── info.json
|
└───artist2
|    |
|    └───png
|    |   |
|    │   └── *.png
|    |
|    └───jpg
|    |   |
|    │   └── *.jpg
|    │   
|    └───source
|        |
|        └── info.json
|...

As a module

  • Full of dinosaurs with laser guns
>>> from weebtools.utils import *
>>> getChromeVersion()
'103.0.5060.114'
>>> getChromeDriverVersion()
'103.0.5060.53'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

weebtools-0.3.0.tar.gz (51.3 kB view details)

Uploaded Source

Built Distribution

weebtools-0.3.0-py3-none-any.whl (40.7 kB view details)

Uploaded Python 3

File details

Details for the file weebtools-0.3.0.tar.gz.

File metadata

  • Download URL: weebtools-0.3.0.tar.gz
  • Upload date:
  • Size: 51.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for weebtools-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b75dd311bc06f3ea8dedfc3d6ed36da5bfc1fcacdf0eeb652b1758d557fde257
MD5 8adfd0acaa425fa7451743f5a8d94330
BLAKE2b-256 c918b25e8410667e9f56f4a92f5d070350c5fbf081411a435344215062e2af53

See more details on using hashes here.

File details

Details for the file weebtools-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: weebtools-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 40.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for weebtools-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43bee20b15c8a5ddf7d4dc0b45eafd5f53e8d5a104aae34b850ca2654473ef57
MD5 13e9b5571fdb2d15fbbf70bbac535259
BLAKE2b-256 430f352ea780d3b26c4510786ad909e3474c049767a9815e930b5bd3aed35d84

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page