question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Integration with Dice Roller - possible to execute query via plugin api?

See original GitHub issue

Describe 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:closed
  • Created 2 years ago
  • Reactions:11
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

19reactions
mgmeyerscommented, Oct 12, 2021

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:

LIST FROM #projects
WHERE !completed AND file.ctime <= date(today) - dur(1 month)
12reactions
blacksmithgucommented, Aug 1, 2021

Ah, I see. Will add the ability to parse & execute queries to the plugin API.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found