Comments (6)
from bark.
@Finb
我是拿来直接用的, 找了个automator的workflow。普通文本没问题。
不过不好意思没用过js, 尝试着在workflow里修改了下,没有成功。
下面是workflow调用的js,能指导一下该如何编码吗? 多谢!
function run(input, parameters) {
var text=input;
var apiUrl="https://api.day.app/{MYKEY}/";
var autoCopy="?automaticallyCopy=1";
var urlResult=encodeURI(apiUrl+text+autoCopy);
return urlResult;
}
from bark.
from bark.
谢谢!
不过这样还是有点问题, 比如 copy 了
https://github.com/Finb/Bark/issues/18
再推送的话,就推送不过来。 似乎相当于在 chrome 输入:
https://api.day.app/{MYKEY}/https://github.com/Finb/Bark/issues/18?automaticallyCopy=1
但是如果只是 copy
https://github.com
就会推送
github.com
总之,https://
会被忽略 (严格来说还是连带 https 一起推送更好) , 而/
出现超过一次就可能推送失败了。看起来应该还是 url 编码的问题?
from bark.
@hzfmer
对,因为:// 破坏了 URL 的结构,
如果有这种特殊字符,需要URL编码
你这里的情况需要这样
https://api.day.app/{MYKEY}/https%3A%2F%2Fgithub.com%2FFinb%2FBark%2Fissues%2F18?automaticallyCopy=1
你那是否有类似 encodeURIComponent 的方法? 需要这样对URL进行编码下
from bark.
是的, 我今天自己研究了下,确实需要这样编码。 但是一个简单的workflow要加上这样的正则替换还是挺麻烦的,就先算了吧。
总之多谢!
from bark.
Related Issues (20)
- 连接了电信wifi,服务器错误了,用5g服务器可以用了,哪里有什么问题 HOT 2
- 能否添加自定义的铃声通知 HOT 2
- 有没有反向推送的操作 HOT 1
- Utools插件推荐
- Safari Extension下载
- 可否不推送空白的内容到app HOT 1
- 是否可以支持重要警告消息? HOT 1
- Minor English Correction
- 如何设置像来电一样的提醒?除非主动按掉,否则一直响铃 HOT 3
- Python script for msg sender with AES-256-CBC
- Suggestion to Optimize AES Key Encoding Method
- 请问有安卓端的替代品吗?
- bark闪退
- bark能否实现定时推送的功能 HOT 1
- 作者您好,想咨询一下icon能否刷新. HOT 1
- 可以支持自动粘贴吗 HOT 2
- iv 中包含 \r\n 导致 Decryption Failed
- 一个功能更完善的Python包,支持所有参数
- 在IOS17.2.1上使用,通知无法亮屏 HOT 2
- 电报群邀请链接过期了 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bark.