{"id":17317899,"url":"https://github.com/darkskygit/gchdb","last_synced_at":"2025-06-28T02:01:55.763Z","repository":{"id":57633159,"uuid":"263923624","full_name":"darkskygit/GCHDB","owner":"darkskygit","description":"Provides a record abstraction for storing chat records extracted by different chat software, and provides full-text search feature","archived":false,"fork":false,"pushed_at":"2024-11-03T11:23:58.000Z","size":182,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-28T02:01:55.617Z","etag":null,"topics":["database","full-text-search","recorder"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/darkskygit.png","metadata":{"files":{"readme":null,"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,"zenodo":null}},"created_at":"2020-05-14T13:31:36.000Z","updated_at":"2024-11-03T11:24:01.000Z","dependencies_parsed_at":"2025-06-28T02:01:30.155Z","dependency_job_id":null,"html_url":"https://github.com/darkskygit/GCHDB","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/darkskygit/GCHDB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkskygit%2FGCHDB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkskygit%2FGCHDB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkskygit%2FGCHDB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkskygit%2FGCHDB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darkskygit","download_url":"https://codeload.github.com/darkskygit/GCHDB/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkskygit%2FGCHDB/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262362036,"owners_count":23299117,"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","full-text-search","recorder"],"created_at":"2024-10-15T13:18:10.794Z","updated_at":"2025-06-28T02:01:55.723Z","avatar_url":"https://github.com/darkskygit.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GCHDB aka General chat history database\n\nThis crate provides chat record abstraction, used to store chat records extracted from different chat software, and integrated Chinese full-text index.\n\n# Usage\n\n```rust\nfn main() -\u003e ChatRecordResult\u003c()\u003e {\n    // create an records database\n    let mut recoder = SqliteChatRecorder::new(\"record.db\")?;\n    // create record, you can extract some record from other im's database\n    let record = Record {\n        chat_type: \"testaasdavxz\".into(),\n        owner_id: \"asdasdasdaaaa\".into(),\n        group_id: \"asdasdasd\".into(),\n        sender: \"人民日报\".into(),\n        content:\n            \"张华考上了北京大学；李萍进了中等技术学校；我在百货公司当售货员：我们都有光明的前途\"\n                .into(),\n        timestamp: chrono::Local::now().naive_utc().timestamp_millis(),\n        ..Default::default()\n    };\n    // insert to database\n    assert_eq!(recoder.insert_or_update_record(\u0026record)?, true);\n    // index the contents of the record\n    recoder.refresh_index()?;\n    // query record by sql\n    println!(\n        \"{:?}\",\n        recoder.get_record(Query {\n            chat_type: Some(\"testaasdavxz\".into()),\n            sender: Some(\"%日报\".into()),\n            ..Default::default()\n        })?\n    );\n    // query record by indexer\n    println!(\n        \"{:?}\",\n        recoder.get_record(Query {\n            keyword: Some(\"技术学校\".into()),\n            ..Default::default()\n        })?\n    );\n    // remove record in database\n    assert_eq!(recoder.remove_record(record)?, true);\n    Ok(())\n}\n```\n\n# Contributing\n\nWelcome pull request :)\n\n# License\n\nAGPL3.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkskygit%2Fgchdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkskygit%2Fgchdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkskygit%2Fgchdb/lists"}