{"id":25902505,"url":"https://github.com/aliazlanpro/biblib","last_synced_at":"2025-03-03T03:16:28.417Z","repository":{"id":274159980,"uuid":"922081470","full_name":"aliazlanpro/biblib","owner":"aliazlanpro","description":"Parse, manage, and deduplicate academic citations","archived":false,"fork":false,"pushed_at":"2025-01-30T20:31:12.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T03:52:47.084Z","etag":null,"topics":["academic","bibliography","citations","doi","pubmed","ris"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/biblib","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aliazlanpro.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2025-01-25T09:10:36.000Z","updated_at":"2025-01-30T20:31:16.000Z","dependencies_parsed_at":"2025-01-25T10:47:10.195Z","dependency_job_id":"5a9fd8a4-371f-4b13-bd40-3479bef76284","html_url":"https://github.com/aliazlanpro/biblib","commit_stats":null,"previous_names":["aliazlanpro/biblib"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliazlanpro%2Fbiblib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliazlanpro%2Fbiblib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliazlanpro%2Fbiblib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliazlanpro%2Fbiblib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aliazlanpro","download_url":"https://codeload.github.com/aliazlanpro/biblib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241600472,"owners_count":19988715,"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":["academic","bibliography","citations","doi","pubmed","ris"],"created_at":"2025-03-03T03:16:27.825Z","updated_at":"2025-03-03T03:16:28.408Z","avatar_url":"https://github.com/aliazlanpro.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# biblib\n\n[![Crates.io](https://img.shields.io/crates/v/biblib.svg)](https://crates.io/crates/biblib)\n[![Documentation](https://docs.rs/biblib/badge.svg)](https://docs.rs/biblib)\n[![License: GPL-3.0](https://img.shields.io/crates/l/biblib)](https://opensource.org/license/gpl-3-0)\n\nA comprehensive Rust library for parsing, managing, and deduplicating academic citations. `biblib` provides robust support for multiple citation formats, intelligent deduplication, and extensive metadata handling.\n\n\u003e **Note:** This crate is under active development. There may be some breaking changes between versions. Please check the changelog before upgrading.\n\n\n## Features\n\n### Multiple Format Support\n- **RIS (Research Information Systems)**\n  - Full tag support\n  - Author name parsing\n  - Journal abbreviations\n  \n- **PubMed/MEDLINE**\n  - Complete field coverage\n  - MeSH terms support \n  - Affiliation handling\n\n- **EndNote XML**\n  - Full XML schema support\n  - Unicode handling\n  - Custom field mapping\n\n- **CSV with Custom Mappings**\n  - Configurable headers\n  - Multiple delimiters\n  - Flexible field mapping\n\n### Intelligent Deduplication\n- DOI-based matching\n- Smart title comparison using Jaro-Winkler distance\n- Journal name/abbreviation matching\n- Configurable matching thresholds\n- Year-based grouping for performance\n- Parallel processing support\n\n### Rich Metadata Support\n- Complete author information with affiliations\n- Journal details (name, abbreviation, ISSN)\n- DOIs and other identifiers (PMID, PMC ID)\n- Comprehensive citation metadata\n\n## Installation\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nbiblib = \"0.2.0\"  # All features enabled by default\n```\n\nOr select specific features:\n\n```toml\n[dependencies]\nbiblib = { version = \"0.2.0\", default-features = false, features = [\"csv\", \"ris\"] }\n```\n\nAvailable features:\n- `csv` - CSV format support\n- `pubmed` - PubMed/MEDLINE format support\n- `xml` - EndNote XML support (requires quick-xml)\n- `ris` - RIS format support\n- `dedupe` - Citation deduplication (requires rayon and strsim)\n\nAll features are enabled by default. Disable `default-features` to select specific ones.\n\n## Quick Start\n\n### Basic Citation Parsing\n\n```rust\nuse biblib::{CitationParser, RisParser};\n\n// Parse RIS format\nlet input = r#\"TY  - JOUR\nTI  - Example Article\nAU  - Smith, John\nER  -\"#;\n\nlet parser = RisParser::new();\nlet citations = parser.parse(input).unwrap();\nprintln!(\"Title: {}\", citations[0].title);\n```\n\n### Citation Deduplication\n\n```rust\nuse biblib::dedupe::{Deduplicator, DeduplicatorConfig};\n\n// Configure deduplication\nlet config = DeduplicatorConfig {\n    group_by_year: true,\n    run_in_parallel: true,\n};\n\nlet deduplicator = Deduplicator::with_config(config);\nlet duplicate_groups = deduplicator.find_duplicates(\u0026citations).unwrap();\n\nfor group in duplicate_groups {\n    println!(\"Original: {}\", group.unique.title);\n    for duplicate in group.duplicates {\n        println!(\"  Duplicate: {}\", duplicate.title);\n    }\n}\n```\n\n### CSV with Custom Mappings\n\n```rust\nuse biblib::csv::{CsvParser, CsvConfig};\n\nlet mut config = CsvConfig::new();\nconfig.set_header_mapping(\"title\", vec![\"Article Name\".to_string()])\n     .set_delimiter(b';');\n\nlet parser = CsvParser::with_config(config);\nlet citations = parser.parse(\"Article Name;Author;Year\\nExample Paper;Smith J;2023\").unwrap();\n```\n\n## Supported Fields\n\n| Field         | Description                    | RIS | PubMed | EndNote XML | CSV |\n|---------------|--------------------------------|-----|---------|------------|-----|\n| Title         | Work title                     | ✓   | ✓       | ✓          | ✓   |\n| Authors       | Author names and affiliations  | ✓   | ✓       | ✓          | ✓   |\n| Journal       | Journal name and abbreviation  | ✓   | ✓       | ✓          | ✓   |\n| Year          | Publication year               | ✓   | ✓       | ✓          | ✓   |\n| Volume        | Journal volume                 | ✓   | ✓       | ✓          | ✓   |\n| Issue         | Journal issue                  | ✓   | ✓       | ✓          | ✓   |\n| Pages         | Page range                     | ✓   | ✓       | ✓          | ✓   |\n| DOI           | Digital Object Identifier      | ✓   | ✓       | ✓          | ✓   |\n| PMID          | PubMed ID                      | ✓   | ✓       | -          | ✓   |\n| PMC ID        | PubMed Central ID              | ✓   | ✓       | ✓          | ✓   |\n| Abstract      | Abstract text                  | ✓   | ✓       | ✓          | ✓   |\n| Keywords      | Keywords/tags                  | ✓   | ✓       | ✓          | ✓   |\n| Language      | Publication language           | ✓   | ✓       | ✓          | ✓   |\n| Publisher     | Publisher information          | ✓   | -       | ✓          | ✓   |\n| URLs          | Related URLs                   | ✓   | -       | ✓          | ✓   |\n| ISSN          | International Standard Serial Number | ✓ | ✓    | ✓          | ✓   |\n| MeSH Terms    | Medical Subject Headings       | -   | ✓       | -          | -   |\n\n## Advanced Usage\n\n### Customizing Deduplication\n\n```rust\nuse biblib::dedupe::{Deduplicator, DeduplicatorConfig};\n\n// Fine-tune deduplication settings\nlet config = DeduplicatorConfig {\n    group_by_year: true,     // Enable year-based grouping\n    run_in_parallel: true,   // Enable parallel processing\n};\n\nlet deduplicator = Deduplicator::with_config(config);\n```\n\n### Error Handling\n\n```rust\nuse biblib::{CitationParser, RisParser, CitationError};\n\nlet result = RisParser::new().parse(\"invalid input\");\nmatch result {\n    Ok(citations) =\u003e println!(\"Parsed {} citations\", citations.len()),\n    Err(CitationError::InvalidFormat(msg)) =\u003e eprintln!(\"Parse error: {}\", msg),\n    Err(e) =\u003e eprintln!(\"Other error: {}\", e),\n}\n```\n\n## Performance Considerations\n\n- Use year-based grouping for large datasets (\u003e 1000 citations)\n- Enable parallel processing for better deduplication performance\n- Consider using CSV format for very large datasets\n- Pre-process and normalize data when possible\n\n## Thread Safety\n\nAll parser implementations are thread-safe and can be shared between threads. The deduplication engine supports parallel processing through the `run_in_parallel` configuration option.\n\n## Contributing\n\nWe welcome contributions! Please feel free to submit pull requests. For major changes, please open an issue first to discuss what you would like to change.\n\nMake sure to update tests as appropriate and follow the existing code style.\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.\n\n## Project Status\n\nThis crate is under active. There may be some breaking changes.\n\n## Support\n\n- Documentation: [docs.rs](https://docs.rs/biblib)\n- Issues: [GitHub Issues](https://github.com/aliazlanpro/biblib/issues)\n- Discussions: [GitHub Discussions](https://github.com/aliazlanpro/biblib/discussions)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliazlanpro%2Fbiblib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliazlanpro%2Fbiblib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliazlanpro%2Fbiblib/lists"}