{"id":19056808,"url":"https://github.com/tremor-rs/dissect","last_synced_at":"2025-08-25T23:17:29.626Z","repository":{"id":38272187,"uuid":"232577615","full_name":"tremor-rs/dissect","owner":"tremor-rs","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-18T04:52:27.000Z","size":124,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-24T04:51:39.493Z","etag":null,"topics":["dissect-parser","parser","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/tremor-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-08T14:08:56.000Z","updated_at":"2023-07-27T12:06:10.000Z","dependencies_parsed_at":"2024-01-11T06:55:13.822Z","dependency_job_id":"79651bf1-b444-41f4-b8d1-a3e8847a7f20","html_url":"https://github.com/tremor-rs/dissect","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tremor-rs%2Fdissect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tremor-rs%2Fdissect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tremor-rs%2Fdissect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tremor-rs%2Fdissect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tremor-rs","download_url":"https://codeload.github.com/tremor-rs/dissect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250566446,"owners_count":21451230,"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":["dissect-parser","parser","rust"],"created_at":"2024-11-08T23:51:44.800Z","updated_at":"2025-04-24T04:51:53.619Z","avatar_url":"https://github.com/tremor-rs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dissect \u0026emsp; [![Latest Version]][crates.io] ![Build Status] ![Quality Checks] ![License Checks] ![Security Checks] [![Code Coverage]][coveralls.io]\n\n[Build Status]: https://github.com/wayfair-tremor/dissect/workflows/Tests/badge.svg\n[Quality Checks]: https://github.com/wayfair-tremor/dissect/workflows/Checks/badge.svg\n[License Checks]: https://github.com/wayfair-tremor/dissect/workflows/License%20audit/badge.svg\n[Security Checks]: https://github.com/wayfair-tremor/dissect/workflows/Security%20audit/badge.svg\n[Code Coverage]: https://coveralls.io/repos/github/tremor-rs/dissect/badge.svg?branch=main\n[coveralls.io]: https://coveralls.io/github/tremor-rs/dissect?branch=main\n[Latest Version]: https://img.shields.io/crates/v/dissect.svg\n[crates.io]: https://crates.io/crates/dissect\n\n**dissect parser**\n\n---\n\nDissect parsing inspired by logstash's dissect plugin.\n\nParses a string into a map. \n\n## Use as a library\n\nThe dissect parser was designed so that KV style parsing could be embedded into [tremor](https://www.tremor.rs)'s [scripting](https://docs.tremor.rs/tremor-script/) language for [extract](https://docs.tremor.rs/tremor-script/extractors/dissect/) operations.\n\nThe parser can also be used standalone. A fairly gnarly example of parsing logs\nfrom this libraries tests illustrates better than words can:\n\n```rust\n  let pattern = r#\"%{syslog_timestamp} %{syslog_hostname} %{?syslog_prog}: %{syslog_program_aux}[%{syslog_pid:int}] %{request_unix_time} %{request_timestamp} %{request_elapsed_time} %{server_addr}:%{server_port:int} %{remote_addr}:%{remote_port:int} \"%{response_content_type}\" %{response_content_length} %{request_status} %{bytes_sent} %{request_length} \"%{url_scheme}\" \"%{http_host}\" \"%{request_method} %{request_url} %{request_protocol}\" \"%{http_referer}\" \"%{http_user_agent}\" \"%{http_x_forwarded_for}\" \"%{http_ttrue_client_ip}\" \"%{remote_user}\" \"%{is_bot}\" \"%{admin_user}\" \"%{http_via}\" \"%{response_location}\" \"%{set_cookie}\" \"%{http_cookie}\" \"%{moawsl_info}\" \"%{php_message}\" \"%{akamai_edgescape}\" \"%{uid_info}\" \"%{geoip_country}\" \"%{geoip_region}\" \"%{geoip_city}\" \"%{geoip_postal}\" \"%{geoip_dma}\" \"%{server_id}\" \"%{txid}\" \"%{hpcnt}\" \"%{client_accept}\" \"%{client_accept_charset}\" \"%{client_accept_encoding}\" \"%{client_accept_language}\" \"%{client_accept_datetime}\" \"%{client_pragma}\" \"%{client_transfer_encoding}\" \"%{client_attdeviceid}\" \"%{client_wap_profile}\" %{weblog_end}\"#;\n  let p = lex(\"%{name}%{_}%{_(|)}%{age}\");\n  assert!(lex(pattern).is_ok());\n  assert!(p.is_ok());\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftremor-rs%2Fdissect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftremor-rs%2Fdissect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftremor-rs%2Fdissect/lists"}