LucasVanHaaren/pelican-data-files

Duplicate check

Closed this issue ยท 4 comments

Hey there,
for my next project I'm thinking about using your plugin - going through its code, I noticed line 75 in generators.py: TODO check for duplicates (eg: profile.json and profile.yaml). I want to contribute to your plugin, and this seems an easy target ๐Ÿ˜€ In case of a duplicate, would you .. 1. log error and exit or 2. prefer one over the other - and if so, preferring by modified time seems reasonable, no?

What do you think?

Cheers
S1SYPHOS

Hello @S1SYPHOS,

Yeah I put this feature aside due to lack of time for this project.
It would be so nice if you could work on it !

I think a good implementation of dupe checking is to check latest modified time and log to user that a file was chosen instead of the other.

I inform you that, I will soon merge this PR #13 which adds TOML support but also change some internal functions.

I'll see if I can whip up something, I already saw the TOML issue/PR, glad you reminded me so I don't overlook it ๐Ÿ˜…

Thanks a lot ๐Ÿ˜ƒ !

I added a PR adressing this issue (= resolving it) ๐ŸฆŠ