Skip to content

adxsoft/logseq-query-builder-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Do not use tabs in commands

Note. as this code also supports the web site at https://adxsoft.github.io/logseqadvancedquerybuilder/ the use of tabs for indentation of the simple commands is not possible So for consistency between the online tool and the plugin you can use any number of leading spaces but the indentations must be consistent. I would suggest either two or four spaces is a good indentation value.

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)

  • 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
  • v0.7
    • First release to the logseq marketplace 23rd Feb 2023

About

A logseq plugin that generates advanced queries from simple commands

Resources

License

Stars

Watchers

Forks

Packages

No packages published