anidb库和简单cli客户端。
yumemi的Python项目详细描述
用于python和simple cli客户端的anidb库。还为 计算ED2K哈希。
client=yumemi.Client()client.auth('login','*****')response=client.call('ANIME',{'aid':11829})# ...ed2k_hash=yumemi.ed2k.file_ed2k('/tmp/foo')# ...
cli
命令行客户端只能测试到API服务器的连接并将文件添加到 我的名单仅此而已,我想不会再增加什么了。
Usage: yumemi [OPTIONS] FILES... AniDB client for adding files to mylist. Options: --version Show the version and exit. --ping Test connection to AniDB API server. -u, --username TEXT -p, --password TEXT --encrypt TEXT Ecrypt messages. Parameter value is API Key. -w, --watched Mark files as watched. -W, --view-date DATE Set viewdate to certain date. Implies -w/--watched. Formats: Y-m-d[ H:M[:S]] | y H:M (yesterday) | -#[d] H:M (before # days). -d, --deleted Set file state to deleted. -e, --edit Set edit flag to true. -j, --jobs INTEGER Number of adding processes. Default is CPU count. -h, --help Show this message and exit.
选项username、encrypt和jobs的值也从 以YUMEMI_为前缀的环境变量例如,如果你不想 要在每次添加文件时写入用户名,请在 终端或将其放入~/.profile文件
export YUMEMI_USERNAME=your-username
ed2k
简单cli也在ed2k模块中。您可以通过执行 yumemi.ed2k模块
python3 -m yumemi.ed2k [FILES...]
安装
使用pip安装
pip3 install yumemi
或克隆存储库
git clone https://github.com/fpob/yumemi cd yumemi
并安装包含依赖项的python包
python3 setup.py install
要使用可选加密,必须安装包pycrypto。
pip3 install pycrypto
文件
文档可以在Read The Docs找到。