{"id":29787938,"url":"https://github.com/jac18281828/parsm","last_synced_at":"2026-03-01T16:34:28.151Z","repository":{"id":301818117,"uuid":"997073932","full_name":"jac18281828/parsm","owner":"jac18281828","description":"Parsm is a structured data processor written in Rust","archived":false,"fork":false,"pushed_at":"2025-11-20T03:30:14.000Z","size":1048,"stargazers_count":10,"open_issues_count":11,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-20T05:25:50.173Z","etag":null,"topics":["awk","csv","dsl","filter","grep","json","parser","sed","text","toml","yaml"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/jac18281828.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-05T23:11:16.000Z","updated_at":"2025-11-20T03:30:17.000Z","dependencies_parsed_at":"2025-08-05T20:20:19.159Z","dependency_job_id":"17c6cfa7-88d2-4bb5-aff8-3e5a5006bf7d","html_url":"https://github.com/jac18281828/parsm","commit_stats":null,"previous_names":["jac18281828/parsm"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/jac18281828/parsm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jac18281828%2Fparsm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jac18281828%2Fparsm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jac18281828%2Fparsm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jac18281828%2Fparsm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jac18281828","download_url":"https://codeload.github.com/jac18281828/parsm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jac18281828%2Fparsm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29974747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T16:18:32.386Z","status":"ssl_error","status_checked_at":"2026-03-01T16:18:04.258Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["awk","csv","dsl","filter","grep","json","parser","sed","text","toml","yaml"],"created_at":"2025-07-27T20:11:12.764Z","updated_at":"2026-03-01T16:34:28.146Z","avatar_url":"https://github.com/jac18281828.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parsm - **Parse 'Em** - An 'everything' parser, Sedder, Awkker, Grokker, Grepper\n\nParsm is the powerful command-line tool that understands structured text better than `sed`, `awk`, `grep` or `grok`.\n\n\u003cimg src=\"eatcookie.jpg\" alt=\"Eat more cookie!\" width=\"25%\"\u003e\n\n## Overview\n\n`parsm` automatically detects and parses multiple data formats (**JSON**, **CSV**, **YAML**, **TOML**, **logfmt**, and plain text) and provides powerful filtering and templating capabilities through an intuitive syntax.\n\nBy default, parsm outputs the original input when a filter matches. For custom output formatting, use templates.\n\n## Installation\n\n### From crates.io\n\n```bash\ncargo install parsm\n```\n\n### From source\n\n```bash\ncargo install --path .\n```\n\nOr build from source:\n\n```bash\ngit clone \u003crepository-url\u003e\ncd parsm\ncargo build --release\n./target/release/parsm --examples\n```\n\n## Quick Start\n\n```bash\n# Basic usage\nparsm [FILTER] [TEMPLATE]\n\n# Examples\nparsm --examples\n\n# Extract a field\necho '{\"name\": \"Alice\"}' | parsm 'name'\n\n# Nested fields\necho '{\"user\": {\"email\": \"alice@example.com\"}}' | parsm 'user.email'\n\n# Filtering\necho '{\"age\": 30}' | parsm 'age \u003e 25'\n\n# Filter and format\necho '{\"name\": \"Alice\", \"age\": 30}' | parsm 'age \u003e 25 [${name} is ${age}]'\n```\n\n## Supported Formats\n\n- JSON\n- CSV\n- YAML\n- TOML\n- Logfmt\n- Plain Text\n\n## Syntax Reference\n\n### Filters\n\n- Comparison: `==`, `!=`, `\u003c`, `\u003c=`, `\u003e`, `\u003e=`\n- String ops: `*=` (contains), `^=` (starts with), `$=` (ends with), `~=` (regex match)\n- Boolean logic: `\u0026\u0026`, `||`, `!`\n- **Truthy** check: `field?`\n\nExamples:\n\n```bash\nname == \"Alice\" \u0026\u0026 age \u003e 25\nemail ~ \"@example.com\"\nuser.active?\n```\n\n### Templates\n\n- Variables: `[${name}]` or `$name`\n- Literal: `[name]`\n\nExample:\n\n```bash\nparsm 'age \u003e 25 [${name} is ${age}]'\n```\n\n### Field Selectors\n\n- Simple: `name`\n- Nested: `user.email`\n- Quoted (special chars): `'special-field'`\n- CSV/Text: `field_0`, `word_0`\n\n## Examples\n\n### JSON/YAML/TOML\n\n```bash\ncat Cargo.toml | parsm 'package.name'\necho '{\"user\": {\"email\": \"alice@example.com\"}}' | parsm 'user.email'\n```\n\n### CSV\n\n```bash\necho 'Alice,30,Engineer' | parsm 'field_1 \u003e \"25\" [${1} (${2})]'\n```\n\n### Logs\n\n```bash\necho 'level=error msg=\"DB error\"' | parsm 'level == \"error\" [${msg}]'\n```\n\n## CLI\n\n```bash\nparsm [OPTIONS] [FILTER] [TEMPLATE]\n\nArguments:\n  [FILTER]    Filter expression (optional)\n  [TEMPLATE]  Template expression for output formatting (optional)\n\nOptions:\n      --examples  Show usage examples\n      --json      Force JSON format detection\n      --yaml      Force YAML format detection\n      --csv       Force CSV format detection\n      --toml      Force TOML format detection\n      --logfmt    Force logfmt format detection\n      --text      Force plain text format detection\n  -h, --help      Print help\n  -V, --version   Print version\n```\n\n## Comparison with Other Tools\n\n| Feature          | parsm       | jq         | awk        | sed        |\n|------------------|-------------|------------|------------|------------|\n| Multi-format     | ✅ JSON, CSV, YAML, TOML, logfmt, text | JSON only  | Text       | Text       |\n| Auto-detection   | ✅ Automatic | ❌ Manual  | ❌ Manual  | ❌ Manual  |\n| Field extraction | ✅ Simple `name` syntax | ✅ `.name` syntax | Limited    | ❌ No       |\n| Simple syntax    | ✅ Low       | Medium     | Complex    | Medium     |\n\n## Development\n\n- Build: `cargo build`\n- Test: `cargo test`\n- Lint: `cargo fmt \u0026\u0026 cargo clippy`\n\n## Contributing\n\n1. Fork repository\n2. Create feature branch\n3. Write tests and code\n4. Run tests and lint checks\n5. Submit a pull request\n\n## Crates.io\n\n[crates.io](https://crates.io/crates/parsm)\n[docs.rs](https://docs.rs/parsm)\n\n## License\n\nSee [LICENSE](LICENSE).\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md).\n\n## Examples\n\n```bash\n# Basic filtering - outputs original input when filter matches\necho '{\"name\": \"Alice\", \"age\": 30}' | parsm 'age \u003e 25'\n# Output: {\"name\": \"Alice\", \"age\": 30}\n\n# Filtering with custom template\necho '{\"name\": \"Alice\", \"age\": 30}' | parsm 'age \u003e 25 [${name} is ${age}]'\n# Output: Alice is 30\n\n# Access original input in templates with ${0}\necho '{\"name\": \"Alice\", \"age\": 30}' | parsm '[Original: ${0}, Name: ${name}]'\n# Output: Original: {\"name\": \"Alice\", \"age\": 30}, Name: Alice\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjac18281828%2Fparsm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjac18281828%2Fparsm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjac18281828%2Fparsm/lists"}