It seems Duplicate Detection is only used when creating a new ID.
But when coping files one might forget to generate a new ID, this would lead to IDs being used more than once, which kind of defeats the whole purpose of having one.
Current workaround:
use dataviewjs to identify files with duplicate ids and resolve manualy:
const pages = dv.pages().where(p => p.id);
const groups = {};
for (let p of pages) {
if (!groups[p.id]) groups[p.id] = [];
groups[p.id].push(p);
}
for (let id in groups) {
if (groups[id].length > 1) {
dv.header(3, `Duplicate ID: ${id}`);
dv.table(
["Name", "Created", "Modified"],
groups[id].map(p => [
p.file.link,
p.file.ctime,
p.file.mtime
])
);
}
}
Not sure how tackle this, but some kind of integrated check would be great.
Thank you for sharing this great little perl with us! Keep it up! 👍
It seems Duplicate Detection is only used when creating a new ID.
But when coping files one might forget to generate a new ID, this would lead to IDs being used more than once, which kind of defeats the whole purpose of having one.
Current workaround:
use dataviewjs to identify files with duplicate ids and resolve manualy:
Not sure how tackle this, but some kind of integrated check would be great.
Thank you for sharing this great little perl with us! Keep it up! 👍