Code Monkey home page Code Monkey logo

chatcopilot's Introduction

ChatCopilot

项目介绍

ChatCopilot 是一款用 golang 实现的获取微信聊天记录并支持实时存储到数据库的工具,目前只支持在 MacOS 上可运行(因为我没有 windows 电脑)。

当前实现功能

  • 1、获取群聊天记录
  • 2、实时获取已保存记录
  • 3、获取联系人聊天记录

使用方法

添加配置文件

将一下配置文件 config/app.cfg 添加到可执行文件的根目录下,修改你本机中对应的 mysqlredis 配置信息.

pod-id=1

[mysql]
host=127.0.0.1
port=3306
user=root
password=secret
db=ChatCopilot
timezone=Asia/Shanghai

[redis]
host=127.0.0.1
port=6379
auth=secret
db=0

[log]
dir=logs
max-age=7

[wechat]
key=
path=./test

wechat.key 为微信数据库密钥,获取方式见这里

wechat.pathmac 微信聊天记录的目录,具体需要看你电脑存放位置的实际情况,例:/Users/james/Library/Containers/com.tencent.xinWeChat/Data/Library/Application\ Support/com.tencent.xinWeChat/2.0b4.0.9/5a22781f14219edfffa333cb38aa92cf/Message

创建数据库表

执行 migration 文件夹中的 sql 语句创建对应的数据库表.

执行可执行文件

Releases 中选择对应的系统下载可执行文件,解压后直接执行。

运行 api 服务

./ChatCopilot api

对应的 api 文档地址

运行定时服务

./ChatCopilot crontab

每 30 秒同步一次新的群聊记录。

常见问题

未找到选项 -L/usr/local/opt/openssl/lib 的目录

export CGO_CFLAGS="-I/opt/homebrew/include"
export CGO_LDFLAGS="-L/opt/homebrew/lib"

参考文献

chatcopilot's People

Contributors

lw396 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.