中国知网搜索与引文处理系统
Project description
CNKS - 中国知网搜索与引文处理系统
简介
CNKS是一个用于搜索中国知网并提取引文数据的工具。该系统能够自动化搜索过程,提取文献信息,并以结构化的方式返回结果。
系统架构
CNKS采用服务器-客户端架构,包含以下主要组件:
-
服务器 (Server):
- 处理来自客户端的请求
- 按需调用Worker API处理关键词搜索
- 管理搜索结果缓存
-
工作模块 (Worker):
- 提供搜索和数据提取API
- 使用Playwright自动浏览网页
- 解析和提取引文数据
- 不再作为独立进程运行,而是由服务器直接调用
-
客户端 (Client):
- 命令行界面,用于发送搜索请求
- 接收并显示搜索结果
-
引文处理器 (Citzer):
- 解析和格式化引文数据
- 支持多种引文格式
安装
要求
- Python 3.12 或更高版本
- Playwright
- MCP
安装步骤
-
克隆仓库:
git clone https://github.com/your-username/cnks.git cd cnks -
安装依赖:
pip install -e . playwright install
使用方法
启动服务器
cnks
或
cnks-server
使用客户端发送请求
cnks-client "搜索关键词"
选项:
--timeout SECONDS: 设置响应超时时间(默认为60秒)
直接测试Worker模块 (仅用于调试)
cnks-worker-test "搜索关键词"
配置
系统可通过以下环境变量进行配置:
CACHE_FILE: 缓存文件路径,默认为 "cache.json"SEARCH_URL: 搜索URL,默认为中国知网搜索页面
可以创建.env文件设置这些环境变量。
许可证
[项目许可证信息]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cnks-0.3.0.tar.gz
(62.1 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
cnks-0.3.0-py3-none-any.whl
(63.7 MB
view details)
File details
Details for the file cnks-0.3.0.tar.gz.
File metadata
- Download URL: cnks-0.3.0.tar.gz
- Upload date:
- Size: 62.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35b30855db4f6674c7f5780dd1e660391292e2eb85d38061480458a403b22bed
|
|
| MD5 |
2e0b2cc06938fac5eb21cc5aadc34b00
|
|
| BLAKE2b-256 |
4214c17ed985e13a2245e72ab07340380d4821edf6a1d57577c8ec9b0c19129e
|
File details
Details for the file cnks-0.3.0-py3-none-any.whl.
File metadata
- Download URL: cnks-0.3.0-py3-none-any.whl
- Upload date:
- Size: 63.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
158ea70a392fbbd0503ea56c4896249b91ac24e07355942b5a8ee03d8b0f6ed4
|
|
| MD5 |
312a881c574022873115e8de7100b720
|
|
| BLAKE2b-256 |
eae0148d0b7b1cabefab5eef1de4da4a5c5988203d11705571f1115029ebd39e
|