Skip to content

Commit

Permalink
Merge pull request #9 from Zuoqiu-Yingyi/dev
Browse files Browse the repository at this point in the history
chore: release v0.2.0
  • Loading branch information
Zuoqiu-Yingyi authored Aug 18, 2023
2 parents 5e2e2ae + 0f7790e commit d77e802
Show file tree
Hide file tree
Showing 15 changed files with 669 additions and 62 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ permissions:
pull-requests: write

env:
PACKAGE_NAME: custom-fonts
PACKAGE_VERSION: 0.1.2
PACKAGE_NAME: wakatime
PACKAGE_VERSION: 0.2.0

jobs:
release-please:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wakatime",
"private": true,
"version": "0.1.2",
"version": "0.2.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -17,7 +17,7 @@
"svelte": "^4.2.0",
"svelte-check": "^3.5.0",
"svelte-preprocess-less": "^0.4.0",
"tslib": "^2.6.1",
"tslib": "^2.6.2",
"typescript": "^5.1.6",
"vite": "^4.4.9"
},
Expand Down
26 changes: 25 additions & 1 deletion public/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ A plugin for [SiYuan Note](https://github.com/siyuan-note/siyuan) that can use [

* `Wakapi/WakaTime > Service Settings > Hide Notebook Name`
* `Wakapi/WakaTime > Service Settings > Hide Document Title`
* Customize the inclusion list to set a whitelist

* `Wakapi/WakaTime > Service Settings > ID Inclusion List`
* `Wakapi/WakaTime > Service Settings > Inclusion List`
* Customize the exclusion list to set a blacklist

* `Wakapi/WakaTime > Service Settings > ID Exclusion List`
* `Wakapi/WakaTime > Service Settings > Exclusion List`

## INTRODUCTION

Expand All @@ -56,6 +64,13 @@ A plugin for [SiYuan Note](https://github.com/siyuan-note/siyuan) that can use [
* After clicking this button, a confirmation dialog will appear.

* After clicking the confirmation button in the dialog, all options for this plugin will be reset to their default values, and the current interface will be automatically refreshed.
* `Clean offline cache`

* Delete all offline cache files
* Cache file directory: `workspace/temp/.wakatime/cache`
* After clicking this button, a confirmation dialog box will appear

* After clicking the confirm button on the dialog box, the cache file directory will be deleted and the current interface will be automatically refreshed.
* `Wakapi/WakaTime`: Configure the functionality and service of `Wakapi` or `WakaTime`

* `General`
Expand Down Expand Up @@ -158,14 +173,23 @@ A plugin for [SiYuan Note](https://github.com/siyuan-note/siyuan) that can use [
* Unit: seconds
* `Hide Notebook Name`

* Whether to hide the notebook name in the submitted activity information.
* Whether to hide the notebook name in the submitted action information.
* Corresponds to the `hide_branch_names` configuration option in the `.wakatime.cfg` configuration file of `Wakapi/WakaTime`.
* If enabled, all <kbd>Notebook Name</kbd> in the submitted information will be replaced with <kbd>Notebook ID</kbd>.
* `Hide Document Title`

* Whether to hide the document title in the submitted activity information.
* Corresponds to the `hide_file_names` configuration option in the `.wakatime.cfg` configuration file of `Wakapi/WakaTime`.
* If enabled, all <kbd>Document Title</kbd> in the submitted information will be replaced with <kbd>Block ID</kbd>.
* `Offline caching`

* Whether to cache action information in local files
* Conditions for triggering offline caching

* Disable `Wakapi/WakaTime > General > Heartbeat Connections`
* Or unable to access `Wakapi/WakaTime` service
* Cache file directory: `workspace/temp/.wakatime/cache`
* Corresponds to the `offline` configuration option in the `.wakatime.cfg` configuration file of `Wakapi/WakaTime`.
* `ID Include List`

* Only submit documents whose ID path includes the list field.
Expand Down
26 changes: 25 additions & 1 deletion public/README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@

* `Wakapi/WakaTime > 服务设置 > 隐藏笔记本名称`
* `Wakapi/WakaTime > 服务设置 > 隐藏文档标题`
* 自定义包含列表以设置白名单

* `Wakapi/WakaTime > 服务设置 > ID 包含列表`
* `Wakapi/WakaTime > 服务设置 > 包含列表`
* 自定义排除列表以设置黑名单

* `Wakapi/WakaTime > 服务设置 > ID 排除列表`
* `Wakapi/WakaTime > 服务设置 > 排除列表`

## 介绍

Expand All @@ -56,6 +64,13 @@
* 点击该按钮后会弹出确认对话框

* 点击对话框确认按钮后会重置本插件所有选项为默认选项, 之后会自动刷新当前界面
* `清理离线缓存`

* 删除所有的离线缓存文件
* 缓存文件目录: `工作空间/temp/.wakatime/cache`
* 点击该按钮后会弹出确认对话框

* 点击对话框确认按钮后会删除缓存文件目录, 之后会自动刷新当前界面
* `Wakapi/WakaTime`: 配置 `Wakapi``WakaTime` 功能与服务

* `常规设置`
Expand Down Expand Up @@ -166,6 +181,15 @@
* 在提交的操作活动信息中是否隐藏文档标题
* 对应 `Wakapi/WakaTime` 配置文件 `.wakatime.cfg` 中的 `hide_file_names` 配置项
* 若开启, 则提交的信息中所有 <kbd>文档标题</kbd> 都替换为 <kbd>文档块 ID</kbd>
* `离线缓存`

* 是否将活动信息缓存在本地文件中
* 触发离线缓存的条件

* 关闭 `Wakapi/WakaTime > 常规设置 > 心跳连接`
* 或无法访问 `Wakapi/WakaTime` 服务
* 缓存文件目录: `工作空间/temp/.wakatime/cache`
* 对应 `Wakapi/WakaTime` 配置文件 `.wakatime.cfg` 中的 `offline` 配置项
* `ID 包含列表`

* 仅提交 ID 路径中包含列表字段的文档
Expand Down Expand Up @@ -245,7 +269,7 @@
```javascript
path.includes("请从这里开始") && /^思源笔记用户指南\/请从这里开始/.test(path)
```
* 排除列表
* `排除列表`

* 提交时排除路径中包含列表字段的文档
* 对应 `Wakapi/WakaTime` 配置文件 `.wakatime.cfg` 中的 `exclude` 配置项
Expand Down
25 changes: 17 additions & 8 deletions public/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
"displayName": "WakaTime",
"settings": {
"generalSettings": {
"cleanCache": {
"description": "Delete all offline cache files (page refresh after deletion)",
"text": "Clean",
"title": "Clean offline cache"
},
"reset": {
"description": "Reset all settings options to default options (refresh page after reset)",
"text": "Reset",
Expand All @@ -12,15 +17,15 @@
"wakatimeSettings": {
"generalTab": {
"editCategory": {
"description": "Activity type tags for editing operations",
"description": "Action type tags for editing operations",
"title": "Edit operation tags"
},
"heartbeats": {
"description": "Enable to submit activity information to Wakapi/WakaTime service while viewing/editing documents",
"description": "Enable to submit action information to Wakapi/WakaTime service while viewing/editing documents",
"title": "Heartbeat connection"
},
"interval": {
"description": "Time interval (in seconds) to push editing activities to Wakapi/WakaTime server",
"description": "Time interval (in seconds) to push editing action information to Wakapi/WakaTime server",
"title": "Push interval"
},
"language": {
Expand All @@ -33,7 +38,7 @@
},
"title": "General",
"viewCategory": {
"description": "Activity type tags for viewing operations",
"description": "Action type tags for viewing operations",
"title": "View operation tags"
}
},
Expand All @@ -47,12 +52,12 @@
"title": "API URL"
},
"exclude": {
"description": "Exclude documents with fields listed in the submission path.<br/>Each entry should be on a separate line. Use <span data-type='code'>/</span> to enclose regular expressions.<br/>Corresponds to the <span data-type='code'>exclude</span> option in the Wakapi/WakaTime configuration.",
"description": "Exclude documents with fields listed in the submission path.<br/>Each entry should be on a separate line. Use <code class='fn__code'>/</code> to enclose regular expressions.<br/>Corresponds to the <code class='fn__code'>exclude</code> option in the Wakapi/WakaTime configuration.",
"placeholder": "Exclude no notebooks or documents",
"title": "Exclude List"
},
"excludeID": {
"description": "Exclude documents with fields listed in the submission ID path.<br/>Each entry should be on a separate line. Use <span data-type='code'>/</span> to enclose regular expressions.",
"description": "Exclude documents with fields listed in the submission ID path.<br/>Each entry should be on a separate line. Use <code class='fn__code'>/</code> to enclose regular expressions.",
"placeholder": "Exclude no notebooks or documents",
"title": "ID Exclude List"
},
Expand All @@ -69,15 +74,19 @@
"title": "Hostname"
},
"include": {
"description": "Only include documents with fields listed in the submission path.<br/>Each entry should be on a separate line. Use <span data-type='code'>/</span> to enclose regular expressions.<br/>Corresponds to the <span data-type='code'>include</span> option in the Wakapi/WakaTime configuration.",
"description": "Only include documents with fields listed in the submission path.<br/>Each entry should be on a separate line. Use <code class='fn__code'>/</code> to enclose regular expressions.<br/>Corresponds to the <code class='fn__code'>include</code> option in the Wakapi/WakaTime configuration.",
"placeholder": "Include all notebooks and documents",
"title": "Include List"
},
"includeID": {
"description": "Only include documents with fields listed in the submission ID path.<br/>Each entry should be on a separate line. Use <span data-type='code'>/</span> to enclose regular expressions.",
"description": "Only include documents with fields listed in the submission ID path.<br/>Each entry should be on a separate line. Use <code class='fn__code'>/</code> to enclose regular expressions.",
"placeholder": "Include all notebooks and documents",
"title": "ID Include List"
},
"offline": {
"description": "Whether to enable offline caching<br/>When the Wakapi/WakaTime service accesses abnormally or the heartbeat connection is not enabled, the action information will be cached to the ${1} directory<br/>Corresponds to the <code class='fn__code'>offline</code> option in the Wakapi/WakaTime configuration.",
"title": "Offline caching"
},
"test": {
"description": "Test if connected to Wakapi/WakaTime service correctly",
"messages": {
Expand Down
65 changes: 37 additions & 28 deletions public/i18n/zh_CHT.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,87 +2,96 @@
"displayName": "WakaTime",
"settings": {
"generalSettings": {
"cleanCache": {
"description": "刪除所有離線緩存文件(刪除後將刷新頁面)",
"text": "清理",
"title": "清理離線緩存"
},
"reset": {
"description": "重置所有設定選項為預設選項(重置後將重新整理頁面",
"description": "重置所有設置選項為默認選項(重置後將刷新頁面",
"text": "重置",
"title": "重置設定選項"
"title": "重置設置選項"
},
"title": "常規設定"
"title": "常規設置"
},
"wakatimeSettings": {
"generalTab": {
"editCategory": {
"description": "為編輯操作設定的活動型別標籤",
"description": "為編輯操作設置的活動類型標籤",
"title": "編輯操作標籤"
},
"heartbeats": {
"description": "開啟後將在檢視/編輯文件時向 Wakapi/WakaTime 服務提交活動資訊",
"title": "心跳連線"
"description": "開啟後將在查看/編輯文檔時向 Wakapi/WakaTime 服務提交活動信息",
"title": "心跳連接"
},
"interval": {
"description": "將編輯活動推送到 Wakapi/WakaTime 伺服器的時間間隔(單位:秒)",
"description": "將編輯活動推送到 Wakapi/WakaTime 服務器的時間間隔(單位:秒)",
"title": "推送時間間隔"
},
"language": {
"description": "自定義思原始檔語言名稱<br/>對應 Wakapi/WakaTime 統計中的 <code class='fn__code'>Languages</code> 項",
"description": "自定義思源文件語言名稱<br/>對應 Wakapi/WakaTime 統計中的 <code class='fn__code'>Languages</code> 項",
"title": "語言名稱"
},
"project": {
"description": "自定義當前工作空間名稱<br/>對應 Wakapi/WakaTime 統計中的 <code class='fn__code'>Projects</code> 項",
"title": "项目名稱"
"title": "項目名稱"
},
"title": "常規設定",
"title": "常規設置",
"viewCategory": {
"description": "為檢視操作設定的活動型別標籤",
"title": "檢視操作標籤"
"description": "為查看操作設置的活動類型標籤",
"title": "查看操作標籤"
}
},
"serviceTab": {
"apiKey": {
"description": "Wakapi/WakaTime API 金鑰<br/>對應 Wakapi/WakaTime 配置中的 <code class='fn__code'>api_key</code>",
"title": "API 金鑰"
"description": "Wakapi/WakaTime API 密鑰<br/>對應 Wakapi/WakaTime 配置中的 <code class='fn__code'>api_key</code>",
"title": "API 密鑰"
},
"apiURL": {
"description": "Wakapi/WakaTime API URL<br/>對應 Wakapi/WakaTime 配置中的 <code class='fn__code'>api_url</code>",
"title": "API URL"
},
"exclude": {
"description": "提交時排除路徑中包含列表欄位的文件<br/>每行一條記錄,若為正則表示式則需要使用 <code class='fn__code'>/</code> 包裹<br/>對應 Wakapi/WakaTime 配置中的 <code class='fn__code'>exclude</code>",
"placeholder": "不排除任何筆記本與文件",
"description": "提交時排除路徑中包含列表字段的文檔<br/>每行一條記錄,若為正則表達式則需要使用 <code class='fn__code'>/</code> 包裹<br/>對應 Wakapi/WakaTime 配置中的 <code class='fn__code'>exclude</code>",
"placeholder": "不排除任何筆記本與文檔",
"title": "排除列表"
},
"excludeID": {
"description": "提交時排除 ID 路徑中包含列表欄位的文件<br/>每行一條記錄,若為正則表示式則需要使用 <code class='fn__code'>/</code> 包裹",
"placeholder": "不排除任何筆記本與文件",
"description": "提交時排除 ID 路徑中包含列表字段的文檔<br/>每行一條記錄,若為正則表達式則需要使用 <code class='fn__code'>/</code> 包裹",
"placeholder": "不排除任何筆記本與文檔",
"title": "ID 排除列表"
},
"hide_branch_names": {
"description": "是否隱藏筆記本名稱,開啟後將使用筆記本 ID 替換筆記本名稱<br/>對應 Wakapi/WakaTime 配置中的 <code class='fn__code'>hide_branch_names</code>",
"title": "隱藏筆記本名稱"
},
"hide_file_names": {
"description": "是否隱藏文件標題,開啟後將使用文件塊 ID 替換文件標題<br/>對應 Wakapi/WakaTime 配置中的 <code class='fn__code'>hide_file_names</code>",
"title": "隱藏文件標題"
"description": "是否隱藏文檔標題,開啟後將使用文檔塊 ID 替換文檔標題<br/>對應 Wakapi/WakaTime 配置中的 <code class='fn__code'>hide_file_names</code>",
"title": "隱藏文檔標題"
},
"hostname": {
"description": "自定義當前主機名稱<br/>對應 Wakapi/WakaTime 配置中的 <code class='fn__code'>hostname</code>",
"title": "主機名稱"
},
"include": {
"description": "僅提交路徑中包含列表欄位的文件<br/>每行一條記錄,若為正則表示式則需要使用 <code class='fn__code'>/</code> 包裹<br/>對應 Wakapi/WakaTime 配置中的 <code class='fn__code'>include</code>",
"placeholder": "包含所有筆記本與文件",
"description": "僅提交路徑中包含列表字段的文檔<br/>每行一條記錄,若為正則表達式則需要使用 <code class='fn__code'>/</code> 包裹<br/>對應 Wakapi/WakaTime 配置中的 <code class='fn__code'>include</code>",
"placeholder": "包含所有筆記本與文檔",
"title": "包含列表"
},
"includeID": {
"description": "僅提交 ID 路徑中包含列表欄位的文件<br/>每行一條記錄,若為正則表示式則需要使用 <code class='fn__code'>/</code> 包裹",
"placeholder": "包含所有筆記本與文件",
"description": "僅提交 ID 路徑中包含列表字段的文檔<br/>每行一條記錄,若為正則表達式則需要使用 <code class='fn__code'>/</code> 包裹",
"placeholder": "包含所有筆記本與文檔",
"title": "ID 包含列表"
},
"offline": {
"description": "是否開啟離線緩存功能<br/>開啟後當 Wakapi/WakaTime 服務訪問異常或未開啟心跳連接時會將活動信息緩存至 ${1} 目錄<br/>對應 Wakapi/WakaTime 配置中的 <code class='fn__code'>offline</code>",
"title": "離線緩存"
},
"test": {
"description": "測試是否正確連線到 Wakapi/WakaTime 服務",
"description": "測試是否正確連接到 Wakapi/WakaTime 服務",
"messages": {
"error": "無法與 ${1} 服務建立連線",
"success": "與 ${1} 服務的連線正常"
"error": "無法與 ${1} 服務建立連接",
"success": "與 ${1} 服務的連接正常"
},
"text": "測試",
"title": "測試 Wakapi/WakaTime 服務"
Expand All @@ -91,7 +100,7 @@
"description": "Wakapi/WakaTime API 請求超時時間<br/>對應 Wakapi/WakaTime 配置中的 <code class='fn__code'>timeout</code>",
"title": "超時時間"
},
"title": "服務設定"
"title": "服務設置"
},
"title": "Wakapi/WakaTime"
}
Expand Down
Loading

0 comments on commit d77e802

Please sign in to comment.