Skip to content

Commit

Permalink
[feat] add IOS Shortcuts in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jujimeizuo committed Oct 7, 2023
1 parent c7110d7 commit c93d995
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,35 @@ Actions [源码](https://github.com/yihong0618/running_page/blob/master/.github/

</details>

## 快捷指令

<details>

<summary>使用 iOS 的 Shortcuts 实现自动化</summary>

下面拿 keep app 举例,当结束跑步后关闭 app,然后自动触发 Actions 更新数据。

1. 拿到项目的 actions id(需要自行申请 token)

```shell
curl https://api.github.com/repos/yihong0618/running_page/actions/workflows -H "Authorization: token d8xxxxxxxxxx" # change to your config
```
<center><img src="https://cdn.jujimeizuo.cn/blog/2023/10/get-action-id.jpg" alt="get-action-id"></center>

2. 结合快捷指令

1. 通过 icloud 获取 [running-page-shortcuts-template](https://www.icloud.com/shortcuts/4a5807a98b9a4e359815ff179c62bacb)

2. 修改下图字典参数
<center> <img src="https://cdn.jujimeizuo.cn/blog/2023/10/running-page-template.jpg"> </center>

3. 自动化

<center> <img src="https://cdn.jujimeizuo.cn/blog/2023/10/new-automation.png" width=20% height=20%> <img src="https://cdn.jujimeizuo.cn/blog/2023/10/select-close.png" width=20% height=20%><img src="https://cdn.jujimeizuo.cn/blog/2023/10/select-shortcut.png" width=20% height=20%><img src="https://cdn.jujimeizuo.cn/blog/2023/10/finish-automation.png" width=20% height=20%></center>

</details>


## 把数据文件放在 github cache 中

<details>
Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,34 @@ The following steps need to be taken

</details>

## Shortcuts

<details>

<summary>Automate with iOS Shortcuts</summary>

Take the keep app as an example. Close the app after running, and then automatically trigger Actions to update the data.

1. get actions id(need to apply token)

```shell
curl https://api.github.com/repos/yihong0618/running_page/actions/workflows -H "Authorization: token d8xxxxxxxxxx" # change to your config
```
<center><img src="https://cdn.jujimeizuo.cn/blog/2023/10/get-action-id.jpg" alt="get-action-id"></center>

2. Binding shortcut instruction

1. Get it via icloud [running-page-shortcuts-template](https://www.icloud.com/shortcuts/4a5807a98b9a4e359815ff179c62bacb)

2. Modify the dictionary parameters in the following figure
<center> <img src="https://cdn.jujimeizuo.cn/blog/2023/10/running-page-template.jpg"> </center>

3. automation

<center> <img src="https://cdn.jujimeizuo.cn/blog/2023/10/new-automation.png" width=20% height=20%> <img src="https://cdn.jujimeizuo.cn/blog/2023/10/select-close.png" width=20% height=20%><img src="https://cdn.jujimeizuo.cn/blog/2023/10/select-shortcut.png" width=20% height=20%><img src="https://cdn.jujimeizuo.cn/blog/2023/10/finish-automation.png" width=20% height=20%></center>

</details>

## Storing Data Files in GitHub Cache

<details>
Expand Down

0 comments on commit c93d995

Please sign in to comment.