{"id":25873091,"url":"https://github.com/codeinwp/otter-query-engine","last_synced_at":"2025-10-04T12:41:47.332Z","repository":{"id":124333246,"uuid":"467889432","full_name":"Codeinwp/otter-query-engine","owner":"Codeinwp","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-27T10:01:54.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T08:38:22.749Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/Codeinwp.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-03-09T10:58:01.000Z","updated_at":"2022-03-11T11:27:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e653384-decb-4882-adeb-cd01fed73ad2","html_url":"https://github.com/Codeinwp/otter-query-engine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Codeinwp/otter-query-engine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codeinwp%2Fotter-query-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codeinwp%2Fotter-query-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codeinwp%2Fotter-query-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codeinwp%2Fotter-query-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Codeinwp","download_url":"https://codeload.github.com/Codeinwp/otter-query-engine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codeinwp%2Fotter-query-engine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278315190,"owners_count":25966774,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-03-02T08:29:40.022Z","updated_at":"2025-10-04T12:41:47.327Z","avatar_url":"https://github.com/Codeinwp.png","language":"TypeScript","readme":"# Otter Tool Testing - Query Engine\n\u003e It allows you to import blocks exported in JSON file from GitHub.\n\n![image](https://user-images.githubusercontent.com/17597852/163563409-09250881-d576-4b0c-bfd2-6e221a0b467c.png)\n\n\n## Getting Started\n\n### Commands\n##### Run - run the query from the input field\n##### Quick - run the query directly from the clipboard. It will need permission from the browser.\n\n[Optional] Fork [this repo](https://github.com/Codeinwp/otter-blocks-qa-templates). Make a folder, and add some exported blocks in it.\n\n## Load the Query Engine in your browser.\nMethods:\n1. Load the `dist/index.js` as js file in the page. See `index.html`\n```html\n \u003cscript type=\"module\" defer src=\"https://cdn.jsdelivr.net/gh/Codeinwp/otter-query-engine@master/dist/index.js\"\u003e\u003c/script\u003e\n```\n2. Inject the script via js and CDN link. *You also use [Snippets](https://developer.chrome.com/docs/devtools/javascript/snippets/).*\n```javascript\nwindow.addEventListener('load', (event) =\u003e {\n    let count = 0;\n    const interv = setInterval( () =\u003e {\n        count ++;\n        const settingsBar = document.querySelector(\"#editor div.edit-post-header__settings\")\n        if( settingsBar ) {\n            var s = document.createElement('script');\n            s.defer = true;\n            s.type = \"module\";\n            s.src = \"https://cdn.jsdelivr.net/gh/Codeinwp/otter-query-engine@master/dist/index.js\";\n            (document.head||document.documentElement).appendChild(s);\n            clearInterval(interv);\n        }\n        if(count \u003e 6) {\n            clearInterval(interv);\n        }\n    }, 500);\n});\n```\n\n**You can also use the Chrome extension. [Link](https://github.com/Codeinwp/otter-blocks-qa-templates)**\n\n## Usage\n\nInsert all the files from the `blocks` folder.\n```javascript\nnew QueryQA().select('blocks').run()\n```\n\nInsert all the files from the `blocks` folder in Robert's repo.\n```javascript\nnew QueryQA().select('blocks').from('robert').run()\n```\n\nInsert all the files from the `blocks` folder in Robert's repo and specify the repo **(RAW content only)**.\n```javascript\nnew QueryQA().select('blocks').from('robert', 'https://raw.githubusercontent.com/Soare-Robert-Daniel/otter-blocks-qa-templates/main/').run()\n```\n\nInsert all the files from the `blocks` folder which have the names `summer-breeze` and `countdown`.\n```javascript\nnew QueryQA().select('blocks').where({ names: ['summer-breeze', 'countdown'] }).run()\n```\n\nInsert all the files from the `blocks` folder which have ONLY the `flip` block.\n```javascript\nnew QueryQA().select('blocks').where({ has: { blocks: ['flip'] }}).run()\n```\n\n**[Short Syntax]** Insert all the files from the `blocks` folder which have ONLY the `flip` block.\n```javascript\nnew QueryQA().select('blocks').where({ has: ['flip'] }).run()\n```\n\nInsert all the files from the `blocks` folder which CONTAINS the `flip` block.\n```javascript\nnew QueryQA().select('blocks').where({ has: ['flip'], mode: 'all' }).run()\n```\n\nInsert all the files from the `blocks` folder which have ONLY the `count` plugin.\n```javascript\nnew QueryQA().select('blocks').where({ has: { plugins: ['count'] } }).run()\n```\n\n**[Short Syntax]** Insert all the files from the `blocks` folder which have ONLY the `count` plugin.\n```javascript\nnew QueryQA().select('blocks').where({ has: ['count'] }).run()\n```\n\nInsert all the files from the `blocks` folder which CONTAINS the `count` plugin.\n```javascript\nnew QueryQA().select('blocks').where({ has: { plugins: ['count'] }, mode: 'all' }).run()\n```\n\nInsert the first 5 files from the `blocks` folder.\n```javascript\nnew QueryQA().select('blocks').take(5).run()\n```\n\nShuffle the files from the `blocks` folder then insert the first 5 files .\n```javascript\nnew QueryQA().select('blocks').take(5, {shuffle: true}).run()\n```\n\nShuffle the files which CONTAINS the `flip` block from the `blocks` folder then insert the first file .\n```javascript\nnew QueryQA().select('blocks').where({ has: ['flip'], mode: 'all' }).take(5, {shuffle: true}).run()\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeinwp%2Fotter-query-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeinwp%2Fotter-query-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeinwp%2Fotter-query-engine/lists"}