Code Monkey home page Code Monkey logo

Comments (3)

MatteoGuadrini avatar MatteoGuadrini commented on May 30, 2024

Hi @soup-eater, maybe I understand what you mean to propose; if I understand correctly, you would like an optional argument to create N playlists (or parts of a global one) in N recursive folders.

mkpl was designed to manage one playlist at a time, leaving the user to manage multiple playlists through his own console (bash, zsh, msdos, powershell, etc...). Anyway, the proposal seems like a good idea to me!

This kind of behavior is redundant for one simple reason; the -r or --recursive flag already acts as a recursion to the directories specified in the -d or --directories flag.

What you want, perhaps, is a new -S or --split flag, which splits the playlist into N parts as many folders are specified.
For instance:

$ mkpl myplaylist --directories folder1 folder2 folder3 --split --recursive
$ ls
myplaylist_folder1.m3u myplaylist_folder2.m3u myplaylist_folder3.m3u

WORKAROUND: however this operation is feasible even today without a specific flag; just use a for loop in bash:

$ for folder in "folder1 folder2 folder3"; do mkpl "myplaylist_$folder" --directories $folder --recursive; done

from mkpl.

 avatar commented on May 30, 2024

yes, thats exactly it. It appears this funcationality is alredy there 😅

On a sidenote: is it possible to give the playlist file the same name as the directory (without manually adding it)? This will allow the the playlist file to get updated automatically (via a cron job or other) as the folder count grows

from mkpl.

MatteoGuadrini avatar MatteoGuadrini commented on May 30, 2024

I released a few minute ago a new release 1.5.0, that implement the enhancement proposed.

from mkpl.

Related Issues (9)

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.