Coder Social home page Coder Social logo

marcfehling / pyaudiolibtools Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 17 KB

A collection of basic python scripts to manage your local music library.

License: GNU General Public License v3.0

Python 100.00%
python slugify mutagen audio-metadata audio-converter audio-library flac mp3 ogg

pyaudiolibtools's Introduction

pyAudioLibTools

A collection of basic python scripts to manage your local music library.

filename_metadata.py

Renames and moves all files of a specified music container format on basis of their metadata.

The script expects a source folder as a first, and a destination folder as a second argument. The source folder will be parsed recursively, and all of its contents will be renamed and moved to the destination folder. To work on the same folder, simply provide it as both source and destination.

All files belonging to the specified audio container format will be renamed in the process, according to the specified template. FLAC files will be renamed by default; all other files will be ignored.

By default, the path of any moved file relative to the source folder will be preserved. However, user specified folder templates based on metadata can be used as well by changing highlighted sections in the script.

Requires the additional python packages mutagen and slugify.

Example

Calling the script with the following parameters:

sh ./filename_metadata.py ./path/to/source ./path/to/destination

will move all files from the source folder, e.g.:

./path/to/source/genre/album/file_with_metadata.flac

to the destination folder, e.g.:

./path/to/destination/genre/album/101_title-of-first-song.flac

convert_directory.py

Converts all audio files in a folder recursively from one audio format to another.

The script requires a source folder as a first, and a destination folder as a second argument. The source folder will be parsed recursively, and the desired encoder will be run on multiple files at once. To work on the same folder, simply provide it as both source and destination. The directory tree relative to the source folder will be preserved in the process.

By default, FLAC files will be converted to the Ogg Vorbis format, with a quality=5 setting. Further specification on the encoder can be made in highlighted sections of the script. Metadata will be copied from the original file to the converted ones. Files of different types, e.g. album covers, will be copied.

Requires the additional python package mutagen, as well as encoders for the desired audio formats, i.e. oggenc for Ogg Vorbis, lame for MP3, or flac for FLAC.

Example

Calling the script with the following parameters:

sh ./convert_directory.py ./path/to/source ./path/to/destination

will convert all files from the source folder, e.g.:

./path/to/source/genre/album/101_title-of-first-song.flac

to the destination folder, e.g.:

./path/to/destination/genre/album/101_title-of-first-song.ogg

pyaudiolibtools's People

Contributors

marcfehling avatar

Watchers

 avatar  avatar

pyaudiolibtools's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.