{"id":13783700,"url":"https://adxsoft.github.io/logseqadvancedquerybuilder/","last_synced_at":"2025-05-11T19:31:19.488Z","repository":{"id":61050538,"uuid":"547129296","full_name":"adxsoft/logseqadvancedquerybuilder","owner":"adxsoft","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-21T05:36:14.000Z","size":314,"stargazers_count":37,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-17T20:47:42.915Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adxsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-07T07:18:52.000Z","updated_at":"2024-08-03T19:08:46.000Z","dependencies_parsed_at":"2023-12-05T12:44:12.085Z","dependency_job_id":null,"html_url":"https://github.com/adxsoft/logseqadvancedquerybuilder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adxsoft%2Flogseqadvancedquerybuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adxsoft%2Flogseqadvancedquerybuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adxsoft%2Flogseqadvancedquerybuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adxsoft%2Flogseqadvancedquerybuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adxsoft","download_url":"https://codeload.github.com/adxsoft/logseqadvancedquerybuilder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253621041,"owners_count":21937468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T19:00:28.765Z","updated_at":"2025-05-11T19:31:18.820Z","avatar_url":"https://github.com/adxsoft.png","language":"JavaScript","readme":"# logseqadvancedquerybuilder\n\nAn Experimental online tool to help Logseq Users build advanced queries from \u003cb\u003e\u003ci\u003esimple\u003c/i\u003e\u003c/b\u003e commands.\n\n**News Flash 3rd March 2023**\nLogseq plugin (**logseq-query-builder-plugin**) now officially in the Logseq Marketplace\n\n**News Flash 30th Dec 2022**\n**Logseq plugin with same functionality now developed.** You can get it [here](https://github.com/adxsoft/logseq-query-builder-plugin) and see it in action [here](https://youtu.be/EA2jLSQ_WMA)\n\n**Updated 14th Dec 2022 to v0.4 see Releases section below**\n**SITE HAS BEEN COMPLETELY REWRITTEN IN JAVASCRIPT FOR STABILITY**\n\nYou can run this tool online at https://adxsoft.github.io/logseqadvancedquerybuilder/\n\nTo include this tool in a logseq page use this line\n```html\n\u003ciframe src=\"https://adxsoft.github.io/logseqadvancedquerybuilder/\" allow=\"clipboard-read; clipboard-write\" style=\"width: 100%; height: 1000px\"\u003e\u003c/iframe\u003e\n```\n\nSee the FAQ for instructions and examples of how to use the tool\n\nAlso see https://github.com/adxsoft/buildlogseqtestgraph for building a test graph to checkout the advanced queries you build with this tool\n\n## Technical information\nThe tool is built in javascript. \n\nTo test locally set the mode variable to 'local'. Once this is set you can use Jest Testing Library with the included _index.tests.js_ file.\n\nTo deploy to the web set the mode to 'website'\n\n2. To input a set of simple commands to generate an advanced query, add the following code at the end of \u003ci\u003elogseqquerybuilder.py\u003c/i\u003e\n\n```python\ntestQueryBuild(\"\"\"yourcommands\"\"\")\n```\n\nWhere yourcommands could be for example\n\n```python\ntestQueryBuild(\"\"\"title: blocktags and pages command combined - test 3\n- pages\n    - test*\n    - *2\n    - not *age1\n- blocktags\n    - tag1\n    - not tag2\n    - tag3\n    - not tag4\n\"\"\")\n```\nwhich will print the following advanced query that you can copy and paste (using Cmd/Ctrl Shift V) directly into Logseq\n\n```clojure\n#+BEGIN_QUERY\n{\n:title [:b \"blocktags and pages command combined - test 3\"]\n:query [:find (pull ?block [*])\n:where\n[?block :block/content ?blockcontent]\n[?block :block/page ?page]\n[?page :block/name ?pagename]\n( or \n[(clojure.string/starts-with? ?pagename \"test\")]\n[(clojure.string/ends-with? ?pagename \"2\")]\n)\n(not [(clojure.string/ends-with? ?pagename \"age1\")])\n( or \n(page-ref ?block \"tag1\")\n(page-ref ?block \"tag3\")\n)\n(not (page-ref ?block \"tag2\"))\n(not (page-ref ?block \"tag4\"))\n]\n}\n#+END_QUERY\n```\n3. To run the unit tests you must do step 1 above and then run *test.py*\n\n# Releases\n_Version 0.1_\n- Original release Oct 2022\n\n\n_Version 0.2_\n- clarify pages retrieval vs blocks retrieval in FAQ, Simple Commands\n- Added 'and' and 'or' keywords in arguments for a command, For example can now say\n```\n- tagA\n- or tagA\n```\nand also\n```\n- property category, \"fiction\"\n- and property category, \"western\"\n```\n- Added a logseq test graph download button  to help user test advanced queries\n- Force user to choose either pages or block retrieval, Default to block retrieval\n- improved error messaging\n- improved descriptions for the generated advanced query lines\n- bug fixes\n\n_Version 0.3_ Dec 8th 2022\n- added the \u003ci\u003epagelinks\u003c/i\u003e command which will select blocks that have links to specific pages or journals\n\nExample: To select blocks referring to page1 OR page 2\n```\n- blocks\n  - *\n- pagelinks\n  - page1\n  - page2\n```\nExample: To select blocks referring to page1 AND page 2\n```\n- blocks\n  - *\n- pagelinks\n  - page1\n  - and page2\n```\nExample: To select blocks referring to Xmas day journal\n(assumes your date format is the default format)\n```\n- blocks\n  - *\n- pagelinks\n  - Dec 25th, 2022\n```\nIf you use a different date format use that in the journal reference\n\n_Version 0.4_ Dec 14th 2022\nRedeveloped in Javascript for speed and stability\n- pyscript is still in alpha and early days so changes are happening all the time\n- javascript is stable\n- code base has been changed so that the core functions can operate in one of three ways \n(mode variable controls which operation is chosen _website_,_local_,_logseq-plugin_\n  - as this website, \n  - locally for testing\n  - as a logseq plugin (distributed to a separate repository)\n","funding_links":[],"categories":["💡 Workflows and Innovations"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/adxsoft.github.io%2Flogseqadvancedquerybuilder%2F","html_url":"https://awesome.ecosyste.ms/projects/adxsoft.github.io%2Flogseqadvancedquerybuilder%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/adxsoft.github.io%2Flogseqadvancedquerybuilder%2F/lists"}