{"id":26140694,"url":"https://github.com/badboy/rdb-rs","last_synced_at":"2025-03-11T02:55:00.329Z","repository":{"id":25219498,"uuid":"28643729","full_name":"badboy/rdb-rs","owner":"badboy","description":"RDB parsing \u0026 dumping library and utility","archived":false,"fork":false,"pushed_at":"2018-01-24T13:03:14.000Z","size":456,"stargazers_count":63,"open_issues_count":6,"forks_count":18,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-05T19:14:32.215Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rdb.fnordig.de/","language":"HTML","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/badboy.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}},"created_at":"2014-12-30T20:08:06.000Z","updated_at":"2025-02-10T09:11:06.000Z","dependencies_parsed_at":"2022-08-07T11:15:26.921Z","dependency_job_id":null,"html_url":"https://github.com/badboy/rdb-rs","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badboy%2Frdb-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badboy%2Frdb-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badboy%2Frdb-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badboy%2Frdb-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badboy","download_url":"https://codeload.github.com/badboy/rdb-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242961727,"owners_count":20213316,"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":"2025-03-11T02:54:59.707Z","updated_at":"2025-03-11T02:55:00.317Z","avatar_url":"https://github.com/badboy.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rdb-rs - RDB parsing, formatting, analyzing. All in one library\n\n[![crates.io](http://meritbadge.herokuapp.com/rdb)](https://crates.io/crates/rdb)\n[![Build Status](https://travis-ci.org/badboy/rdb-rs.svg?branch=master)](https://travis-ci.org/badboy/rdb-rs)\n[![Clippy Linting Result](http://clippy.bashy.io/github/badboy/rdb-rs/master/badge.svg)](http://clippy.bashy.io/github/badboy/rdb-rs/master/log)\n\nInspired and based on [redis-rdb-tools][].\n\n## Documentation\n\nOnline at [rdb.fnordig.de/doc/rdb/][doc].\n\n\n## Build\n\n```\ncargo build --release\n```\n\nMinimum required Rust version: 1.6.0\n\n## Install\n\n```\nmake install\n```\n\nYou can change the path by setting `PREFIX`. Defaults to `/usr`.\n\n## Basic operation\n\nrdb-rs exposes just one important method: `parse`.\nThis methods takes care of reading the RDB from a stream,\nparsing the containted data and calling the provided formatter with already-parsed values.\n\n```rust\nuse std::io::BufReader;\nuse std::fs::File;\nuse std::path::Path;\n\nlet file = File::open(\u0026Path::new(\"dump.rdb\")).unwrap();\nlet reader = BufReader::new(file);\nrdb::parse(reader, rdb::formatter::JSON::new(), rdb::filter::Simple::new());\n```\n\n### Formatter\n\nrdb-rs brings 4 pre-defined formatters, which can be used:\n\n* `Plain`: Just plain output for testing\n* `JSON`: JSON-encoded output\n* `Nil`: Surpresses all output\n* `Protocol`: Formats the data in [RESP][],\nthe Redis Serialization Protocol\n\nThese formatters adhere to the `Formatter` trait and supply a method for each possible datatype or opcode.\nIts up to the formatter to correctly handle all provided data such as lists, sets, hashes, expires and metadata.\n\n### Command-line\n\nrdb-rs brings a Command Line application as well.\n\nThis application will take a RDB file as input and format it in the specified format (JSON by default).\n\nExample:\n\n```\n$ rdb --format json dump.rdb\n[{\"key\":\"value\"}]\n$ rdb --format protocol dump.rdb\n*2\n$6\nSELECT\n$1\n0\n*3\n$3\nSET\n$3\nkey\n$5\nvalue\n```\n\n## Tests\n\nRun tests with:\n\n```\nmake test\n```\n\nThis will run the code tests with cargo as well as checking that it can parse all included dump files.\n\n## Contribute\n\nIf you find bugs or want to help otherwise, please [open an issue][issues].\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n\n[redis-rdb-tools]: https://github.com/sripathikrishnan/redis-rdb-tools\n[RESP]: http://redis.io/topics/protocol\n[issues]: https://github.com/badboy/rdb-rs/issues\n[doc]: http://rdb.fnordig.de/doc/rdb/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadboy%2Frdb-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadboy%2Frdb-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadboy%2Frdb-rs/lists"}