# provdb-tag-graph-script **Repository Path**: jinyuchata/provdb-tag-graph-script ## Basic Information - **Project Name**: provdb-tag-graph-script - **Description**: No description available - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2022-04-26 - **Last Updated**: 2022-07-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 1. 安装SWIG(macOS) ```bash $ brew install swig ``` 2. 安装依赖 - 安装Poetry管理的依赖:poetry install && poetry shell - 编译并安装graph_core:(需进入上一步创建的venv) ```bash $ cd path/to/provdb-tag-graph $ cd graph-core $ swig -c++ -python -o graph_wrap.cxx graph.i $ python ./setup.py install ``` 3. 启动kafka ```bash $ cd ./docker-kafka $ docker-compose up -d ``` 4. 启动Consumer (main.py),交互式设置参数 ![image-20220426205708298](https://cse2020-dune.oss-cn-shanghai.aliyuncs.com/20220426205709.png) 5. 启动Test-Producer,可以设置 Kafka地址、循环次数、发送间隔时间 ```python KAFKA_HOST = "localhost:29092" SLEEP_TIME = 0.2 LOOP_NUM = 1000 ``` 6. 需停止收集时,只需在运行main.py的窗口Ctrl+C,即可退出并保存索引图文件;TSV图文件是即时写入的 ![image-20220426210507924](https://cse2020-dune.oss-cn-shanghai.aliyuncs.com/20220426210508.png)