Code Monkey home page Code Monkey logo

lastag's Introduction

lastag - tag mp3 files with music genres from last.fm

Cmus is great. One of the many nice features is the filter. Live filtering, saving filters, combining filters, filter by genre, year, duration. All that. Depending on the mood, I like to only listen to certain genres, but the mp3 files are not always helping. Genre tags are either missing or they use the id3v1 tags, with only 255 genres available. Well, metal has hundreds of variations, so that is close to useless.

Luckly, last.fm has all that I need in the genres arena. Every artist page has up to five genre tags. So I'm grabing those and sticking them onto the mp3 files using id3v2. Job done. Now I can filter away. Sweet.

features

  • tag a single mp3 file
  • tag all the mp3 files in the given folder
  • daemon mode; tag all new mp3 files added to that folder, recursively. If a flac file is added instead, create nice little mp3 files out of that, and tag those. That is, until cmus can filter flac files. Of course, you might want to either remove the flac file afterwards or only add the mp3 file to the cmus library. Or even better, filter only the mp3 files
  • with no parameters, echo the genre of the current playing song in cmus and exit
  • Read -h for all the stuff

install

    sudo pacman -S id3v2 inotify-tools mp3splt
    git clone https://github.com/mihaiolteanu/lastag
    cd lastag
    sudo ./install.zsh

usage

If you don't want the flac splitting, remove the mp3splt references from above and the install file. Also remove the elif body from the add_genres_to_file function in the main application.

bugs and stuff

File a complaint, I'll have a look.

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.