Coder Social home page Coder Social logo

alexw00 / obsidian-note-linker Goto Github PK

View Code? Open in Web Editor NEW
183.0 6.0 9.0 286 KB

🔗 Automatically link your Obsidian notes.

License: MIT License

JavaScript 1.10% Rust 44.23% TypeScript 48.59% CSS 5.11% Shell 0.96%
obsidian obsidian-md obsidian-notes obsidian-plugin obsidian-vault obsidianmd react regex regular-expression rule-based

obsidian-note-linker's Introduction

🔗 Obsidian Note Linker

A plugin to automatically create new links between notes in Obsidian.

ezgif com-gif-maker(4)

🤨 How does it work?

The plugin checks each note in the vault for references to other note names (or their aliases). If a reference is found, it gets added to a list. This list is then displayed to the user, who can select which notes to link.

Disclaimer:

The current version has only been tested by myself, and a few beta testers. No bugs are currently known. However, I advise you to backup your vault before applying any changes using this plugin, since the plugin has not been tested by enough people.

⬇️ Installation

You can install this plugin by downloading it from the Obsidian Plugin store, or via this direct link.

👨‍💻 Development

The plugin is written in Rust (compiled to WebAssembly) and TypeScript. For more information please, check the dev docs.

📃 Credits

Created based on the Obsidian Rust Plugin template by trashhalo.

obsidian-note-linker's People

Contributors

alexw00 avatar uha010 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

obsidian-note-linker's Issues

Error in finalizing the linking of selected items

Describe the bug
While trying to link notes i can't finalize the linking

To Reproduce
Steps to reproduce the behavior:

  1. Go to note linker
  2. Click on scan vault
  3. Select multiple items to link
  4. Button remains "Link 1 note"

Expected behavior
Number is supposed to go up and all selected items should be linked

**Desktop

  • OS: Arch Linux
  • Kernel: 6.4.4-arch1-1
  • Package: extra/obsidian 1.3.5-1

Recommend Linking to Ungenerated Notes

Is your feature request related to a problem? Please describe.
The linker only recommends making links to notes that exists, but I have many notes with potential links to notes that don't exist yet.

Describe the solution you'd like
I would like a togglable option to allow the note linker to recommend links to pages that haven't been generated yet based on double-bracketed text in other notes.

Describe alternatives you've considered
I've tried going through all my notes and clicking the dummy links to generate empty notes, but this is very tedious.

Additional context
n/a

Hiding Suggestions that should stay unlinked

Is your feature request related to a problem? Please describe.
Words I don't want to link always show up.

Describe the solution you'd like
Making able to hide certain words/notes suggestions.

Allow links to implemented on a per note basis

I see a lot of potential in this tool, but it is difficult to get started when you already have a sizable library.

It would be helpful if I could implement links on a per file/note basis, as opposed to the entire vault.

[FR] Find all mentions of current note

We can already all links through all notes.

And search all links in the current note.

I'd like to make the other way around:
Find all mentions (ingoing links?) for the current note.

Scan Vault (existing)

flowchart TD
    subgraph Vault
        Titles["All Titles(links)"]
        Contents["All Content"]
    end
    GlobalSearch --> Contents
    GlobalSearch --> Titles

Scan Note (existing)

flowchart TD
    subgraph Vault
        Titles["All Titles(links)"]
        Contents["All Content"]
    end
    subgraph Current Note
        Title["Title (link)"]
        Content["This Content"]
    end
    Scan --> Content
    Scan --> Titles

New mode (request)

flowchart TD
    subgraph Vault
        Titles["All Titles(links)"]
        Contents["All Content"]
    end
    subgraph Current Note
        Title["Title (link)"]
        Content["This Content"]
    end
    Scan --> Contents
    Scan --> Title

Why?

Once I create a new concept, and I need to manually search all vault and link each individually.

Sometimes I create a new note for a concept. But I know I've already mentioned it (without a link).
So I need to scan the whole vault looking for the links and link them manually.

I would like to make this process with the same effortless experience as I have with this plugin.

created link will break markdown table

Describe the bug
if a link in table (ex: it create [[LinkFile|FileDescribe]]), it will break or mess table field (because '|' char)

To Reproduce

Expected behavior
should skip in table, or document say :

If you put links in tables, they will work, but if you use aliases, the pipe must be escaped with a '\' to prevent it being read as a table element.

Screenshots

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser [chrome]
  • Version [21H2]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

Make note linking case-insensitive

Is your feature request related to a problem? Please describe.
Imported notes that need linking all begin with capital letters.

Describe the solution you'd like
Plugin should link to notes without being case sensitive

Describe alternatives you've considered
Could rename all notes to be the required case but that would be an unimaginable amount of work.

Could only link 1 notes... bug.

Describe the bug
A clear and concise description of what the bug is.

note contain 3 name of notes, suggested 3 links, but only linked 1 at last.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

in a new note, type in 3 already existing notes' name.

scan note, shows 3 but could only link 1.

Expected behavior
A clear and concise description of what you expected to happen.

it showed 3, but after ticking, only show link 1.

Screenshots
If applicable, add screenshots to help explain your problem.

note:
image

plugin:

3 ticks checked, bottom shows only 1.

image

Desktop (please complete the following information):

  • OS: [e.g. iOS] win10, 64bit
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22] plugin v1.1.1; obsidian v 1.1. 9

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Make alias when letter case doesn't match

Is your feature request related to a problem? Please describe.
The capitalization within the text should keep identical after the scan and replacement.
Right now:
Let's say I have a note called "File To Be Linked". And I have a text in other file like this:
This is a sentence with the file to be linked.
After replacement becomes
This is a sentence with the [[File To Be Linked]].
This is a sentence with the File To Be Linked.

Describe the solution you'd like
Just make an alias when the letter case is different:
This is a sentence with the [[File To Be Linked|file to be linked]].

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
It is important in order to not have to write all of that manually.

[ISSUE] Plugin wants to link wrong and redundant stuff

image

As you can see, the plugin wants to link things inside links, and wants to link notes to themselves. "Conjunto" written in the "conjunto.md" note would link to itself, as an example. Block references also are being recognized and linked to their own notes (breaking the references).

Super slow for large vault

I have around 800 notes in my vault.
The preview loads, but when you click the check to add the link, it just freezes for a long time for each link. I'm running on a very high-end PC. Please add the option to select and add all links with one click, currently, it's gonna take forever to add links for large vaults. Also as some people have mentioned, maybe add integration with ChatGPT? Maybe build on top of the Smart-Link Plugin to do that, ChatGPT is very good at finding links, it just doesn't have the function to link them.

CJK word can not be linked

Describe the bug
CJK word without space can not be linked.

To Reproduce
Steps to reproduce the behavior:

  1. Create a note with a CJK word: 测试.md
  2. Create another note with this word, for example content 这是一段测试内容
  3. Scan Vault
  4. 测试 won't be linked auto.
  5. But if we add space between this CJK word with other content, for example 这是一段 测试 内容, it will be linked as expected.

slow Scanning notes

I have around 1300 notes in my vault.
The preview loads, but when you click the check to add the link, it just freezes for a long time for each link. I'm running on a very high-end PC. Please add the option to select and add all links with one click, currently, it's gonna take forever to add links for large vaults. Also as some people have mentioned, maybe add integration with ChatGPT? Maybe build on top of the Smart-Link Plugin to do that, ChatGPT is very good at finding links, it just doesn't have the function to link them.

[Fr] Ability to exclude certain keywords

Is your feature request related to a problem? Please describe.

  • To exclude the linking of certain keywords or phrases.

Describe the solution you'd like

  • option page with settings
  • exclude the linking of certain keywords or phrases.

Describe alternatives you've considered
Nothing

Additional context

  • maybe include a regex option?

Bigger Preview

I had the Problem when looking at the possible found links it is for some links almost impossible to read the context around the keyword. Especially if they are long words or with aliases.

Solution would be a Bigger Preview Window so more context could be shown and may use multiple lines in the preview to allow more text around the keyword.

Alternatively, the result of the scan could also be displayed in a tab. The keywords found could then be made clickable and then you could jump to the keyword it is about and then decide whether you want to replace it or with what you want to replace it with.

The first solution is in my opinion may useful as quick fix. The Second solution would be much greater but I understand the solution is much more work but maybe the overall better solution. There could be the Tab, like the backlinks, with the functions of searching in Notes and searching in Vault and the Result could then displayed below.

If you are interested in the second solution, I would offer to help with the implementation. Because I would like how this could improve this plugin.

it freezes on large vaults

my vault is over 2000 notes and when i use it, it first scans the whole vault which goes fine, then it take a really long time to process the result but then it just freezes and shows nothing

Ignore function for links

An ignore function to use on words that the user dont want to link would be useful, so that you dont have to scroll through all the words, that should not be linked to find words that shoul be linked.

Constant Autolinking

Is your feature request related to a problem? Please describe.
no problem, just greedy systems guy 🤩 this plugin is already amazing

Describe the solution you'd like
I would love to have an auto-link feature, which links keywords as I type along, same functionality, and different trigger, (without asking permission in popup)

Describe alternatives you've considered
🍪

Additional context
auto connecting automatically comes closest to an ACTUAL second brain. one that makes connections for you
I'm really excited about this idea

Ignore folders

Is your feature request related to a problem? Please describe.
I have a folder for all my sources, that I link to in my notes. Now, if the title of a work eg. includes Y2K, and I have a note named Y2K, I don't want to link the two.

Describe the solution you'd like
I'd like to be bale to ignore entire folders

Describe alternatives you've considered
Ignoring singular notes is a hassle.

generate invalid link within Embed notes

Describe the bug
plugin modify valid embed link, let it became invalid link

To Reproduce

  1. create a "Elastic Map Reduce (EMR).md", below is it's content :
---
aliases: [Elastic Map Reduce, EMR]
---
something text
  1. in a "test.md", paste below content :
    ![[Elastic Map Reduce (EMR)]]

  2. in test.md, execute command "Note Linker : Scan Note"

  3. the embed link in test.md will become :
    ![[Elastic Map Reduce ([[Elastic Map Reduce (EMR)|EMR]])]]
    that is a invalid link format

Expected behavior
plugin should ignore any embed link format, ![[...]]

Prevent tags from being converted to links

Is your feature request related to a problem? Please describe.
Tags are recognized as simple text, therefore they appear on the list of convertible text. If you select a tag to become a link, it looses its ability to serve as a tag. I do not like to always check if a possible link is a actually a tag.

Describe the solution you'd like
I would like to exclude tags from matching and not to appear on the list of Note Link Matches.

Making multiple word links at once/all at once

Clicking on each note to link takes quite long.

I'd love being able to shift click to select multiple, or just being able to select all at once.

One other way could be to link all with a specific word or all within a note.

Note Linker uses a lot of resources and crashes my pc.

Greetings, happy new year and thank you very much for the plugin. It is very useful for me.
I wanted to note that the plugin has a strange behavior in my Obsidian.
I have 400 or so notes and when the plugin displays the final listing of the notes, I go note by note seeing which ones I link and which ones I don't.
Every time I mark a note to link the resource usage goes way up (1,500 mb ram and 90% cpu) according to Windows 10 task manager). My pc gets slow for a few seconds. I have to wait about 30 to 40 seconds for the note to be marked for linking. That happens every time I click on a note to link it, so the whole process is very slow. Sometimes it even goes way up and Obsidian closes itself.
I have 16gb ram (2,400mhz) an intel i5 4460 processor, 320 Ghz. Notes and obsidian are installed on a NVMe samsung 970 evo plus. The rest of obsidian runs very smooth and only happens to me with this plugin.
Thanks again.

Application does not link all selected notes

Describe the bug
When I scan a note or the whole vault for potential links, the application correctly presents a list of suggestions, but will only link the pre-checked suggestions plus one more that I chose. I have to repeatedly check for links on a given note to find and link all of them.

To Reproduce
Steps to reproduce the behavior:

  1. Click the button for "Note Linker"
  2. Click "Scan Note"
  3. Review the list of suggestions, Check them all
  4. Notice that the button at the bottom only says "Link 1 notes" despite having selected more than one note to link to
  5. Click the "Link 1 notes" button
  6. See that the linker did, in fact, only linked one note (the most recent box checked).

Expected behavior
I expected the linker to create links to all the selected notes.

Desktop (please complete the following information):

  • OS: Windows 10
  • Version: v1.0.0

Smartphone (please complete the following information):

  • not tested on smartphone

Additional context
It seemed to be working correctly for the first few notes I linked then it stopped.

Exclude folder while scan vault

an option to exclude certain folder while scanning vault would be nice . (it takes so long ... i have around 4k notes.., it is scanning excalidraw files and templates which i dont want to link anyway)

English word not detected

Hi
The plugins doesn't work using english word but oly using italian words and I'm really confused about it. Do you know why this is appening?

Plurality, Exact Matches

Links not generated for exact matches
Disregards plurality when the text in the note is plural and the title of the note is plural

Buttons style and size

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Install Note Linker
  2. Buttons changes their size and style

Expected behavior
Buttons does not change size and style

Screenshots
If applicable, add screenshots to help explain your problem.
Normal buttons
image
After installation
image

Desktop (please complete the following information):

  • OS: Win 10
  • Version 1.1.1

RangeError occurred while linking notes.

Describe the bug
When use Scan Note I get this error

To Reproduce
Steps to reproduce the behavior:

  1. Scan Note
  2. Plugin start to retrieve notes
  3. Message: An error occurred while linking notes.
  4. Nothing happened with notes
  5. See error in the inspector
    RangeError: Maximum call stack size exceeded
    at String.replace ()
    at IgnoreRangeBuilder.addIgnoreRangesWithRegex (plugin:obisidian-note-linker:35249:39)
    at IgnoreRangeBuilder.addMdMetadata (plugin:obisidian-note-linker:35276:21)
    at Function.getIgnoreRangesFromCache (plugin:obisidian-note-linker:35290:14)
    at Function.eval (plugin:obisidian-note-linker:35321:52)
    at Generator.next ()
    at fulfilled (plugin:obisidian-note-linker:23:58)

5b. In another try I got this one:
Error: File system operation timed out.
at e.kill (app.js:1:1093712)
at s (app.js:1:702707)
at l (app.js:1:702813)
showError | @ | plugin:obisidian-note-linker:35693
  | Promise.catch (async) |   |  
  | eval | @ | plugin:obisidian-note-linker:35700
  | commitHookEffectListMount | @ | plugin:obisidian-note-linker:28110
  | commitPassiveMountOnFiber | @ | plugin:obisidian-note-linker:29891
  | commitPassiveMountEffects_complete | @ | plugin:obisidian-note-linker:29851
  | commitPassiveMountEffects_begin | @ | plugin:obisidian-note-linker:29838
  | commitPassiveMountEffects | @ | plugin:obisidian-note-linker:29826
  | flushPassiveEffectsImpl | @ | plugin:obisidian-note-linker:31987
  | flushPassiveEffects | @ | plugin:obisidian-note-linker:31932
  | eval | @ | plugin:obisidian-note-linker:31717
  | workLoop | @ | plugin:obisidian-note-linker:4278
  | flushWork | @ | plugin:obisidian-note-linker:4251
  | performWorkUntilDeadline | @ | plugin:obisidian-note-linker:4545
  | processImmediate | @ | node:internal/timers:464

Desktop (please complete the following information):

  • OS: Win10
  • Browser: Chrome
  • Version Obsidian 1.1.9

Autolinking option for whole vault

For a large Vault it is kind of tedious to sift through all obvious links. To link the not obvious ones is fun, but the rest is repetetive work. Your plugin comes in very handy doing that, but I would like to suggest an "autolink" option.
You can analyze your whole vault, and then have the option to link all found connections automatically, without having to scroll through the possible thousands of them first.

A bug that ocurred with the latest update let me reach out here finally: After analyzing my 2K+ Notes vault, the plugin just froze and became unresponsive.

Optional Filters and Parameter for the Link Suggestions

I use Obsidian for College and within the same Vaul i have all the different fields in top level groups. Usually i only want to find links within the same subject as topic names might be the same but mean different things within different courses or fields.

It would be greate if the displayed link suggestions offer the option to filter to only show links within the same top level group or even only in the current group

Alternativly it would be useful to switch the view around sometimes so instead of showing all the things within one note that could be linked elsewhere. I would like to see all the different instances that link to this note. That way i can also more easly controll the note i want linked if the found instance could fit multiples.

For Example the text: "Process" would be suggested for instances of the word " Process " in the group computer sience and " Buisness Process " in Economics. But i want to find all the instances of "Process" within computer sience and link to it. So i could switch the view and then filter only for instances within the same top group to quickly find this.

[Fr] Ability to exclude files based on various properties...

Is your feature request related to a problem? Please describe.

  • Ability to exclude files or folders of files
  • Not to include drafts or certain notes or locations, templates, scripts and configuration files.

Describe the solution you'd like
Ability to exclude files based on various properties e.g.

  • option page with settings
  • folder / folder name regex
  • filename regex

Describe alternatives you've considered
I don't think there is any other solution that I am aware of.

Additional context
could also include

  • title regex
  • tag
  • metadata

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.