Code Monkey home page Code Monkey logo

mkpl's Introduction

πŸ‘‹ Hi, I'm Matteo Guadrini πŸ‘‹

I'm a DevOps and Python/Rust developer.

Python and Rust development is my passion as well as my job.

  • author of nosqlapi, pyreports, PSCouchDB, fontpreview, dinosay, mkpl...
  • writes high quality utilities to optimize terminal productivity
  • wrote them to spend more time with his kid than at a computer
  • he studies Rust to write and build a better software

Donate with paypal Donate to Telethon

Matteo Guadrini's GitHub stats
Streak stats
Top Langs

References

CV: https://matteoguadrini.github.io

mkpl's People

Contributors

matteoguadrini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

nearlytrex

mkpl's Issues

mkpl enhancement

Description

Create a m3u file recursively for every directory?

Proposed names of the parameters (short and long)

-rd recursive directory

Additional context

I think a lot of music collectors follow a folder structure and an easy way to update all their folders with one command will be very helpful

Also, Thanks for creating this projectπŸ‘ Found this on ask.ubuntu

mkpl enhancement - Support .opus files

Description

Description of the proposal

Enable support for OPUS format files.

Proposed names of the parameters (short and long)

None needed.

  • name parameter
  • possible argument(s)

Additional context

This error is reported for a directory with *.opus files:

warning: no multimedia files are found here:

[Q&A/HELP] make m3u based on track ID?

i have a huge music collection now , but the problem i did while ripping them is, they have names that do no start with numbers
, instead they start with music file names , that's a problem , since mpv plays files based on alphatic order .

i just want mkbl to make m3u list of album i am going to play , in track number order and feed to it mpv

this are the some other post of same question :
https://www.reddit.com/r/mpv/comments/10sp0ge/questionhelp_force_to_play_track_based_upon_track/

Ability to use full paths in the playlist file output

Description

Currently the playlist is generated relative to the directory, for example if I have my files in c:\files\music\ and run mkpl from c:\files\ the generated playlist items will have the path music\tune.mp3

Can an option be added to enable full paths (c:\music\tune.mp3)

Proposed names of the parameters (short and long)

-fp -fullpath

mkpl fails to create playlist if filenames have characters such as ō

Description

mkpl fails to create playlist if filenames have characters such as ō

Some file names may have other character set / encodings (found in non english languages) and these characters seem to crash mkpl - the error is only apparent if you enable verbose output (-v). If verbose is not enabled, it will say the playlist argument is not defined.

Example output (Windows):
mkpl -d c:\temp\ -v test.m3u
debug: formats={'aiff', 'mp2', 'avi', 'mp1', 'm4a', 'alac', 'mp3', 'wmv', 'opus', 'xvid', 'wma', 'wav', 'ogg', 'mpg', 'mov', 'mpeg', 'divx', 'mp4', 'flac', 'aac'}, recursive=False, pattern=.*, split=False
debug: current directory=c:\temp, root=c:
debug: add multimedia file temp\Test - ō.mp3
debug: write playlist test.m3u
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\keef\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\Scripts\mkpl.exe_main
.py", line 7, in
File "C:\Users\keef\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\mkpl.py", line 345, in main
_process_playlist(multimedia_files, args)
File "C:\Users\keef\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\mkpl.py", line 301, in _process_playlist
write_playlist(other_playlist if other_playlist else cli_args.playlist,
File "C:\Users\keef\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\mkpl.py", line 182, in write_playlist
pl.write(joined_string.join(files[ext_part:max_tracks]) + end_file_string)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1008.0_x64__qbz5n2kfra8p0\Lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode character '\u014d' in position 12: character maps to

Steps to Reproduce

Try to create a playlist from a directory which contains a filename having non english characters such as ō

Line of code
Unknown

Expected Behaviour

  • Better error handling - it should skip any problematic files and move on to the next
  • Preferably, allow these file names to be added to the playlist

Your Environment

Python 3.11

  • mkpl version used: 1.6.0
  • Operating System and version: Windows 11

Additional context

typo and suggestion one more include file type, utf8 encoding default

7. Create playlist with music and video files if files is greater then 10MB

7. Create playlist with music and video files if files are greater than 10MB

still haven't tried it out yet but will soon. Just by looking at the examples I'm not clear the difference between

-f | --format | Select only a file format | Format of file. ex. mp3

-i | --include | Include other file format | Format of file. ex. mp3

so is -i like appending -i mp3 opus (so adding multiple files)
-f is saying choose mp3 and exclude all others?

mkpl -d "new_collection" -r "my music.m3u" -g "UTF-8"
Also is there a reason why utf-8 encoding isn't the default? I remember pysubs2 eventually made it the default about a year or so ago.

the sort and regex features are awesome..very powerful stuff...

Shuffles order every time

I can't find a way to instruct mkpl to create playlist "in album order".
it's like the "shuffle" option is always set.
basically this is what happens:

$ cd Electric\ Light\ Orchestra\ (1975)\ Face\ The\ Music/

$ mkpl test.m3u

$ cat test.m3u
11 - Strange Magic [Single Edit].m4a
01 - Fire On High.m4a
03 - Evil Woman.m4a
06 - Strange Magic.m4a
04 - Nightrider.m4a
07 - Down Home Town.m4a
05 - Poker.m4a
10 - Evil Woman [Stripped Down Mix].m4a
09 - Fire On High [Early Alternate Mix].m4a
12 - Waterfall [Instrumental Mix].m4a
08 - One Summer Dream.m4a
02 - Waterfall.m4a

mkpl enhancement: add ability to order playlist entries by file "track" metadata

Description

Description of the proposal
See issue #4 for evolution of this idea.

It would be great to have the default be to order tracks lexically in playlists by their "track" tag/metadata, and then my filename if no metadata is found. This default behavior could avoid having to specify a flag for this. The use of a metadata parsing library could be extended to add filters as CLI flags, which would filter files based on metadata, for other enhancements, but this is perhaps an extension of the kernel of this enhancement.

Proposed names of the parameters (short and long)

N/A, for this enhancement; posssibly --order-by with "filesystem" "metadata:track" as arguments, if it was absolutely necessary.

  • name parameter: N/A
  • possible argument(s) N/A

Additional context
See issue #4 as mentioned.

mkpl shuffle and extension bug

Description

When specified the --shuffle flag and one of exensions attribute as --title or --encoding, the first three lines are shuffled with tracks.

Steps to Reproduce

$ mkpl "test.m3u" --shuffle --title "My test shuffled" --directories /mymusic
$ cat "test.m3u"
/mymusic/track1.mp3
/mymusic/track14.mp3
#EXTM3U
/mymusic/track2.mp3
#PLAYLIST: My test shuffled
...

Expected Behaviour

The first three lines remains unchanged.

Your Environment

  • mkpl version used: 1.2.0
  • Operating System and version: linux Fedora 36 x86_64

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.