Skip to main content

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


Download files

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

Source Distribution

aniparser-0.0.6.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

aniparser-0.0.6-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file aniparser-0.0.6.tar.gz.

File metadata

  • Download URL: aniparser-0.0.6.tar.gz
  • Upload date:
  • Size: 7.3 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

Hashes for aniparser-0.0.6.tar.gz
Algorithm Hash digest
SHA256 0823f87af26782cbe5680c6a5f23f3f1ad230ef8d3f8b74fd2a4f1d3dfd99902
MD5 cfe3216c5fe51511636db38ea3c16651
BLAKE2b-256 974e0e003da3bd9b374f03312f15d8e158479c3ff38092ced6a705e1e80599cc

See more details on using hashes here.

File details

Details for the file aniparser-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: aniparser-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 8.0 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

Hashes for aniparser-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7b4b666a6c5a5c1faa33a474c78f5deddd8d6e0421bf74740acde40b9d299888
MD5 e375eeecbb72a4b8f2362012b047e523
BLAKE2b-256 55293f4a2eaede8a5f2776391ca6bdeb927af50a6228ca0ea1c98610728752f8

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