Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
karthik-coder opened this issue Mar 30, 2024 · 1 comment
Open

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

karthik-coder opened this issue Mar 30, 2024 · 1 comment

Comments

@karthik-coder
Copy link

karthik-coder commented Mar 30, 2024

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
Copy link
Owner

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants