Bark是一个简约好用的推送App。
下面这些Tasker任务可以从通知栏磁贴、文本选择菜单、分享菜单等等入口运行,帮你把剪贴板中或是传入的文本推送到Bark App。
本系列帖子导航:
- 快捷指令复刻版Pushbullet
- 基于AutohHotkey的Bark推送端
- 基于Tasker的Bark推送端(本帖)
- Tasker转发验证码到Bark
1. 获取Push URL
iOS或者Android安装Bark,在App的主界面,可以看到形如 https://api.day.app/xxxxxxxxxx/
的Push URL,记录下来
2.导入Tasker任务和profile
导入后要把https://api.day.app/xxxxxxxxxxxx/
修改成自己的Bark Push URL
2-1 通知栏磁贴或者桌面图标
点我导入或者按照下方的描述手动创建一个Tasker任务
Enter: Bark
A1: Status Bar [ Set:Collapsed ]
A2: Variable Set [ Name:%clipboard To:%CLIP Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
A3: Variable Search Replace [ Variable:%clipboard Search:(http(s)?:\/\/)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:[0-9]{1,5})?[-a-zA-Z0-9()@:%_\\\+\.~#?&//=]* Ignore Case:Off Multi-Line:Off One Match Only:On Store Matches In Array:%url Replace Matches:Off Replace With: Continue Task After Error:On ]
A4: If [ %url1 Set ]
A5: HTTP Request [ Method:HEAD URL:https://api.day.app/xxxxxxxxxxxxxxxxxxxxxxxxxx/%e4%bb%8eAndroid%e7%bb%a7%e7%bb%ad?url=%url1 Headers: Query Parameters: Body: File To Send: File/Directory To Save With Output: Timeout (Seconds):10 Trust Any Certificate:Off Automatically Follow Redirects:Off Use Cookies:Off ]
A6: Else
A7: HTTP Request [ Method:HEAD URL:https://api.day.app/xxxxxxxxxxxxxxxxxxxxxxxxxx/%CLIP?automaticallyCopy=1 Headers: Query Parameters: Body: File To Send: File/Directory To Save With Output: Timeout (Seconds):10 Trust Any Certificate:Off Automatically Follow Redirects:Off Use Cookies:Off ]
A8: End If
A9: Flash [ Text:Pushed to Bark Long:Off ] If [ %http_response_code ~ 200 ]
2-2 选中文本(需要AutoShare)
点我导入或者按照下方的描述手动创建一个Tasker任务
Profile: Push Text to Bark
Restore: no
Event: AutoShare Process Text [ Configuration:Text Processor: Tasker ]
Enter: Push to Bark
A1: Variable Search Replace [ Variable:%astext Search:(http(s)?:\/\/)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:[0-9]{1,5})?[-a-zA-Z0-9()@:%_\\\+\.~#?&//=]* Ignore Case:Off Multi-Line:Off One Match Only:On Store Matches In Array:%url Replace Matches:Off Replace With: Continue Task After Error:On ]
A2: If [ %url1 Set ]
<修改成自己的Push URL>
A3: HTTP Request [ Method:HEAD URL:https://api.day.app/xxxxxxxxxxxx/%e4%bb%8eAndroid%e7%bb%a7%e7%bb%ad?url=%url1 Headers: Query Parameters: Body: File To Send: File/Directory To Save With Output: Timeout (Seconds):10 Trust Any Certificate:Off Automatically Follow Redirects:Off Use Cookies:Off Continue Task After Error:On ]
A4: Else
<修改成自己的Push URL>
A5: HTTP Request [ Method:HEAD URL:https://api.day.app/xxxxxxxxxxxx/%astext?automaticallyCopy=1 Headers: Query Parameters: Body: File To Send: File/Directory To Save With Output: Timeout (Seconds):10 Trust Any Certificate:Off Automatically Follow Redirects:Off Use Cookies:Off Continue Task After Error:On ]
A6: End If
A7: If [ %http_response_code ~ 200 ]
A8: Flash [ Text:Pushed to Bark Long:Off ]
A9: Else
A10: Flash [ Text:Failed to Push Long:Off ]
A11: End If
2-3 分享文本(需要AutoShare)
点我导入或者按照下方的描述手动创建一个Tasker任务
Profile: Share to Bark (21)
Restore: no
Event: AutoShare [ Configuration:Command: all
Sender: all
Subject: all
Text: all
File: all ]
Enter: Push to Bark (51)
A1: Variable Search Replace [ Variable:%astext Search:(http(s)?:\/\/)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:[0-9]{1,5})?[-a-zA-Z0-9()@:%_\\\+\.~#?&//=]* Ignore Case:Off Multi-Line:Off One Match Only:On Store Matches In Array:%url Replace Matches:Off Replace With: Continue Task After Error:On ]
A2: If [ %url1 Set ]
<修改成自己的Push URL>
A3: HTTP Request [ Method:HEAD URL:https://api.day.app/xxxxxxxxxxxx/%e4%bb%8eAndroid%e7%bb%a7%e7%bb%ad?url=%url1 Headers: Query Parameters: Body: File To Send: File/Directory To Save With Output: Timeout (Seconds):10 Trust Any Certificate:Off Automatically Follow Redirects:Off Use Cookies:Off Continue Task After Error:On ]
A4: Else
<修改成自己的Push URL>
A5: HTTP Request [ Method:HEAD URL:https://api.day.app/xxxxxxxxxxxx/%astext?automaticallyCopy=1 Headers: Query Parameters: Body: File To Send: File/Directory To Save With Output: Timeout (Seconds):10 Trust Any Certificate:Off Automatically Follow Redirects:Off Use Cookies:Off Continue Task After Error:On ]
A6: End If
A7: If [ %http_response_code ~ 200 ]
A8: Flash [ Text:Pushed to Bark Long:Off ]
A9: Else
A10: Flash [ Text:Failed to Push Long:Off ]
A11: End If