{"id":17929677,"url":"https://github.com/ojford/recfiles-rs","last_synced_at":"2026-02-27T19:03:30.495Z","repository":{"id":57666733,"uuid":"247545343","full_name":"OJFord/recfiles-rs","owner":"OJFord","description":"Manage GNU Recfiles from rust","archived":false,"fork":false,"pushed_at":"2020-03-15T23:23:12.000Z","size":17,"stargazers_count":3,"open_issues_count":6,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-19T01:45:23.884Z","etag":null,"topics":["database","flat-file","human-readable","plaintext","recfiles","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OJFord.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-15T20:23:21.000Z","updated_at":"2024-06-20T09:34:51.000Z","dependencies_parsed_at":"2022-09-02T14:22:53.200Z","dependency_job_id":null,"html_url":"https://github.com/OJFord/recfiles-rs","commit_stats":null,"previous_names":["ojford/rec-rs"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OJFord%2Frecfiles-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OJFord%2Frecfiles-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OJFord%2Frecfiles-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OJFord%2Frecfiles-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OJFord","download_url":"https://codeload.github.com/OJFord/recfiles-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245210953,"owners_count":20578321,"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":["database","flat-file","human-readable","plaintext","recfiles","rust"],"created_at":"2024-10-28T21:10:03.189Z","updated_at":"2026-02-27T19:03:30.467Z","avatar_url":"https://github.com/OJFord.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [recfiles](https://crates.io/crates/recfiles) \u0026 [serde_rec](https://crates.io/crates/serde_rec)\n\nManage GNU Recfiles from rust.\n\n[![recfiles](https://img.shields.io/crates/v/recfiles.svg)](https://crates.io/crates/recfiles) [![serde_rec](https://img.shields.io/crates/v/serde_rec.svg)](https://crates.io/crates/serde_rec)\n\n## Installation\n\n`recfiles` (in-memory recfile handling) \u0026 `serde_rec` (data format for serde) on [crates.io](https://crates.io).\n\n## Usage\n\n```rust\nuse recfiles::Record;\nuse serde_rec::to_string;\n\n#[derive(Default, Serialize)]\n#[serde(rename_all=\"PascalCase\")]\nstruct Book {\n    author: Vec\u003cString\u003e,\n    title: String,\n    publisher: Option\u003cString\u003e,\n}\n\nimpl Record for Book {}\n\nlet book = Book {\n    author: vec![String::from(\"A.E.J. Eliott, OBE\")],\n    title: String::from(\"Thirty Days in the Samarkind Desert with the Duchess of Kent\"),\n    ..Default::default()\n}\n\nlet serialised = to_string(\u0026book).unwrap();\n\nassert_eq!(serialised, textwrap::dedent(\"\n    Author: A.E.J. Eliott, OBE\n    Title: Thirty Days in the Samarking Desert with the Duchess of Kent\n\n\");\n```\n\nWe can also specify the record descriptor for 'Book':\n```rust\nlet book_descriptor = recfiles::Descriptor {\n    name: String::from(\"Book\"),\n    key: vec![String::from(\"Title\")],\n    allowed: vec![String::from(\"Publisher\"),\n}\n```\n\nAnd serialise a full record set:\n```rust\nlet rs = recfiles::RecordSet {\n    descriptor: Some(book_descriptor),\n    records: vec![book],\n}\n\nserde_rec::to_string(\u0026rs);\n```\n\n## Work in progress\n\nThis is a work in progress, and currently incomplete \u0026 poorly documented.\n\n(As of writing, the above's all you're getting :wink:.)\n\n### Coming...\n\n* Deserialisation\n* Deriving descriptors\n* File (rather than just to/from string) helpers\n* In-memory (not shelling out to `recutils`) querying helpers\n* Docs!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fojford%2Frecfiles-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fojford%2Frecfiles-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fojford%2Frecfiles-rs/lists"}