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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 822542486f30f170aa48dccd0577637caed0010047b085022653f3ae4d0cb848
4
- data.tar.gz: 96b166cdd9ac9fe69ee546fec4d68e47d113df05f986b4aff61cc71358c1c9ea
3
+ metadata.gz: f1bb43c1123df04f10728b72d13245307f1d67d8c1e3234c84ade0cc03836517
4
+ data.tar.gz: b0f51950af5d3e6c0ac88ca8914194aa579b04cbc13fb3ae75e84d62bacd9cf2
5
5
  SHA512:
6
- metadata.gz: 0c950e2ff135ba0f665a70960c0389a55ac83ccf863dbdcee219d83d4fbc1939b79411c6e549e082f8b0abc1e9df223079dc5f784bf466f18a8ec9a7d52be039
7
- data.tar.gz: 4d76b845a5b3af8ad142e8a1edb65309f9b637b755af129401f7fdcfcc6635c1deabb37665302649fc3eaa3f4cf73f2212114111bc594dbdf6e62b5d1956c7ed
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
@@ -238,7 +238,7 @@ Many people have contacted me asking how to contribute. Any contribution, from a
238
238
  bc1qkg9me2jsuhpzu2hp9kkpxagwtf9ewnyfl4kszl
239
239
  ```
240
240
 
241
- ![Buy me a coffee!](btc.png)
241
+ ![Buy me a coffee!](btc.webp)
242
242
 
243
243
  ---
244
244
 
@@ -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='[notes]'", 'Start time tracking for a specific tag with optional 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
- ' [filter] => [today (t), yesterday (y), week (w), month (m), [start_date]..[end_date]] [tag]'
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.
@@ -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
- print ']'
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
- time_block.each_key do |item|
208
- print "#{item} "
209
- time_block_initial = time_block[item]
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 "\n"
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
@@ -6,6 +6,6 @@ module Timet
6
6
  # @return [String] The version number in the format 'major.minor.patch'.
7
7
  #
8
8
  # @example Get the version of the Timet application
9
- # Timet::VERSION # => '1.3.0'
10
- VERSION = '1.3.0'
9
+ # Timet::VERSION # => '1.3.1'
10
+ VERSION = '1.3.1'
11
11
  end
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.0
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-22 00:00:00.000000000 Z
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