Skip to content

Commit

Permalink
feat: add orderby-track argument and
Browse files Browse the repository at this point in the history
fix open encoding playlist files; refs #6 and #7
  • Loading branch information
MatteoGuadrini committed Jun 12, 2023
2 parents 676cb47 + 38717ff commit 731ce6c
Show file tree
Hide file tree
Showing 6 changed files with 341 additions and 169 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,6 @@ pip-selfcheck.json

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json


# End of https://www.gitignore.io/api/python,pycharm+all,visualstudiocode
9 changes: 9 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Release notes

## 1.7.0
Jun 12, 2023

- Add _find_pattern_ function
- Add find pattern for _ID3 tags_
- Add `orderby-track` cli argument: see issue #6
- Add _encoding_ and _ignore error handling_ to `write_playlist` function: see issue #7
- Fix reset _enabled_extensions_ with split argument

## 1.6.0
Mar 07, 2023

Expand Down
52 changes: 27 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ``make_playlist``: Make playlist command line tool

``mkpl`` is a _command line tool_ for create playlist file (**M3U format**).
``mkpl`` is a _command line tool_ to create playlist files (**[M3U](https://en.wikipedia.org/wiki/M3U) format**).

## Installation

Expand All @@ -20,29 +20,30 @@ $ python setup.py install # for others

``mkpl`` have many command line arguments. They are explained in this table:

| short | long | description | args |
|-------|----------------|-----------------------------------------------|---------------------------|
| -d | --directories | Directories that contains multimedia file | Path of directories |
| -e | --exclude-dirs | Exclude directory paths | Path of directories |
| -i | --include | Include other file format | Format of file. ex. mp3 |
| -p | --pattern | Regular expression inclusion pattern | Regular expression string |
| -f | --format | Select only a file format | Format of file. ex. mp3 |
| -s | --size | Start size in bytes | Bytes number |
| -m | --max-tracks | Maximum number of tracks | Number |
| -t | --title | Playlist title | Title string |
| -g | --encoding | Text encoding | UTF-8,ASCII,UNICODE |
| -I | --image | Playlist image | Image path |
| -l | --link | Add remote file links | Links |
| -r | --recursive | Recursive search | |
| -a | --absolute | Absolute file name | |
| -s | --shuffle | Casual order | |
| -u | --unique | The same files are not placed in the playlist | |
| -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 | |
| -o | --orderby-name | Order playlist files by name | |
| -O | --orderby-date | Order playlist files by creation date | |
| short | long | description | args |
|-------|-----------------|-----------------------------------------------|---------------------------|
| -d | --directories | Directories that contains multimedia file | Path of directories |
| -e | --exclude-dirs | Exclude directory paths | Path of directories |
| -i | --include | Include other file format | Format of file. ex. mp3 |
| -p | --pattern | Regular expression inclusion pattern | Regular expression string |
| -f | --format | Select only a file format | Format of file. ex. mp3 |
| -s | --size | Start size in bytes | Bytes number |
| -m | --max-tracks | Maximum number of tracks | Number |
| -t | --title | Playlist title | Title string |
| -g | --encoding | Text encoding | UTF-8,ASCII,UNICODE |
| -I | --image | Playlist image | Image path |
| -l | --link | Add remote file links | Links |
| -r | --recursive | Recursive search | |
| -a | --absolute | Absolute file name | |
| -s | --shuffle | Casual order | |
| -u | --unique | The same files are not placed in the playlist | |
| -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 | |
| -o | --orderby-name | Order playlist files by name | |
| -O | --orderby-date | Order playlist files by creation date | |
| -T | --orderby-track | Order playlist files by track | |

## Examples

Expand Down Expand Up @@ -141,11 +142,12 @@ $ python setup.py install # for others
...
```
15. Sort playlist files by name (`-o`) or by creation date (`-O`):
15. Sort playlist files by name (`-o`), by creation date (`-O`) or by track number (`-T`):
```bash
mkpl -d "new_collection" -r "my music.m3u" -o
mkpl -d "new_collection" -r "my music.m3u" -O
mkpl -d "new_collection" -r "my music.m3u" -T
```
## Use it like Python module
Expand Down
4 changes: 2 additions & 2 deletions __info__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# created by: matteo.guadrini
# __info__ -- mkpl
#
# Copyright (C) 2022 Matteo Guadrini <[email protected]>
# Copyright (C) 2023 Matteo Guadrini <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -22,7 +22,7 @@

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

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

0 comments on commit 731ce6c

Please sign in to comment.