-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All Matching Regex #15
All Matching Regex #15
Conversation
I will review this in the afternoon, thanks a lot! |
Note also that this refs: #5 because it provides an easier way to edit |
Yes, that input parsing function is very very beautiful, amazing job there! There are a few edge cases I found >> all_matching_regex("1 - 1:12:00 - hello 32") # dash instead of a dot for the track number
('1:12:00', '- hello 32')
# There is a dash inside the title >>> all_matching_regex("1:12:00 - hello 12:13") # time inside the title of the song
('1:12:00', 'hello')
# The `12:13` in the title is ignored Not sure if these are easy fix, let me know. Also we should update the README, I could do this if you don't want to. |
Thanks for your comment :) |
Thanks again! Great job! |
Hey, I removed a regex in commit #4d84353 It was causing a problem for songs that started with a number (for example "21 Guns" from Green Day was getting recognized as "Guns"). If you see any potential problem in this, let me know. I also updated my code a little bit, I wrote this a few years back so it needed some cleaning. |
Hey, I am writing tests for track_parser, right now I expect this: self.assertEqual(track_parser("12:32"), ("", "")) but I get Do you think it should return ('', '') or ('12:32', '')? EDIT: let's also consider that right now |
I haven't considered what happens on fail.
What is your take on the matter? |
First of all I think we should throw an exception instead of returning an empty tuple. Now that I think more on this, I also agree that just timestamp should work, but we have to handle the empty title somehow, for example naming the tracks with their position. |
OR
|
Added a utility method, able to read a multitude of user input from
tracks txt
.Other changes (minor):
split.py
DRY.tracks.txt
from the repository and added atracks.txt.example
in it's place, because it is a configuration file, thus it is better to be environment specific.