timet 1.3.0 → 1.3.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 +39 -0
- data/README.md +1 -1
- data/lib/timet/application.rb +3 -2
- data/lib/timet/formatter.rb +23 -7
- data/lib/timet/version.rb +2 -2
- metadata +2 -5
- data/btc.png +0 -0
- data/monthly_report.webp +0 -0
- data/timet.webp +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1bb43c1123df04f10728b72d13245307f1d67d8c1e3234c84ade0cc03836517
|
4
|
+
data.tar.gz: b0f51950af5d3e6c0ac88ca8914194aa579b04cbc13fb3ae75e84d62bacd9cf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e835f9f66149d036d3d7528a7563e91af26e0577f5e60e4984ca0471f2758e21e6ce4b5b45d4a150ac7f1eb496ecd339a9b8abad2c86814934c5c9f588e93699
|
7
|
+
data.tar.gz: 9d0d081dd8190b5d3d30a13f5b1067f77e4ffb52a64ae4e1007ed80cedfd04ee26db0aeaef5b8cb4edbcc8e08f8e00686609953daeafdda335fa2ae7e595877c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,44 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [1.3.1] - 2024-10-24
|
4
|
+
|
5
|
+
**Improvements:**
|
6
|
+
|
7
|
+
- Refactor `print_header` and `print_blocks` methods for improved readability and formatting.
|
8
|
+
- Updated `print_header` method to use color codes for better visual distinction.
|
9
|
+
- Refactored `print_blocks` method to include date and week formatting:
|
10
|
+
- Formatted day names with two letters and applied color for weekends.
|
11
|
+
- Added week number formatting with underlines for new weeks.
|
12
|
+
- Printed date headers with week numbers, formatted dates, and day names.
|
13
|
+
- Printed time blocks for each hour from the start time to 23.
|
14
|
+
- Added a footer line for better visual separation.
|
15
|
+
- Update description in the `start` command for clarity.
|
16
|
+
- Bump version to 1.3.1 and update README image.
|
17
|
+
- Updated the version number in `lib/timet/version.rb` to 1.3.1.
|
18
|
+
- Updated the README.md to use a `.webp` image format for the "Buy me a coffee!" section.
|
19
|
+
- Removed the old `.png` image file.
|
20
|
+
- Updated the `.gemspec` file to exclude `.webp` files from the gem package.
|
21
|
+
- Updated the `Gemfile.lock` to reflect the new version number.
|
22
|
+
|
23
|
+
**Bug fixes:**
|
24
|
+
|
25
|
+
- Address missing file issue.
|
26
|
+
|
27
|
+
**Tasks:**
|
28
|
+
|
29
|
+
- Refactor `print_header` method.
|
30
|
+
- Refactor `print_blocks` method.
|
31
|
+
- Update `start` command description.
|
32
|
+
- Bump version to 1.3.1.
|
33
|
+
- Update README image format.
|
34
|
+
- Address missing file.
|
35
|
+
|
36
|
+
**Additional Considerations:**
|
37
|
+
|
38
|
+
- The changes in this pull request improve the overall user experience by enhancing the visual presentation of the time tracking report and updating the documentation.
|
39
|
+
- The version bump to 1.3.1 reflects the improvements and bug fixes made in this release.
|
40
|
+
- The updated README image format ensures better compatibility and performance.
|
41
|
+
|
3
42
|
## [1.3.0] - 2024-10-22
|
4
43
|
|
5
44
|
**Improvements:**
|
data/README.md
CHANGED
data/lib/timet/application.rb
CHANGED
@@ -35,7 +35,8 @@ module Timet
|
|
35
35
|
|
36
36
|
VALID_STATUSES_FOR_INSERTION = %i[no_items complete].freeze
|
37
37
|
|
38
|
-
desc "start [tag] --notes='[
|
38
|
+
desc "start [tag] --notes='' --pomodoro=[min]",
|
39
|
+
'Starts tracking time for a task labeled with the provided [tag], notes and "pomodoro time" in minutes (optional).'
|
39
40
|
option :notes, type: :string, desc: 'Add a note'
|
40
41
|
option :pomodoro, type: :numeric, desc: 'Pomodoro time in minutes'
|
41
42
|
# Starts a new tracking session with the given tag and optional notes.
|
@@ -127,7 +128,7 @@ module Timet
|
|
127
128
|
end
|
128
129
|
|
129
130
|
desc 'summary (su) [filter] [tag] --csv=csv_filename',
|
130
|
-
'
|
131
|
+
'[filter] => [today (t), yesterday (y), week (w), month (m), [start_date]..[end_date]] [tag]'
|
131
132
|
option :csv, type: :string, desc: 'Export to CSV file'
|
132
133
|
# Generates a summary of tracking items based on the provided filter and tag, and optionally exports the summary
|
133
134
|
# to a CSV file.
|
data/lib/timet/formatter.rb
CHANGED
@@ -178,10 +178,9 @@ module Timet
|
|
178
178
|
# If the start_time is outside this range, the output may not be as expected.
|
179
179
|
def print_header(start_time)
|
180
180
|
puts
|
181
|
-
print
|
181
|
+
print "\u001b[38;5;244m┌╴W ╴╴╴╴╴⏰ ╴╴╴╴╴╴┬\u001b[0m "
|
182
182
|
(start_time..23).each { |hour| print format('%02d', hour).ljust(4) }
|
183
|
-
|
184
|
-
puts
|
183
|
+
puts ''
|
185
184
|
end
|
186
185
|
|
187
186
|
# Prints the block characters for each hour in the time block chart.
|
@@ -204,13 +203,30 @@ module Timet
|
|
204
203
|
def print_blocks(time_block, colors, start_time)
|
205
204
|
return unless time_block
|
206
205
|
|
207
|
-
|
208
|
-
|
209
|
-
|
206
|
+
weeks = []
|
207
|
+
time_block.each_key do |date_string|
|
208
|
+
date = Date.parse(date_string)
|
209
|
+
day = date.strftime('%a')[0..1]
|
210
|
+
date1 = date_string
|
211
|
+
if %w[Sa Su].include?(day)
|
212
|
+
day = "\u001b[38;5;1m#{day}\u001b[0m"
|
213
|
+
date1 = "\u001b[38;5;1m#{date1}\u001b[0m"
|
214
|
+
end
|
215
|
+
|
216
|
+
weeks << date.cweek
|
217
|
+
n = weeks.size - 1
|
218
|
+
week = if (weeks[n] == weeks[n - 1]) && n.positive?
|
219
|
+
' '
|
220
|
+
else
|
221
|
+
"\e[4m#{weeks[n]}\e[0m"
|
222
|
+
end
|
223
|
+
puts "\u001b[38;5;244m┆ ┆\u001b[0m" if week != ' ' && n.positive?
|
224
|
+
print "\u001b[38;5;244m┆\u001b[0m#{week} #{date1} #{day} \u001b[38;5;244m┆\u001b[0m "
|
225
|
+
time_block_initial = time_block[date_string]
|
210
226
|
print_time_blocks(start_time, time_block_initial, colors)
|
211
227
|
puts
|
212
228
|
end
|
213
|
-
puts "\
|
229
|
+
puts "\u001b[38;5;244m└╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴╴┴\u001b[0m"
|
214
230
|
end
|
215
231
|
|
216
232
|
# Prints time blocks for each hour from the start time to 23.
|
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.3.
|
4
|
+
version: 1.3.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: 2024-10-
|
11
|
+
date: 2024-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -77,7 +77,6 @@ files:
|
|
77
77
|
- Rakefile
|
78
78
|
- bin/timet
|
79
79
|
- bin/tt
|
80
|
-
- btc.png
|
81
80
|
- lib/timet.rb
|
82
81
|
- lib/timet/application.rb
|
83
82
|
- lib/timet/application_helper.rb
|
@@ -89,9 +88,7 @@ files:
|
|
89
88
|
- lib/timet/time_report_helper.rb
|
90
89
|
- lib/timet/validation_edit_helper.rb
|
91
90
|
- lib/timet/version.rb
|
92
|
-
- monthly_report.webp
|
93
91
|
- sig/timet.rbs
|
94
|
-
- timet.webp
|
95
92
|
homepage: https://frankvielma.github.io/posts/timet-a-powerful-command-line-tool-for-tracking-your-time/
|
96
93
|
licenses:
|
97
94
|
- MIT
|
data/btc.png
DELETED
Binary file
|
data/monthly_report.webp
DELETED
Binary file
|
data/timet.webp
DELETED
Binary file
|