samwho / obsidian-wikidata-importer

A plugin for importing data from Wikidata into your Obsidian vault.
MIT License
20 stars 5 forks source link

Need a way to De-Duplicate Links to other WD-Objects #8

Open SpocWeb opened 1 month ago

SpocWeb commented 1 month ago

On importing Properties or the whole Entity, Links to other Entities are created using their Labels, rather than their Entity-ID, which is great for readability.

But these Labels are not unique in WikiData, which is a Problem. Example: Import Q525 (Sun) results in the following Properties:

different from:
  - "[[WD/WD~sun]]"
  - "[[WD/WD~Sonne]]"
  - "[[WD/WD~Sonne]]"
  - "[[WD/WD~Sonne]]"
  - "[[WD/WD~RV Sonne]]"

Which is also ambiguously displayed in the WikiData Web UI: https://www.wikidata.org/wiki/Q525#P1889 Please give us the means to disambiguate this e.g. by a configuration-switch for appending the WikiData-ID or a Format-String for the Link, instead of only a Prefix.

SpocWeb commented 1 month ago

Hi @samwho , I created a Pull-Request to make the generated InternalLink more flexible. Please consider merging this: https://github.com/samwho/obsidian-wikidata-importer/pull/9