tosho-nids
A minimal asynchronous client for NI by DS.
The following crate is used by the tosho app.
Usage
Download the tosho app, or you can utilize this crate like any other Rust crate:
use ;
async
Also see: FILTERS.md for more information about the filters system.
Authentication
You can authenticate to access your collection and other personalized data via either JWT token or email and password.
Or, directly with JWT token:
Or, if you use the crates:
use NIClient;
async
Or using email and password:
use NIClient;
async
To get the JWT token, you need to login to your account on the website, then:
- Open the developer tools or inspector
- Go to the "Application" tab
- Look for "Local Storage" in the sidebar and the site URL
- Find the key
access_tokenand copy the value - Authenticate using the CLI or the crate
Understanding reader frames
Some pages may have multiple frames for guided reading. These frames are defined by their coordinates and dimensions relative to the page size.
Minimized example:
"frames":
With the full image size being 2550x3263 pixels, the first frame would be located at:
- X: 0.04467951784087 * 2550 ≈ 114 pixels
- Y: 0.032608695652174 * 3263 ≈ 106 pixels
- Width: 0.91787978937503 * 2550 ≈ 2340 pixels
- Height: 0.20893719806763 * 3263 ≈ 681 pixels
That would means you would need to create a highlight box at (114, 106) with a size of 2340x681 pixels on the full image for the first frame.
Note:
- Opacity is used to define how transparent the outer area should be when highlighting the frame.
- There is also
colorfield, although currently unused but may be used in the future to define the outer area color.- Note that the color can be anything supported by CSS color values.
- The way the website do it is creating an SVG wrapper that has
imageand then creatingmaskof white + black rectangles to highlight the frame area.- With the black frame being the frame area, and white being the outer area.
- The mask itself also has a color fill that can be defined by the
colorfield.
Disclaimer
This project is designed as an experiment and to create a local copy for personal use. These tools will not circumvent any paywall, and you will need to purchase and own each chapter with your own account to be able to make your own local copy.
We're not responsible if your account got deactivated.
License
This project is licensed with MIT License (LICENSE or http://opensource.org/licenses/MIT)