{"id":29724566,"url":"https://github.com/mastersign/mdquery","last_synced_at":"2025-08-15T00:40:59.432Z","repository":{"id":45043872,"uuid":"46934943","full_name":"mastersign/mdquery","owner":"mastersign","description":"Creates tables from hierarchical structured data in Markdown documents.","archived":false,"fork":false,"pushed_at":"2024-06-16T21:41:17.000Z","size":83,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T10:44:13.514Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mastersign.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-26T15:42:31.000Z","updated_at":"2022-12-05T07:38:06.000Z","dependencies_parsed_at":"2023-01-24T21:30:49.081Z","dependency_job_id":null,"html_url":"https://github.com/mastersign/mdquery","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/mastersign/mdquery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastersign%2Fmdquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastersign%2Fmdquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastersign%2Fmdquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastersign%2Fmdquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mastersign","download_url":"https://codeload.github.com/mastersign/mdquery/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastersign%2Fmdquery/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270505993,"owners_count":24596506,"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-08-14T02:00:10.309Z","response_time":75,"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-07-24T21:21:52.327Z","updated_at":"2025-08-15T00:40:59.402Z","avatar_url":"https://github.com/mastersign.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MdQuery\n\n[![npm package][npm-img]][npm-url]\n[![dependency status][libraries-img]][libraries-url]\n[![build status][travis-img]][travis-url]\n\n\u003e creating tables from hierarchic structured data in Markdown documents\n\n## Application\n\n_MdQuery_ allows to generate automatic [tables][mdtables] and lists in a [Markdown] document.\n\n_MdQuery_ extracts a hierarchic datastructure from a [Markdown] document (with [_MdData_][mddata]) and replaces data queries in HTML comments by a table or\na list, containing the result of the query.\n\nTake a look at the [test case for tables](test/data/data-table-complex.md) and\nthe [test case for lists](test/data/data-list-complex.md) to get an impression, how it works.\n\nSince version 0.2.4, `filter` and `sort-by` statements are supported for lists and tables.\nTake a look at the [test case for filtered lists](test/data/data-list-filter.md) and\n[test case for sorted lists](test/data/data-list-sortby.md).\n\n_MdQuery_ can be used as a function or as a [Gulp] transformation.\n\n## Interface\n\n_MdQuery_ makes use of [GulpText _simple_][gulp-text-simple] to provide the API.\nTherefore, it currently supports three ways of usage.\n\n1. Use the `readFileSync(path)` function, to get the processed\n   content of a Markdown file.\n2. Specify a Markdown string, to get the processed string.\n3. Give no arguments, to get a gulp transformation.\n\n**Hint:** Please note, the main entry in the API of _MdQuery_ is the `transform` attribute of the module.\n\n### Transform a file directly\n\nUse the function `readFileSync(path)` and specify a path to the Markdown file.\n\n``` js\nvar mdquery = require('mdquery').transform;\nvar result = mdquery.readFileSync('project_a/docs/index.md');\n```\n\n### Transform a string\n\nGive a string to process as [Markdown] text.\n\n``` js\nvar mdquery = require('mdquery').transform;\nvar result = mdquery('# Introduction ...');\n```\n\n### Create a Gulp transformation\n\nCall without arguments to create a [Gulp] transformation.\n\n``` js\nvar mdquery = require('mdquery').transform;\nvar gulp = require('gulp');\n\ngulp.task('preprocess-markdown', function() {\n    return gulp.src('docs/*.md')\n        .pipe(mdquery())\n        .pipe(gulp.dest('out'));\n});\n```\n\n## License\n\n_MdQuery_ is published under the MIT license.\n\n[npm-url]: https://www.npmjs.com/package/mdquery\n[npm-img]: https://img.shields.io/npm/v/mdquery.svg\n[libraries-url]: https://libraries.io/npm/mdquery\n[libraries-img]: https://img.shields.io/librariesio/github/mastersign/mdquery.svg\n[travis-img]: https://img.shields.io/travis/mastersign/mdquery/master.svg\n[travis-url]: https://travis-ci.org/mastersign/mdquery\n[Gulp]: http://gulpjs.com\n[Markdown]: https://daringfireball.net/projects/markdown/\n[mdtables]: https://michelf.ca/projects/php-markdown/extra/#table\n[gulp-text-simple]: https://www.npmjs.com/package/gulp-text-simple\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastersign%2Fmdquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmastersign%2Fmdquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastersign%2Fmdquery/lists"}