Don't like Python, or think the executables are too heavy? Try out new implementations in Go with smaller size and runs faster! forewing/horse-hunter
注:本软件仅限用于自卫反击,向网络暴力说不!
效果
剪贴板内每 0.1s 刷新一条金句,让你在骂战中不被欺凌
点击如下预览链接即意味着您已同意如下内容: 预览内容包含暴力、血腥、人身攻击内容,但不针对包括您在内的任何个人、群体、组织。 心理承受能力不足请不要点击浏览,若执意浏览,本项目组成员对造成的心理创伤不负任何责任。
依赖
Python >= 3.6
PyQt5 (GUI version only)
Flask (API version only)
pip install -r requirements-{VERSION}.txt
GUI 版本
前往 Release 下载最新程序 (HorseHunterGUI.exe)
运行
更改设置后需要 Stop 再 Start 以应用更改
快捷使用
- 运行脚本
python HorseHunter.py
- 打开聊天框
Ctrl+V, Enter, Ctrl+V, Enter, Ctrl+V, Enter...
进阶使用
usage: HorseHunter.py [-h] [--target {female,male,mix}]
[--level {max,min,mix}] [--interval INTERVAL]
自动向剪贴板刷新金句,让你不再饱受欺凌
optional arguments:
-h, --help show this help message and exit
--target {female,male,mix}, -t {female,male,mix}
设置辱骂对象, female=令堂, male=令尊, mix=混合. 默认 female
--level {max,min,mix}, -l {max,min,mix}
设置辱骂等级, max=火力全开, min=口吐芬芳, mix=混合. 默认 max
--interval INTERVAL, -i INTERVAL
设置刷新间隔(s). 默认 0.1
打包二进制文件
依赖 pyinstaller
- GUI
pyinstaller -F --add-data "resources-max.txt;." --add-data "resources-min.txt;." --noconsole HorseHunterGUI.py
- CLI
pyinstaller -F --add-data "resources-max.txt;." --add-data "resources-min.txt;." HorseHunter.py
将软件打包至 dist/HorseHunter.exe
,使用方法与脚本形式相同。
API
提供 Flask API 于 HorseHunterAPI.py
中。
可通过
$ FLASK_APP=HorseHunterAPI.py flask run
或
python HorseHunterAPI.py # Bind 127.0.0.1:6675
或其他途径运行,详细配置请参考 Flask Documentation
URL | 方法 | 参数 | 返回值 |
---|---|---|---|
/api | GET | [level={max, min, mix}] , [target={female, male, mix}] 若参数空缺或不合法,分别填补默认值 level=max , target=female | 参数所指定的金句范围内随机抽取一条字符串 |
致谢
金句资源(resources-*.txt
)、性别替换(replaceF2M.py
)内容来源:直播点吧
from https://github.com/forewing/HorseHunter.py
-----
Horse Hunter (Go Implementation)
Build script
$ go run ./build -h
Usage of ./build:
-cli
build CLI
-gui
build GUI
-zip
compress output
CLI
On Linux, you need
libx11-dev
installed.
# Build
go build ./cmd/horse-hunter
# Run
$ horse-hunter -h
Usage of ./horse-hunter:
-interval duration
clipboard update interval (default 200ms)
-level string
insult level, [max | min | mix] (default "max")
-target string
insult target, [female | male | mix] (default "female")
GUI
Simple executable
go build ./cmd/horse-hunter-gui
Package for distribution
- Windows
go build -trimpath -ldflags "-s -w -H=windowsgui" -o HorseHunter.exe ./cmd/horse-hunter-gui
- macOS
# Build single executable. If you want a MacOS app, use builtin script
go build -trimpath -ldflags "-s -w" ./cmd/horse-hunter-gui
- Linux
# Install dependencies
sudo apt install xorg-dev -y
# Build binary
go build -trimpath -ldflags "-s -w" -o HorseHunter ./cmd/horse-hunter-gui
from https://github.com/forewing/horse-hunter
No comments:
Post a Comment