Integration with Dice Roller - possible to execute query via plugin api?
See original GitHub issueDescribe the solution you’d like I have had several people reach out to me about using the Dice Roller plugin on tables generated by Dataview. Unfortunately, I believe this would only be possible if there was a way to actually execute the query in the code block, which there doesn’t appear to be a way to do currently.
Additional context I cloned the repository and added the following two methods to the plugin API and it gave me what I would need to return random results from a table generated by Dataview:
public parseQuery(source: string) {
const maybeQuery = tryOrPropogate(() => parseQuery(source));
if (!maybeQuery.successful) {
throw new Error("Dataview: " + maybeQuery.error);
}
return maybeQuery.value;
}
public executeTable(query: Query, origin: string) {
return executeTable(query, this.index, origin, this.settings);
}
Let me know your thoughts.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:11
- Comments:11 (5 by maintainers)
Top Results From Across the Web
obsidian-dice-roller/README.md at master - GitHub
Dice Roller. Inline dice rolling for Obsidian.md. Usage. Simply place a code block with your formula in your note (such as `dice: XdX`...
Read more >Dice Roller Plugin - Mattermost
Overview. Dice Roller plugin was released to the Marketplace and brings some randomness to your team's decision making toolset. When there's no clear...
Read more >Create an interactive Dice Roller app - Android Developers
In this codelab, you build an Android app that rolls a dice and shows the result on screen. ... Familiar with using TextViews...
Read more >Getting Started with GraphQL: It's pretty easy! - Level Up Coding
You can gradually get more complex with your queries as well. I recommend this guide on building a dice rolling API from the...
Read more >Configuring Kubernetes integration - Backstage.io
A name to represent this cluster, this must be unique within the clusters array. Users will see this value in the Software Catalog...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Adding another vote for this. An oft requested feature of the Kanban plugin is to populate lanes using dataview queries. I can technically accomplish this now with the JavaScript API, but it’s not quite as user friendly as the DQL.
It would be great to be able to generate a list of pages from a query like:
Ah, I see. Will add the ability to parse & execute queries to the plugin API.