Closed tkuenzle closed 1 year ago
hmmm, this seems nice
altough, generally, i'm tired of this script because it's messy+spaghetty+hack-ish. Currently I'm thinking of re-writing it in Dart or something. Tho I will take this to consideration if i stick with Python
Another issue resolved by v3
:tada:
First of all, thanks a lot @TheLastGimbus for coming up with this nice script, I have found it to be very useful!
Similar to #111 I realized that there are a few files where this app is not able to infer the correct date but upon further inspection, it looks like it would not be hard at all to add them to this script.
When I took a look at the code however, I identified two problems:
In order to address these two issues and make the script much easier to extend in the future, I would like to propose the following change:
Move all the logic for date extraction into a separate
date_extractors
module which could look like this:We could then define a list of extractors (and even make this configurable through a command line argument) that specifies the all the extractors that we would like to apply in order of priority. Getting the date would then be as simple as
Such an implementation would nicely separate the extraction logic from priority and make it very easy for other people to add their own extractors.
If you think this could be a good idea and would be open for such a change, I would be happy to discuss the details with you and come up with a PR.