{"id":28457422,"url":"https://github.com/stalwartlabs/calcard","last_synced_at":"2025-06-30T00:31:30.347Z","repository":{"id":292534759,"uuid":"924615814","full_name":"stalwartlabs/calcard","owner":"stalwartlabs","description":"iCalendar/vCard parser and generator","archived":false,"fork":false,"pushed_at":"2025-06-15T17:29:40.000Z","size":1942,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-15T18:51:06.766Z","etag":null,"topics":["exporter","generator","ical","icalendar","parser","vcard"],"latest_commit_sha":null,"homepage":"","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/stalwartlabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSES/Apache-2.0.txt","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},"funding":{"open_collective":"stalwart","github":"stalwartlabs","ko_fi":null,"patreon":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2025-01-30T10:44:57.000Z","updated_at":"2025-06-15T17:29:43.000Z","dependencies_parsed_at":"2025-06-01T16:42:16.908Z","dependency_job_id":null,"html_url":"https://github.com/stalwartlabs/calcard","commit_stats":null,"previous_names":["stalwartlabs/calcard"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stalwartlabs/calcard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stalwartlabs%2Fcalcard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stalwartlabs%2Fcalcard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stalwartlabs%2Fcalcard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stalwartlabs%2Fcalcard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stalwartlabs","download_url":"https://codeload.github.com/stalwartlabs/calcard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stalwartlabs%2Fcalcard/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262689452,"owners_count":23349133,"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":["exporter","generator","ical","icalendar","parser","vcard"],"created_at":"2025-06-06T23:39:53.210Z","updated_at":"2025-06-30T00:31:30.336Z","avatar_url":"https://github.com/stalwartlabs.png","language":"Rust","funding_links":["https://opencollective.com/stalwart","https://github.com/sponsors/stalwartlabs"],"categories":[],"sub_categories":[],"readme":"# calcard\n\n[![crates.io](https://img.shields.io/crates/v/calcard)](https://crates.io/crates/calcard)\n[![build](https://github.com/stalwartlabs/calcard/actions/workflows/rust.yml/badge.svg)](https://github.com/stalwartlabs/calcard/actions/workflows/rust.yml)\n[![docs.rs](https://img.shields.io/docsrs/calcard)](https://docs.rs/calcard)\n[![crates.io](https://img.shields.io/crates/l/calcard)](http://www.apache.org/licenses/LICENSE-2.0)\n\nCalcard is a Rust crate for parsing and generating vCard and iCalendar data. It is designed to easily handle `.vcf` and `.ics` file formats, making it straightforward to integrate with calendaring and contact management applications.\n\nIn general, this library abides by the Postel's law or [Robustness Principle](https://en.wikipedia.org/wiki/Robustness_principle) which \nstates that an implementation must be conservative in its sending behavior and liberal in its receiving behavior. This means that\n_calcard_ will make a best effort to parse non-conformant iCal/vCard objects as long as these do not deviate too much from the standard.\n\n## Usage\n\n### Parsing Stream\n\nYou can parse vCard and iCalendar files using the stream-based parser:\n\n```rust\nlet input = \"BEGIN:VCARD\\nVERSION:3.0\\nFN:John Doe\\nEND:VCARD\\n\";\nlet mut parser = Parser::new(\u0026input);\n\nloop {\n    match parser.entry() {\n        Entry::VCard(vcard) =\u003e println!(\"Parsed VCard: {:?}\", vcard),\n        Entry::ICalendar(ical) =\u003e println!(\"Parsed ICalendar: {:?}\", ical),\n        Entry::InvalidLine(line) =\u003e eprintln!(\"Invalid line found: {}\", line),\n        Entry::UnexpectedComponentEnd { expected, found } =\u003e {\n            eprintln!(\"Unexpected end: expected {:?}, found {:?}\", expected, found);\n        },\n        Entry::UnterminatedComponent(component) =\u003e {\n            eprintln!(\"Unterminated component: {:?}\", component);\n        },\n        Entry::Eof =\u003e {\n            break;\n        }\n    }\n}\n```\n\n### Parsing a Single vCard or iCalendar\n\nYou can also parse a single vCard or iCalendar instance directly:\n\n```rust\nlet vcard_input = \"BEGIN:VCARD\\nVERSION:3.0\\nFN:John Doe\\nEND:VCARD\\n\";\nlet vcard = VCard::parse(\u0026vcard_input);\nprintln!(\"Parsed VCard: {:?}\", vcard);\n\nlet ical_input = \"BEGIN:VCALENDAR\\nVERSION:2.0\\nEND:VCALENDAR\\n\";\nlet ical = ICalendar::parse(\u0026ical_input);\nprintln!(\"Parsed ICalendar: {:?}\", ical);\n```\n\n## Generation\n\nTo generate a vCard or iCalendar, simply call `.to_string()` on the parsed object:\n\n```rust\nlet vcard_string = vcard.to_string();\nprintln!(\"Generated vCard:\\n{}\", vcard_string);\n\nlet ical_string = ical.to_string();\nprintln!(\"Generated ICalendar:\\n{}\", ical_string);\n```\n\n*Note: Documentation for creating VCard and ICalendar objects is coming soon.*\n\n## Testing and Fuzzing\n\nTo run the testsuite:\n\n```bash\n $ cargo test --all-features\n```\n\nor, to run the testsuite with MIRI:\n\n```bash\n $ cargo +nightly miri test --all-features\n```\n\nTo fuzz the library with `cargo-fuzz`:\n\n```bash\n $ cargo +nightly fuzz run fuzz_all\n $ cargo +nightly fuzz run fuzz_random\n $ cargo +nightly fuzz run fuzz_structured\n```\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Funding\n\nPart of the development of this library was funded through the [NGI Zero Core](https://nlnet.nl/NGI0/), a fund established by [NLnet](https://nlnet.nl/) with financial support from the European Commission's programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101092990.\n\nIf you find this library useful you can help by [becoming a sponsor](https://opencollective.com/stalwart). Thank you!\n\n## Copyright\n\nCopyright (C) 2020, Stalwart Labs LLC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstalwartlabs%2Fcalcard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstalwartlabs%2Fcalcard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstalwartlabs%2Fcalcard/lists"}