No3371/obsidian-regex-pipeline

Can the index folder changed to somewhere else?

AndyLiu9 opened this issue · 6 comments

Can the index folder(.obsidian/regex-rulesets) be changed to somewhere else such as[.obsidian/plugins/obsidian-regex-pipeline]?

Will add an option for this, but not sure when.

At the moment, if you really need it right now, you can go into the plugin folder and modify line 38, 39:

        this.pathToRulesets = this.app.vault.configDir + "/regex-rulesets";
        this.pathToIndex = this.app.vault.configDir + "/regex-rulesets/index.txt";

the this.app.vault.configDir is ".obsidian".
The modification will be overwritten when you update the plugin.

OK thanks for your reply. So that if I want to change the path to outside /.obsidian, I can use “this.app.vault” to represent the root path of my vault, is this true?

No, only this.app.vault.configDir is a string(text), this.app.vault is a complex stuff contains it, not a string. If you are interested, you can checkout how Javascript (or other common programming language) works.

I'm not sure, it seems not possible to access path outside .obsidian with small change, it's also not encouraged by Obsidian.

I have tried and I just delete the “ this.app.vault.configDir” part and it works for me~

Oh, so you meant the vault folder itself? That's ok for sure, I thought you want somewhere else.

Haha true, what I want is to change the path from “Vault/.obsidian/regex-rulesets” to “Vault/regex-rulesets” because files in “Vault/.obsidian/regex-rulesets” won’t be synced by Obsidian Sync. After the change I can get all my regex synced across my devices with Obsidian Sync service. Anyway, I really appreciate your plug-in and many thanks for your patience in offering me help!