Obsidian Linker is a tool designed to help you manage and link your notes in Obsidian. It provides various features to enhance your note-taking experience.
- Automatic linking of notes
- Uses Wikilink format
- Skip links in metadata
- Skip links in codeblocks, inline code
- Scan Files: The tool scans all the markdown files in your Obsidian vault.
- Extract Filenames: It extracts the filenames from the scanned files.
- Match Filenames: It matches the filenames with the content in other files, ignoring the case.
- Insert Links: When a match is found, it inserts a Wikilink in the content, preserving the original case of the filename in the link.
- Skip Metadata and Code: The tool skips adding links in metadata sections and code blocks to avoid unwanted linking.
- Simple Linking: If a file named
Object-Oriented Programming.mdexists and another file mentions "object-oriented programming", the tool will link it as[[object-oriented programming]]. - Preserve Case: If the mention is "Object-Oriented Programming", the link will be
[[Object-Oriented Programming]]. - No Links in Code Blocks: Mentions inside code blocks are ignored.
- No Links in Metadata: Mentions inside metadata sections are ignored.
- Multiple Links: If multiple files are mentioned, each will be linked appropriately.
- Partial Matches: If a file named
Object.mdexists, mentions of "object" will be linked as[[object]], but "objects" will not be linked. - Complex Linking: If files named
Object-Oriented Programming.md,Functional Programming.md, andObject.mdexist, and another file mentions "object-oriented programming", "functional programming", and "object", each will be linked as[[object-oriented programming]],[[functional programming]], and[[object]]respectively. Note "object" will not be added inside "object-oriented programming".
To install Obsidian Linker, follow these steps:
- Clone the repository:
git clone https://github.com/your-username/obsidian-linker.git
- Navigate to the project directory:
cd obsidian-linker - Install the required dependencies:
pip install -r requirements.txt
To use Obsidian Linker, run the following command:
python obsidianlinker.py /path/to/vault/Make sure to back up your vault before using this tool, as it can make irreversible edits.
To run tests for Obsidian Linker, use the following command:
pytestThis will execute all the tests and provide you with a summary of the results. Make sure you have all the necessary dependencies installed before running the tests.
- Add support for alias links
- Multithreading
- Write additional tests for edge cases
- Make it into a plugin for Obsidian
We welcome contributions to Obsidian Linker! If you have an idea for a new feature or have found a bug, please open an issue or submit a pull request.
- Fork the repository.
- Create a new branch for your feature or bugfix:
git checkout -b feature-name
- Make your changes and commit them:
git commit -m "Description of your changes" - Push your changes to your fork:
git push origin feature-name
- Open a pull request on the main repository.
This project is licensed under the MIT License. See the LICENSE file for more details. © Arshad Mehmood


