Provides a parser to parse file names and return data based on the names
Project description
This is a simple parser that is built to take a file path and return data based on that file path, to determine some common information about animes.
Usage
The usage of this is pretty simple, there are two main entry points into grabbing data from files. To parse through an entire directory (recursively) you can do the following
for data in aniparser.parse_directories("/home/user/Anime"):
print(data)
To not search recursively, just provide False to the recursive parameter
for data in aniparser.parse_directories("/home/user/Anime/Specific Anime Folder", recursive=False):
print(data)
If you want to parse just a single file
data = aniparser.parse("/home/user/Anime/Specicific Anime Folder/Specific Anime Episode.mpv")
print(data)
Details
The idea behind the parsing method in this library is to do the least amount of work possible while maintaining reliance. There are many common things that appear in a filename, and this does try to do them in some kind of "sane" order of commonality. It will only do some extra work when it's needed. Additionally, since this should always have the same output for the same input, as well as that output being a small memory footprint in of itself, this does use some aggressive caching that should help speed things up tremendously in long running uses.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file aniparser-0.1.1.tar.gz
.
File metadata
- Download URL: aniparser-0.1.1.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a626c0f10985fe56be983da1a1672bea568ca7f6425100f7a62269e32b54e36 |
|
MD5 | 5f41ce8e11f9de2e15974cc7e6a6a91e |
|
BLAKE2b-256 | 151147ddc345992516549340235853c6f9183bc6b0788715960d9bf47710a709 |
File details
Details for the file aniparser-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: aniparser-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fbe3845bc41ac09967c301f8f1d575d85e4075455e67de621625f02860b2745 |
|
MD5 | 8891422731d1853c55610a5701a4fea8 |
|
BLAKE2b-256 | a54cbd7783e3cf855990994b651e55fccab665283a92f6ac2dd9d2076bc50839 |