novoid / move2archive

Managing event-related files in a folder hierarchy like "<ARCHIVE>/2013/2013-05-17 Event name/"
GNU General Public License v3.0
23 stars 4 forks source link

note: potential pitfall for files with timestamps similar enough #8

Closed nbehrnd closed 1 year ago

nbehrnd commented 1 year ago

For stamps by date2name about day and time, the current implementation of "common substring" can tap into this stamp. Actually -- extending the script's internal documentation, this already takes place with two files 2023-06-11T12.26.18 Wedding of Paula and John - Guests arriving.jpg and 2023-06-11T13.05.48 Wedding of Paula and John - Ceremony starts.jpg which share the last digit of the seconds; instead of the anticipated pattern of Wedding of Paula and John, the implementation suggests 8 Wedding of Paula and John.

Tests so far did not yield the same error for files where date2name assigned only the day alone.

The attached log reports the findings for the current version of move2archive by 2023-06-11 in an instance of Linux Debian 13/trixie (branch testing) with Python 3.11.4.

2023-07-14_report_move2archive.txt

novoid commented 1 year ago

Absolutely true. I recognized myself.

Didn't think that this new feature get adapted so fast. ;-) However, its idea is cool, isn't it? I wondered why I wasn't planning for that sooner.

Anyway, this issue is fixed and its implementation is much more cleaner now with the latest version. Thanks for giving me the incentive to fix that. It also annoyed me.

nbehrnd commented 1 year ago

I agree, the concept is an attractive one. Even more remarkable is the terse code to implement the functionality, considerably more condensed than what I found as «longest common subsequence» on stackoverflow about processing only two strings.

2023-07-17_longest_common_subsequence.md