Obsidian Helper #1513
Ambushfall
started this conversation in
Share
Obsidian Helper
#1513
Replies: 2 comments 2 replies
-
Hi, thanks for sharing. Would it be possible for you to elaborate on how to use this? It looks like it would prompt me for a vault path. But I get an error. I tried creating The API docs for Thus I am looking for a little guidance on how you are using db. Thanks. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Ps, you dont have to create the file yourself, this is how it works generally // const { data, write } = await db("filename")
// on calling await write(); it will create the file under ur kenvs db
// you can set defaults too
/***
* This will basically create db/keyvaluestore.json
* With the following content
* { "someKeyValueFromJson" : { "otherKey": "string"}}
*
*/
const { someKeyValueFromJson, write } = await db("keyvaluestore",
{
// this is the key we decouple in the const
someKeyValueFromJson : {
otherKey: "string"
// ... any other default value
}
});
// to update otherkey, we would do this
// not a 100% sure, but it should work similar to a key value store
someKeyValueFromJson.otherKey = "smthn";
await write();
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Open obsidian-helper in Script Kit
Beta Was this translation helpful? Give feedback.
All reactions