xyhp915 / logseq-query-builder-plugin

A logseq plugin that generates advanced queries from simple commands

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logseq Query Builder Plugin

  • builds advanced logseq queries from Simple Commands contained in a logseq code block.
  • Choosing Advanced Query Builder in the code blocks menu (right click on block's bullet)
    • will generate an advanced query in a new child block
    • You can alter the code block and generate another query which will add another new child block.
    • In this way you can experiment with generating multiple advanced queries.

Detailed Documentation

Can be found here

Installation

Preparation

  • Click the 3 dots in the righthand corner and go to Settings.
  • Go to Advanced and enable Plug-in system.
  • Restart the application.
  • Click 3 dots and go to Plugins (or Esc t p).

Install plugin from the Marketplace (recommended)

  • only when plugin is approved and placed in the marketplace
    • as at Dec 29th 2022 not yet approved for the market place
  • Click the Marketplace button and then click Plugins.
  • Find the plugin and click Install.

Install plugin manually

  • Click the green Code button above and download the zip
  • Unzip it into a folder
  • Click Load unpacked plugin, and select the folder where the plugin code was unzipped

Technical Information

  • Originally the online tool was developed using pyscript and redeveloped in javascript.
  • To ensure consistency between the online tool and the plugin the javascript code is shared.
    • A variable called mode is set to logseq-plugin, website or local.
    • All modes use index.js as common code
    • mode logseq-plugin * will operate as a logseq plugin * has its own index.html and package.json file * files are contained in the plugin-dist folder
    • mode website * will operate as the online tool * has its own index.html and package.json file * files are contained in the website-dist folder
    • mode local * will operate locally * has its own index.html and package.json file * files are contained in the main folder * has a index.test.js file which is used for unit testing with the Jest Testing Library - the index.test.js file is contained in the repository for the online tool at

Releases

  • v0.1
    • Original release - Dec 30th 2022

About

A logseq plugin that generates advanced queries from simple commands

License:MIT License


Languages

Language:JavaScript 94.9%Language:CSS 4.5%Language:HTML 0.6%