Skip to content

justinmstuart/python-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Utils

This is a collection of Python scripts to automate tasks.

Available Scripts

Scripts are fully tested, linted, and compatible with both direct execution and Python's module runner (-m).

  • scripts/trim_filenames.py: Recursively removes a specified number of characters from the beginning of filenames in a directory and its subdirectories.
  • scripts/mp3_metadata_stripper.py: Recursively removes metadata from mp3 and m4a files in a directory and its subdirectories.
  • scripts/cbz_processor.py: Compresses and optimizes CBZ files in a directory (see script for details).

Requirements

  • Python 3.6+

Getting Started

source .venv/bin/activate
pip install -r requirements.txt

Running Scripts

You can run any script directly or as a module:

python -m scripts.trim_filenames
python -m scripts.mp3_metadata_stripper
python -m scripts.cbz_processor

Linting & Code Quality

To check code quality and style (using your project's .pylintrc):

pylint --rcfile=.pylintrc scripts tests

Running Tests with Coverage

To run all tests and check code coverage:

pytest --maxfail=1 --disable-warnings --cov=scripts --cov-report=term-missing

You can also run coverage for a specific test file:

pytest --cov=scripts tests/test_trim_filenames.py

About

A collection of utility scripts for common file operations and system tasks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages