Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pjkaufman/obsidian-keyword-handler
An obsidian plugin for managing keywords in the the YAML frontmatter.
https://github.com/pjkaufman/obsidian-keyword-handler
jsdoc obsidian-plugin
Last synced: about 1 month ago
JSON representation
An obsidian plugin for managing keywords in the the YAML frontmatter.
- Host: GitHub
- URL: https://github.com/pjkaufman/obsidian-keyword-handler
- Owner: pjkaufman
- Created: 2024-03-23T20:31:48.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-08-21T11:50:54.000Z (3 months ago)
- Last Synced: 2024-08-21T13:16:05.628Z (3 months ago)
- Topics: jsdoc, obsidian-plugin
- Language: JavaScript
- Homepage:
- Size: 40 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Obsidian Keyword Handler
This plugin is a pretty basic keyword handler for my own personal needs to automate a task that I do manually to save me some time. If it is useful for you, feel free to go ahead and use it.
## How it works
The plugin adds a command on load called `Add Keywords to YAML`. This command is an editor command. It does the following:
- Gets the text for the current editor
- Gets the current `keywords` value from the frontmatter if there is one
- Gets all markdown links in the current file from the cached metadata
- Gets the file and then the file metadata cache to check for the `keyword` key's value in the referenced file
- If the keyword has any spaces in it, it has double quotes used to escape the value
- If the keyword does not already exist in the list, it gets added
- Adds the keywords to the frontmatter if the value has changed## How to use
- Clone this repo.
- Make sure your NodeJS is at least v16 (`node --version`).
- `npm i` or `yarn` to install dependencies.
- `npm run dev` to start compilation in watch mode.## Manually installing the plugin
- Copy over `main.js`, `styles.css`, `manifest.json` to your vault `VaultFolder/.obsidian/plugins/your-plugin-id/`.