mirror of
https://github.com/mara-li/obsidian-my-thesaurus.git
synced 2026-07-22 05:38:22 +00:00
2.8 KiB
2.8 KiB
My Thesaurus
Automagically adds tags based on a thesaurus CSV.
⚙️ Settings
- Separator: The separator used in the CSV file. Supported separators are
,,;,|, andtabulation. - Column title: The title of the column in the CSV file that contains the tags:
- Term: The column contains the tags that must be set by the plugin.
- Synonyms: The column contains the synonyms that must be recognized by the plugin.
- Thesaurus: Path to the file containing the thesaurus. The file must be a CSV file and must be in your vault. You can click on the
savebutton to ensure the file is valid (the path is correct, the file exists, and it's well-formed).
Warning
If, for some reason, the file is moved, you need to update the path in the settings! It won't be updated automatically.
- Included paths: Files in these folders will be included when using the command
My Thesaurus: Parse all files. You can separate the paths with a comma, semicolon, or newline. Moreover, regex is supported.
Tip
You can include all the files in your vault by using
.*as the path!
📝 Usage
The plugin has two commands:
- My Thesaurus: Parse all files: This command will parse all the files in the included paths and add the tags based on the thesaurus. At the end, a message will be displayed with the results, including:
- Errors: The files that encountered an error and the specific error message.
- Skipped files: The files that have been skipped because no synonym was found.
- Success: The files that have been successfully parsed, along with the tags that have been added.
- My Thesaurus: Parse current file: This command will parse the current file and add the tags based on the thesaurus.
📥 Installation
- From Obsidian's community plugins
- Using BRAT with
https://github.com/Mara-Li/ - From the release page:
- Download the latest release
- Unzip
my-thesaurus.zipin.obsidian/plugins/path - In Obsidian settings, reload the plugin
- Enable the plugin
🎼 Languages
- English
- French
To add a translation:
- Fork the repository
- Add the translation in the
src/i18n/localesfolder with the name of the language (ex:fr.json).- You can get your locale language from Obsidian using obsidian translation or using the commands (in templater for example) :
<% tp.obsidian.moment.locale() %> - Copy the content of the
en.jsonfile in the new file - Translate the content
- You can get your locale language from Obsidian using obsidian translation or using the commands (in templater for example) :
- Edit
i18n/i18next.ts:- Add
import * as <lang> from "./locales/<lang>.json"; - Edit the
ressourcepart with adding :<lang> : {translation: <lang>}
- Add