mirror of
https://github.com/wth461694678/text-block-timer.git
synced 2026-07-22 05:46:04 +00:00
- V1.0.4
1. ==Major Feature==:Now you can control the timer switch by the checkbox in the task front. 2. Improve the function of creating timers, now it will not directly expose the span's source code
This commit is contained in:
parent
69f0f5d4a5
commit
0c12def389
8 changed files with 1299 additions and 641 deletions
33
README.md
33
README.md
|
|
@ -13,8 +13,9 @@ A text block timing tool designed for Obsidian, allowing you to add a **count-up
|
|||
- ⏳ Real-time display of cumulative time cost.
|
||||
- 💾 Persistent storage of timing data.
|
||||
- 🔄 Users can optionally choose whether to continue timing when files or Obsidian is closed (by default, closing a file will not cause failure of the real-time stopwatch).
|
||||
- By modifying the task status, you can automatically trigger the start and update of the timer
|
||||
|
||||
## Usage
|
||||
## How to use
|
||||
|
||||
### 1. Command Palette + Shortcut (Recommended⭐️)
|
||||
|
||||
|
|
@ -24,13 +25,22 @@ A text block timing tool designed for Obsidian, allowing you to add a **count-up
|
|||
|
||||

|
||||
|
||||
### 2. Mouse Operations
|
||||
### 2. Mouse Operations (Not Recommended)
|
||||
|
||||
1. Right-click on a text line.
|
||||
2. Select "Start Timer," "Pause Timer," or "Resume Timer."
|
||||
|
||||

|
||||
|
||||
### 3. Control Timer by Task Status Automatically (Recommended⭐️)
|
||||
|
||||
1. For For Common Users, you can directly change the task status [ ] to trigger the start and update of the timer (Suits for everyone, however not convenient enough, especially for Windows users.)
|
||||
2. ⭐️For `Task Plugin` Users, you can trigger the start and update of timers by simply clicking the checkbox (Convenient but needs pre-settings)
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
## Custom Settings
|
||||
|
||||
Users can customize the following options in the plugin Settings:
|
||||
|
|
@ -58,8 +68,25 @@ After the user closes a file, all timers will stop immediately. However, if a fi
|
|||
Users can choose to insert a timer label either before or after the text block.
|
||||
<img src="https://github.com/wth461694678/text-block-timer/blob/main/demo/insert_position.png" width="100%" alt="">
|
||||
|
||||
|
||||
### 3. Control Timer by Task Status Automatically - Path Control
|
||||
|
||||
In the default settings, path control is disabled. When you only want to use the timer in specific folders, you can use a whitelist or blacklist to control it, which will only take effect in one of the two ways.
|
||||
|
||||
- Disable path control:this feature can always take place
|
||||
<img src="https://github.com/wth461694678/text-block-timer/blob/main/demo/pathControl_no.png" width="100%" alt="">
|
||||
|
||||
- Whitelist:only folders in the whitelist will work
|
||||
<img src="https://github.com/wth461694678/text-block-timer/blob/main/demo/pathControl_white.png" width="100%" alt="">
|
||||
|
||||
- Blacklist:folders in the blacklist will not work
|
||||
<img src="https://github.com/wth461694678/text-block-timer/blob/main/demo/pathControl_black.png" width="100%" alt="">
|
||||
|
||||
## Version Log:
|
||||
|
||||
- V1.0.4
|
||||
1. ==Major Feature==:Now you can control the timer switch by the checkbox in the task front.
|
||||
2. Improve the function of creating timers, now it will not directly expose the span's source code
|
||||
- V1.0.3
|
||||
1. ==Major Optimization==: Closing a file no longer causes the timer to fail. Users can freely choose whether to continue timing when the or Obsidian is closed (see custom settings).
|
||||
2. Added custom settings: Users can now choose the position to insert the timer (before or after texts).
|
||||
|
|
@ -75,4 +102,4 @@ Users can choose to insert a timer label either before or after the text block.
|
|||
## Development Information
|
||||
|
||||
- Developer: frankthwang
|
||||
- Version: 1.0.3
|
||||
- Version: 1.0.4
|
||||
50
README.zh.md
50
README.zh.md
|
|
@ -6,13 +6,14 @@
|
|||
|
||||
## 功能特性
|
||||
|
||||
<img src="https://github.com/wth461694678/text-block-timer/blob/main/demo/demo.gif" width="100%" alt="">
|
||||

|
||||
|
||||
- 为任意文本行添加计时器,支持同时执行多个计时器(正计时)
|
||||
- ▶️/⏸️ 支持开始、暂停、继续计时,支持任务分段耗时累计
|
||||
- ⏳ 实时显示累计时间
|
||||
- 💾 计时数据持久化保存
|
||||
- 🔄 可自由选择关闭文件、关闭Obsidian后是否持续计时 (默认设置下,关闭文件不会导致实时计时失效)
|
||||
- 修改任务状态,可以自动触发计时器的开始和更新
|
||||
|
||||
## 使用方法
|
||||
|
||||
|
|
@ -21,44 +22,79 @@
|
|||
1. 为命令 "Text Block Timer: Toggle timer" 配置快捷键,方便快速使用
|
||||
2. 当光标在某个文本块时,按下快捷键,即可实现timer的开始、暂停、继续操作
|
||||
3. 计时器会以 `【⏳00:00:00 】`格式显示在文本块的行首
|
||||
<img src="https://github.com/wth461694678/text-block-timer/blob/main/demo/command_shortcut.gif" width="80%" alt="">
|
||||
|
||||
### 2. 鼠标操作
|
||||

|
||||
|
||||
### 2. 鼠标操作(不推荐)
|
||||
|
||||
1. 在文本行上右键点击
|
||||
2. 选择"开始计时"、"暂停计时"或"继续计时"
|
||||
<img src="https://github.com/wth461694678/text-block-timer/blob/main/demo/right_click.gif" width="80%" alt="">
|
||||
|
||||

|
||||
|
||||
### 3. 通过任务状态自动控制(推荐⭐️)
|
||||
|
||||
1. 对于所有用户,可以直接通过修改特定任务前 [ ] 的状态来控制计时器的开关 (对所有用户都有效,但是不推荐,Windows用户操作起来比较麻烦)
|
||||
2. ⭐️对于 `Task Plugin`用户而言,通过恰当的设置,只需要点击任务前的 [ ] 即可完成控制 ()
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
## 自定义设置
|
||||
|
||||
用户可以在插件设置中自定义以下选项:
|
||||
|
||||
### 1. 关闭文件或Obsidian后是否继续计时
|
||||
|
||||
用户可以自由选择关闭文件或关闭Obsidian后是否继续计时。
|
||||
|
||||
#### 1.1 从不停止,除非用户手动停止
|
||||
#### 1.1 从不停止,除非用户手动停止
|
||||
|
||||
用户关闭文件、退出Obsidian后,计时器依然会“后台计时”,在下次打开文件时,会讲关闭期间的耗时计入计时器耗时,并自动恢复计时。
|
||||
|
||||
<img src="https://github.com/wth461694678/text-block-timer/blob/main/demo/settings_never.gif" width="100%" alt="">
|
||||
|
||||
#### 1.2 仅退出Obsidian时停止,关闭文件依然后台计时(推荐,默认选项)
|
||||
|
||||
用户关闭文件后,计时器依然会“后台计时”,在下次打开文件时,会讲关闭期间的耗时计入计时器耗时,并自动恢复计时。
|
||||
然而,用户退出Obsidian后,所有计时器会立即停止,防止用户忘记手动关闭计时器导致数据产生重大误差。
|
||||
|
||||
<img src="https://github.com/wth461694678/text-block-timer/blob/main/demo/settings_quit.gif" width="100%" alt="">
|
||||
|
||||
#### 1.3 关闭文件时立即停止
|
||||
|
||||
用户关闭文件后,所有计时器会立即停止,但在误关文件时,可能导致计时暂停。
|
||||
|
||||
<img src="https://github.com/wth461694678/text-block-timer/blob/main/demo/settings_close.gif" width="100%" alt="">
|
||||
|
||||
### 2. 插入位置
|
||||
用户可以选择在文本块的前面或后面插入计时器标签。
|
||||
|
||||
用户可以选择在文本块的前面或后面插入计时器标签。对于Day Planner用户而言,推荐插入在文本块后面。
|
||||
|
||||
<img src="https://github.com/wth461694678/text-block-timer/blob/main/demo/insert_position.png" width="100%" alt="">
|
||||
|
||||
### 3. 通过任务状态自动控制计时器 - 路径控制
|
||||
|
||||
在默认设置下,路径控制是关闭的。当你只希望在部分文件夹下使用该功能,你可以通过白名单或黑名单的方式进行控制,这两种方式只会生效其中一种。
|
||||
|
||||
- 不控制:所有文件夹下都可以使用该功能
|
||||
<img src="https://github.com/wth461694678/text-block-timer/blob/main/demo/pathControl_no.png" width="100%" alt="">
|
||||
|
||||
- 白名单:只有在白名单中的文件夹下,才会生效
|
||||
<img src="https://github.com/wth461694678/text-block-timer/blob/main/demo/pathControl_white.png" width="100%" alt="">
|
||||
|
||||
- 黑名单:在黑名单中的文件夹下,不会生效
|
||||
<img src="https://github.com/wth461694678/text-block-timer/blob/main/demo/pathControl_black.png" width="100%" alt="">
|
||||
|
||||
|
||||
|
||||
|
||||
## 版本日志:
|
||||
|
||||
- V1.0.4
|
||||
1. ==重大功能==:现在你可以通过任务前的 [ ] 勾选框来控制计时器的开关
|
||||
2. 优化了新建计时器的功能,现在不会直接暴露span源代码
|
||||
- V1.0.3
|
||||
1. ==重大优化==:现在关闭文件不会导致计时器失效,用户可自由选择关闭文件或关闭Obsidian后是否持续计时(见自定义设置)
|
||||
2. 增加自定义设置:现在用户可自由选择插入文本块位置(文本前或文本后)
|
||||
|
|
@ -74,4 +110,4 @@
|
|||
## 开发信息
|
||||
|
||||
- 开发者: frankthwang
|
||||
- 版本: 1.0.3
|
||||
- 版本: 1.0.4
|
||||
|
|
|
|||
BIN
demo/controlbycheckbox.gif
Normal file
BIN
demo/controlbycheckbox.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 694 KiB |
BIN
demo/pathControl_black.gif
Normal file
BIN
demo/pathControl_black.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 994 KiB |
BIN
demo/pathControl_no.gif
Normal file
BIN
demo/pathControl_no.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1,010 KiB |
BIN
demo/pathControl_white.gif
Normal file
BIN
demo/pathControl_white.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 826 KiB |
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "text-block-timer",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"minAppVersion": "1.8.9",
|
||||
"name": "Text Block Timer",
|
||||
"author": "frankthwang",
|
||||
|
|
|
|||
Loading…
Reference in a new issue