{"id":18888658,"url":"https://github.com/beevelop/retter","last_synced_at":"2026-02-24T21:30:19.036Z","repository":{"id":138472713,"uuid":"88263135","full_name":"beevelop/retter","owner":"beevelop","description":"Allows you to extract values (to JSON) out of a file or stdin based on a mustach template definition.","archived":false,"fork":false,"pushed_at":"2017-04-14T12:22:42.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-31T05:41:54.685Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beevelop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-04-14T11:44:34.000Z","updated_at":"2017-04-14T12:03:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"c43e7f73-3758-44cc-869f-dff292117cd1","html_url":"https://github.com/beevelop/retter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beevelop%2Fretter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beevelop%2Fretter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beevelop%2Fretter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beevelop%2Fretter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beevelop","download_url":"https://codeload.github.com/beevelop/retter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239859565,"owners_count":19708865,"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-11-08T07:45:26.384Z","updated_at":"2026-02-24T21:30:19.000Z","avatar_url":"https://github.com/beevelop.png","language":"JavaScript","readme":"# retter – **RE**verse **T**empla**T**ing **E**xtracto**R**\n\n\u003e Allows you to extract values (to JSON) out of a file or stdin based on a mustach template definition.\n\n## Quick start\n1. Install retter: `npm i -g retter`\n2. Define template ([mustache Syntax](https://mustache.github.io/))\n3. Get your content (save as file or prepare to pipe into `retter`)\n4. Run retter\n  - Stdin: `cat content.file | retter template.mustache`\n  - File: `retter template.mustache content.txt`\n\n## Use case\n`retter` is supposed to save you some headache when parsing command line output or files. Using `awk`, `sed`, `grep` and all their other friends is suitable for nerve-racking hours of trial and error – if you want to get this stuff done fast use `retter`.\nTypical use case: Some awesome command line tool generates the very same (but different) output every time (like every freakin' CI automation does). Now you want to get the data / values extracted from the output for further processing / analysis / whatever.\n\n## Further processing\nYou can use [jq](https://stedolan.github.io/jq/), a lightweight and flexible command-line JSON processor, to process the results even further.\n```sh\nretter examples/template examples/content | jq '[.issues]'\n```\n\n## Example (parsing a Sonarlint output)\n#### Template\n```\n-------------  SonarLint Report  -------------\n\n          {{issues}} issues ({{files}} files analyzed)\n\n          {{blocker}} blocker\n          {{critical}} critical\n          {{major}} major\n          {{minor}} minor\n          {{info}} info\n\n-------------------------------------------\n```\n\n#### Content\n```\n-------------  SonarLint Report  -------------\n\n          11280 issues (3577 files analyzed)\n\n          131 blocker\n          1170 critical\n          5984 major\n          3951 minor\n          44 info\n\n-------------------------------------------\n```\n\n#### Command\n```sh\n$ retter examples/template examples/content\n{ issues: '11280',\n  files: '3577',\n  blocker: '131',\n  critical: '1170',\n  major: '5984',\n  minor: '3951',\n  info: '44' }\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeevelop%2Fretter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeevelop%2Fretter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeevelop%2Fretter/lists"}