timet 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +4 -2
- data/lib/timet/application.rb +3 -1
- data/lib/timet/application_helper.rb +2 -1
- data/lib/timet/time_report.rb +11 -8
- data/lib/timet/version.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a2aba5642b2c8c60f5ef5b606723afe9ffe94552490c320ab232e5b0cf23a94
|
4
|
+
data.tar.gz: a8bd210b3ea489a562e567e879c08cf37f113fae09c3126e2ef39840574451d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eee39e94ae55bc98dbcb0a48ee61ecd9833a0e6a6c4837994dfcef6609fb2dfa5e0db379551b80c9565c9db9d12ea6915d7d15385d0bff12249609536184ea57
|
7
|
+
data.tar.gz: 1f65a58025fc48be1ead36f74c8a20990015f7e40b3b4ef754bd6ea395ff784d75d4d8be4ced8ab25ebf3349b36f32318b278f5809d9abe33d46037c333f81a9
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## [1.6.1] - 2025-10-10
|
2
|
+
|
3
|
+
**New Features:**
|
4
|
+
|
5
|
+
- **Search Option for Summary Command:** Introduced a new `--search` option for the `summary` command, allowing users to filter time tracking reports by tags or notes.
|
6
|
+
- **Discord Integration:** Added support for sending notifications to Discord channels upon Pomodoro timer completion.
|
7
|
+
|
8
|
+
**Improvements:**
|
9
|
+
|
10
|
+
- **Dependency Updates:** Updated `aws-partitions`, `aws-sdk-kms`, `aws-sdk-s3`, `bigdecimal`, `httparty`, `icalendar`, `json`, `multi_xml`, `prism`, and `rubocop` to their latest versions for better performance and security.
|
11
|
+
- **README Updates:** Added new examples for the `--search` option and updated the project homepage URL.
|
12
|
+
- **Time Report Filtering:** Enhanced `TimeReport` to incorporate the `--search` option for filtering items by tag or notes.
|
13
|
+
|
14
|
+
|
1
15
|
## [1.6.0] - 2025-09-24
|
2
16
|
|
3
17
|
**New Features:**
|
data/README.md
CHANGED
@@ -38,6 +38,7 @@
|
|
38
38
|
- **Enhanced Summary Report:** Provides a detailed, color-coded explanation of tag distribution, including percentages, total duration, average duration, and standard deviation, via the `--report` option in the `summary` command.
|
39
39
|
- **iCalendar Export:** Easily export your time tracking data to iCalendar format for integration with calendar applications.
|
40
40
|
- **S3 Cloud Backup:** Seamlessly backup and sync your time tracking data with S3-compatible storage services, providing an additional layer of data protection and accessibility.
|
41
|
+
- **Discord Integration:** Receive notifications in your Discord channels upon Pomodoro timer completion, enhancing real-time productivity tracking.
|
41
42
|
|
42
43
|
## Examples:
|
43
44
|
|
@@ -106,9 +107,9 @@ gem install timet
|
|
106
107
|
- **Focus:** Encourages disciplined work practices.
|
107
108
|
- **Productivity:** Helps achieve higher productivity and better time management.
|
108
109
|
|
109
|
-
### Discord Integration
|
110
|
+
### Discord Integration
|
110
111
|
|
111
|
-
Timet now supports sending notifications to Discord channels upon Pomodoro timer completion. To enable this feature, you need to configure a webhook in your Discord channel and export the webhook URL as an environment variable.
|
112
|
+
Timet now supports sending notifications to Discord channels upon Pomodoro timer completion. To enable this feature, you need to configure a webhook in your Discord channel and export the webhook URL as an environment variable.
|
112
113
|
|
113
114
|
#### Setup:
|
114
115
|
|
@@ -228,6 +229,7 @@ Once configured, Timet will automatically send a notification to your Discord ch
|
|
228
229
|
| `timet su t --csv=[filename]` | Display a report of tracked time for today and export to CSV file | `timet su t --csv=file.csv` |
|
229
230
|
| `timet su w --ics=[filename]` | Display a report of tracked time for week and export to iCalendar file | `timet su w --ics=file.csv` |
|
230
231
|
| `timet su t --report` | Display a detailed report of tag distribution for today. | `timet su t --report` |
|
232
|
+
| `timet summary [time_scope] --search=[query]`| Display a report of tracked time filtered by tag or notes. | `timet su week --search="bug"` |
|
231
233
|
| `timet delete [id]` | Delete a task by its ID. | `timet d [id]` |
|
232
234
|
| `timet cancel` | Cancel active time tracking. | `timet c` |
|
233
235
|
| `timet edit [id]` | Update a task's notes, tag, start, or end fields. | `timet e [id]` |
|
data/lib/timet/application.rb
CHANGED
@@ -206,10 +206,12 @@ Examples:
|
|
206
206
|
> tt su yesterday [today (t), yesterday (y), week (w), month (m)]
|
207
207
|
> tt su 2024-10-03..2024-10-20
|
208
208
|
> tt su month --csv=myfile
|
209
|
-
> tt su week --csv=mycalendar
|
209
|
+
> tt su week --csv=mycalendar
|
210
|
+
> tt su week --search "bug"'
|
210
211
|
option :csv, type: :string, desc: 'Export to CSV'
|
211
212
|
option :ics, type: :string, desc: 'Export to iCalendar'
|
212
213
|
option :report, type: :string, desc: 'Display report'
|
214
|
+
option :search, type: :string, desc: 'Filter by tag or notes'
|
213
215
|
# Generates a summary of tracking items based on the provided time_scope and tag, and optionally exports the summary
|
214
216
|
# to a CSV file and/or an iCalendar file.
|
215
217
|
#
|
data/lib/timet/time_report.rb
CHANGED
@@ -60,7 +60,8 @@ module Timet
|
|
60
60
|
@csv_filename = options[:csv]
|
61
61
|
@ics_filename = options[:ics]
|
62
62
|
@filter = formatted_filter(options[:filter])
|
63
|
-
@
|
63
|
+
@search_query = options[:search]
|
64
|
+
@items = options[:filter] ? filter_items(@filter, options[:tag], @search_query) : @db.all_items
|
64
65
|
@table = Table.new(@filter, @items, @db)
|
65
66
|
end
|
66
67
|
|
@@ -176,13 +177,13 @@ module Timet
|
|
176
177
|
# filter_items('2021-10-01..2021-10-31', 'work')
|
177
178
|
#
|
178
179
|
# @note The method filters the items based on the specified date range and tag.
|
179
|
-
def filter_items(filter, tag)
|
180
|
+
def filter_items(filter, tag, search_query)
|
180
181
|
if Timet::Utils.date_ranges.key?(filter)
|
181
182
|
start_date, end_date = Timet::Utils.date_ranges[filter]
|
182
|
-
filter_by_date_range(start_date, end_date, tag)
|
183
|
+
filter_by_date_range(start_date, end_date, tag, search_query)
|
183
184
|
elsif Timet::Utils.valid_date_format?(filter)
|
184
185
|
start_date, end_date = filter.split('..').map { |x| Date.parse(x) }
|
185
|
-
filter_by_date_range(start_date, end_date, tag)
|
186
|
+
filter_by_date_range(start_date, end_date, tag, search_query)
|
186
187
|
else
|
187
188
|
puts 'Invalid filter. Supported filters: today, yesterday, week, month'
|
188
189
|
[]
|
@@ -201,15 +202,17 @@ module Timet
|
|
201
202
|
# filter_by_date_range(Date.new(2021, 10, 1), Date.new(2021, 10, 31), 'work')
|
202
203
|
#
|
203
204
|
# @note The method filters the items based on the specified date range and tag.
|
204
|
-
def filter_by_date_range(start_date, end_date = nil, tag = nil)
|
205
|
+
def filter_by_date_range(start_date, end_date = nil, tag = nil, search_query = nil)
|
205
206
|
start_time = TimeHelper.date_to_timestamp(start_date)
|
206
207
|
end_time = TimeHelper.calculate_end_time(start_date, end_date)
|
207
|
-
|
208
|
+
query_parts = [
|
208
209
|
"start >= #{start_time}",
|
209
210
|
"start < #{end_time}",
|
210
|
-
"tag like '%#{tag}%'",
|
211
211
|
'(deleted IS NULL OR deleted = 0)'
|
212
|
-
]
|
212
|
+
]
|
213
|
+
query_parts << "tag like '%#{tag}%'" if tag
|
214
|
+
query_parts << "(tag LIKE '%#{search_query}%' OR notes LIKE '%#{search_query}%')" if search_query
|
215
|
+
query = query_parts.join(' and ')
|
213
216
|
@db.execute_sql(
|
214
217
|
"select * from items where #{query} ORDER BY id DESC"
|
215
218
|
)
|
data/lib/timet/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Vielma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -159,11 +159,11 @@ files:
|
|
159
159
|
- lib/timet/version.rb
|
160
160
|
- lib/timet/week_info.rb
|
161
161
|
- sig/timet.rbs
|
162
|
-
homepage: https://frankv.top
|
162
|
+
homepage: https://timet.frankv.top
|
163
163
|
licenses:
|
164
164
|
- MIT
|
165
165
|
metadata:
|
166
|
-
homepage_uri: https://frankv.top
|
166
|
+
homepage_uri: https://timet.frankv.top
|
167
167
|
source_code_uri: https://github.com/frankvielma/timet
|
168
168
|
changelog_uri: https://github.com/frankvielma/timet/blob/main/CHANGELOG.md
|
169
169
|
documentation_uri: https://rubydoc.info/gems/timet
|