pavloDeshko / obsidian-index-checker

Repo for Index Checker plugin for Obsidian
MIT License
8 stars 0 forks source link

Option to include non existent notes in the index file #5

Open karthik-coder opened 5 months ago

karthik-coder commented 5 months ago

Option to include non existent notes in the index file I am currently getting the list of non-existent notes manually by using these plugins

  1. Dataview
  2. Obsidian Run Plugin

and this bit of code:

`

non-existent files

%% run start

const basedata = Object.entries(dv.app.metadataCache.unresolvedLinks).filter(([origin, unresolved]) =>
              Object.keys(unresolved).length)
console.log(basedata)

const uniqueItems = new Set(); 
basedata.forEach(([_, obj]) => { Object.keys(obj).forEach(key => uniqueItems.add(key)); }); 
const uniqueItemList = Array.from(uniqueItems); console.log(uniqueItemList);

const finallist = uniqueItemList.map(item => dv.fileLink(item,false,""))
console.log(finallist)
return dv.markdownList(finallist)

%% %% run end %% ` I wish the index-checker could do this automatically Thank you.

pavloDeshko commented 3 months ago

hi, sorry for delay

so with this code you're logging all links in your vault that point to nothing ?

you can use this plugin for that Dangling links

or if you want to create notes from dangling link maybe Note Batcher will help

in any way i really don't want to overload this plugin with functinality not directly related to "check if all files are linked in index and add links for those that don't" - do one thing and do it well thing :) as well let user have anything extra he wants in his index files and don't screw them by removing something..

cheers, drop a word if i misanderstood what exactly you wish for!