CLI tool for sending notifications to Bark
Project description
barkcli
一个基于 BarkNotificator 的命令行工具,支持通过命令行发送推送通知到 Bark 应用。
安装
pip install barkcli-.*.tar.gz
或从源码目录运行:
pip install .
使用方法
设置 Token
你可以通过环境变量 BARK_TOKEN 设置设备 token:
export BARK_TOKEN=your_device_token
也可以通过 --token 参数传入。
命令格式
支持位置参数和具名参数:
位置参数(按顺序)
bark "Title" "Message content" "https://icon.url" "https://target.url" "category" "alarm.caf"
具名参数
bark --title "Hello" --content "World" \
--icon_url "https://..." \
--target_url "https://..." \
--category "group1" \
--ringtone "alarm.caf"
参数说明
title: 推送标题content: 推送内容icon_url: 图标 URLtarget_url: 点击跳转 URLcategory: Bark 分类(用于分组显示)ringtone: 铃声名称(如:alarm.caf,bell.caf)
打包成压缩文件
在修正后的 barkcli 项目目录下执行:
python setup.py sdist
会在 dist/ 目录生成一个新的 barkcli-x.x.x.tar.gz 文件
重新安装到系统
pip install --force-reinstall dist/barkcli-*.tar.gz
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
barkcli-1.0.2.tar.gz
(3.0 kB
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
File details
Details for the file barkcli-1.0.2.tar.gz.
File metadata
- Download URL: barkcli-1.0.2.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9869b5abdb20867e0cabb0cfe4e0c0034301756515018acfdabea4b3927fb50
|
|
| MD5 |
5d18798b328afba779dd08810a352955
|
|
| BLAKE2b-256 |
5bba598226760cc91f51a05cf96a5b7ea3139f3e1fc8efd1b59df00eb64b0146
|
File details
Details for the file barkcli-1.0.2-py3-none-any.whl.
File metadata
- Download URL: barkcli-1.0.2-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2949cec1711a47cfa52965b0cc66cb366d793a6eacd47e2acba291ae9843645c
|
|
| MD5 |
20aae93b19037b88cc8631c47ecab0d3
|
|
| BLAKE2b-256 |
c755ba1fe2d3c8a6bb9b2abdbee72d0871b6d666d9d02e9dcff2926154fed30f
|