obsidian-hub icon indicating copy to clipboard operation
obsidian-hub copied to clipboard

Script the special case of hipstersmoothie and other duplicate file names

Open claremacrae opened this issue 4 years ago • 3 comments

There is both a person and a theme called hipstersmoothie:

image

There are some manual fixes in the repo's markdown files for this... And each time update-releases.py is run, these manual fixes need to be reverted.

It would be nice to adjust the script so that it detects clashes of file names, and takes care of adding the disambiguation... to remove several manual steps in the updating...

claremacrae avatar Dec 08 '21 19:12 claremacrae

Quick workaround: Check if author == plugin id or theme name, and if it does add path information, e.g. what we do manually on these lines:

https://github.com/obsidian-community/obsidian-hub/blob/655d1ead61cb7df5be5c594ccacacfadf99f1655/01%20-%20Community/People/hipstersmoothie.md?plain=1#L27

https://github.com/obsidian-community/obsidian-hub/blob/218d58ed3d593a36d177e44b300fb0486377bace/02%20-%20Community%20Expansions/02.05%20All%20Community%20Expansions/Themes/Hipstersmoothie.md?plain=1#L23

argenos avatar Apr 27 '22 20:04 argenos

I finally got around to writing some dataviewjs to detect files with duplicate file names in my own vault...

The code is here: https://github.com/claremacrae/obsidian-experiments-plugin/issues/1

Applying it to the Hub, I found the following duplicates:

Everblush: 01 - Community/People/Everblush.md
Everblush: 02 - Community Expansions/02.05 All Community Expansions/Themes/Everblush.md

hipstersmoothie: 01 - Community/People/hipstersmoothie.md
Hipstersmoothie: 02 - Community Expansions/02.05 All Community Expansions/Themes/Hipstersmoothie.md

remotely-save: 01 - Community/People/remotely-save.md
remotely-save: 02 - Community Expansions/02.05 All Community Expansions/Plugins/remotely-save.md

Sekund: 01 - Community/People/Sekund.md
sekund: 02 - Community Expansions/02.05 All Community Expansions/Plugins/sekund.md

claremacrae avatar May 27 '22 12:05 claremacrae

Another new case - in incoming PR #577:

image

claremacrae avatar Dec 19 '22 20:12 claremacrae