Skip to content

Commit

Permalink
build: new stable version
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoGuadrini committed Jan 13, 2023
2 parents 0cc4869 + 5bfa8b7 commit 166dbe8
Show file tree
Hide file tree
Showing 4 changed files with 245 additions and 111 deletions.
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Release notes

## 1.5.0
Jan 13, 2023

- _Refactor module_; all business logic into functions: **make_playlist**, **write_playlist** and **add_extension**
- Add `-S` or `--split` cli argument: see issue #2
- Fix check image and append mode
- Fix _enabled_encoding_ when is just enabled

## 1.4.0
Nov 10, 2022

Expand Down
44 changes: 39 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ``mkpl``: Make playlist
# ``make_playlist``: Make playlist command line tool

``mkpl`` is a _command line tool_ for create playlist file (**M3U format**).

Expand All @@ -10,7 +10,7 @@ To install ``mkpl``, see here:
$ pip install make_playlist # for python enviroment

$ dnf copr enable matteoguadrini/mkpl
$ dnf install python-make_playlist -y # for Red Hat, CentOS, Mageia and fedora
$ dnf install python-make_playlist -y # for Red Hat and fedora

$ git clone https://github.com/MatteoGuadrini/mkpl.git && cd mkpl
$ python setup.py install # for others
Expand Down Expand Up @@ -40,6 +40,7 @@ $ python setup.py install # for others
| -c | --append | Continue playlist instead of override it | |
| -w | --windows | Windows style folder separator | |
| -v | --verbose | Enable verbosity (debug mode) | |
| -S | --split | Split playlist by directories | |

## Examples

Expand Down Expand Up @@ -86,7 +87,7 @@ $ python setup.py install # for others
mkpl -d "my_files" -r -z 10485760 "multimedia.m3u"
```
8. Create playlist with only number one and two tracks wit regular expression
8. Create playlist with only number one and two tracks with regular expression
```bash
mkpl -d "my_mp3_collection" -r -p "^[12]|[012]{2}" "my music.m3u"
Expand Down Expand Up @@ -117,11 +118,44 @@ $ python setup.py install # for others
mkpl -d "new_collection" -r "my music.m3u" -l http://192.168.1.123/mp3/song1.mp3, http://192.168.1.123/mp3/song2.mp4
```
13. Create a playlist and set Windows backslash (\) folder separator (for Windows OS)
13. Create a playlist and set Windows backslash (\\) folder separator (for Windows OS)
```bash
mkpl -d "new_collection" -r "my music.m3u" -w
```
14. Split playlist into _N_ playlists fon _N_ directories
```bash
mkpl -d "folder1" "folder2" "folder3" -r "my_music.m3u" -S
```
Result:
```console
$> ls
my_music.m3u
folder1.m3u
folder2.m3u
folder3.m3u
...
```
## Use it like Python module
`mkpl` can also be used as a Python module to customize your scripts.
```python
from make_playlist import *
# Prepare playlist list: find multimedia files with name starts between a and f
playlist = make_playlist('/Music/collections',
'^[a-f].*',
('mp3', 'mp4', 'aac'),
recursive=True,
unique=True)
# Write playlist to file
write_playlist('/Music/AtoF.m3u', 'wt', playlist)
```
## Open source
_mkpl_ is an open source project. Any contribute, It's welcome.
Expand Down Expand Up @@ -165,4 +199,4 @@ Thanks to Dane Hillard for writing the _Practices of the Python Pro_ books.
Special thanks go to my wife, who understood the hours of absence for this development.
Thanks to my children, for the daily inspiration they give me and to make me realize, that life must be simple.

Thanks Python!
Thanks, Python!
2 changes: 1 addition & 1 deletion __info__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

"""Information variable used by modules on this package."""

__version__ = '1.4.0'
__version__ = '1.5.0'
__author__ = 'Matteo Guadrini'
__email__ = '[email protected]'
__homepage__ = 'https://github.com/MatteoGuadrini/mkpl'
Loading

0 comments on commit 166dbe8

Please sign in to comment.