Skip to main content

CLI tool for sending notifications to Bark

Project description

barkcli

一个基于 BarkNotificator 的命令行工具,支持通过命令行发送推送通知到 Bark 应用。

安装

realese页下载

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: 图标 URL
  • target_url: 点击跳转 URL
  • category: 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.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

barkcli-1.0.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file barkcli-1.0.1.tar.gz.

File metadata

  • Download URL: barkcli-1.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.1

File hashes

Hashes for barkcli-1.0.1.tar.gz
Algorithm Hash digest
SHA256 416a13cf2567d3071410efc689f2cb6fb39e085a9d246fda24e268fc7ad72fc6
MD5 fc1fffa6cfd7b1d1ba6e2de66aec0656
BLAKE2b-256 b80ae0e09891098192ffb8321df9b0f738e1d151f8b2e29d1c9d5af6a95eeff4

See more details on using hashes here.

File details

Details for the file barkcli-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: barkcli-1.0.1-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

Hashes for barkcli-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fc242de032a2e09cd5d3ac0255e8f5b71a48a7a496e1b94295f67af7bdaa6d90
MD5 2ce9b250ebddcc3e5d6f173c3dfa12e1
BLAKE2b-256 4e107fbc1fbb61375328c5ca42852a7e739c7029be8c236c7d910dfee2fe9bde

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page