A Haskell music organizer with a metadata composition language
Something like this will produce a m3u playlist file with the tracks that are obtained with the conditions provided:
songs <- filter(artist == "Nujabes") -- 1. adds Nujabes songs to set
|| filter(genre == "Hip Hop") -- 2. adds Hip Hop songs to set
&& limit(year > 1990) -- 3. limit the set to songs made after 1990
otherSongs <- filter(artist == "Aphex Twin") -- 1. Get all songs by aphex twin
&& limit(count == 100) -- limit number of tracks in playlist
result <- write $ union(songs, otherSongs) -- merges the sets together- [X] Data model for songs (with fields like artist, genre, year).
- [X] Parser for filter language (using Megaparsec).
- [X] Parser for Basic Syntax
- [X] Comparison
- [X] Operator
- [X] Values
- [X] Fields (Title, Artist, etc)
- [X] FieldType
- [X] Comparison validations
- [X] Parsers for commands
- [X] Filter
- [X] Limit
- [X] Sort
- [X] command chaining
- with boolean operators (&& and ||)
- [X] Parser for Basic Syntax
- [-] Evaluator that applies filters to song metadata.
- [X] Sort
- [X] Filter
- [ ]
IN PROGRESSLimit
- [ ] Variables
- [ ] Merge module (union/intersection/etc.. for merging two sets of songs)
- [ ] writing to .m3u
- [ ] Add playlist generation or metadata tagging features.
- [ ] CLI interface to specify source dirs, filters, and targets.