appydave-tools 0.43.0 → 0.44.0

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: abc6dfb0d67bcfeae2ed2bd59c51e5926b35948c57957226975a19f02ab835b1
4
- data.tar.gz: dfb7b9e5a59260a87a9741edee11d2eb91cde891bf724ab7e312d40cdce78d7d
3
+ metadata.gz: '048d2c3c2d7794aedd8dc635545cf6d8d25839fc53ef961493eea00f01b190d1'
4
+ data.tar.gz: 0aaa8b8a8ac1bf2dac8fa820c77393c0d064560eef8a24a5cd244fe3d35f947e
5
5
  SHA512:
6
- metadata.gz: 494ba66d882da3ed30f0ae7adb93a1459d45b550aca1f04d15d636b2fac16dc423f2a94125dbf0489cb42b662d859d7da915a110adb2a61248f9728d8f1e273f
7
- data.tar.gz: b3d7dae675807d99fe02c612eb25fc6d0627e4eb34af4da153c4e7c56b242b23589b0711e0ba15120be4afb1eb7c797716fdfdbb4c92776e43680a70dff28478
6
+ metadata.gz: c2d7411b7b375d2245af75ec9c4195704b99e77fb6f0df3e8713c0a07f060894b4f79c971eb15b8206a9ca0dd0bbb82c5e7c86cf35c3e77acbb4678abcc299a2
7
+ data.tar.gz: 2070d581ea14c80dac4f11b3a4ec3f0a0fde2b8f17ce08d99ead29cd06358b11ef05b7d285bc83f66d09f4a444c2c7d2109db394a46cc6fb5fc29f639e7122ba
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [0.43.0](https://github.com/appydave/appydave-tools/compare/v0.42.0...v0.43.0) (2025-11-21)
2
+
3
+
4
+ ### Features
5
+
6
+ * improve DAM error messages with helpful hints and match counts ([bb4e71e](https://github.com/appydave/appydave-tools/commit/bb4e71ea064b131b7df05e61e98eefc858cbb610))
7
+
1
8
  # [0.42.0](https://github.com/appydave/appydave-tools/compare/v0.41.0...v0.42.0) (2025-11-21)
2
9
 
3
10
 
@@ -80,22 +80,25 @@ module Appydave
80
80
  name: project,
81
81
  path: project_path,
82
82
  size: size,
83
- modified: modified
83
+ modified: modified,
84
+ age: format_age(modified),
85
+ stale: stale?(modified)
84
86
  }
85
87
  end
86
88
 
87
89
  # Print table header
88
90
  puts "Projects in #{brand}:"
89
- puts 'PROJECT SIZE LAST MODIFIED PATH'
91
+ puts 'PROJECT SIZE AGE PATH'
90
92
  puts '-' * 120
91
93
 
92
94
  # Print table rows
93
95
  project_data.each do |data|
96
+ age_display = data[:stale] ? "#{data[:age]} ⚠️" : data[:age]
94
97
  puts format(
95
- '%-45s %12s %20s %s',
98
+ '%-45s %12s %15s %s',
96
99
  data[:name],
97
100
  format_size(data[:size]),
98
- format_date(data[:modified]),
101
+ age_display,
99
102
  shorten_path(data[:path])
100
103
  )
101
104
  end
@@ -131,23 +134,26 @@ module Appydave
131
134
  name: project,
132
135
  path: project_path,
133
136
  size: size,
134
- modified: modified
137
+ modified: modified,
138
+ age: format_age(modified),
139
+ stale: stale?(modified)
135
140
  }
136
141
  end
137
142
 
138
143
  # Print table header
139
144
  match_count = matches.size
140
145
  puts "#{match_count} project#{'s' if match_count != 1} matching '#{pattern}' in #{brand}:"
141
- puts 'PROJECT SIZE LAST MODIFIED PATH'
146
+ puts 'PROJECT SIZE AGE PATH'
142
147
  puts '-' * 120
143
148
 
144
149
  # Print table rows
145
150
  project_data.each do |data|
151
+ age_display = data[:stale] ? "#{data[:age]} ⚠️" : data[:age]
146
152
  puts format(
147
- '%-45s %12s %20s %s',
153
+ '%-45s %12s %15s %s',
148
154
  data[:name],
149
155
  format_size(data[:size]),
150
- format_date(data[:modified]),
156
+ age_display,
151
157
  shorten_path(data[:path])
152
158
  )
153
159
  end
@@ -183,6 +189,40 @@ module Appydave
183
189
  time.strftime('%Y-%m-%d %H:%M')
184
190
  end
185
191
 
192
+ # Format age as relative time (e.g., "3 days", "2 weeks")
193
+ def self.format_age(time)
194
+ return 'N/A' if time.nil?
195
+
196
+ seconds = Time.now - time
197
+ return 'just now' if seconds < 60
198
+
199
+ minutes = seconds / 60
200
+ return "#{minutes.round}m" if minutes < 60
201
+
202
+ hours = minutes / 60
203
+ return "#{hours.round}h" if hours < 24
204
+
205
+ days = hours / 24
206
+ return "#{days.round}d" if days < 7
207
+
208
+ weeks = days / 7
209
+ return "#{weeks.round}w" if weeks < 4
210
+
211
+ months = days / 30
212
+ return "#{months.round}mo" if months < 12
213
+
214
+ years = days / 365
215
+ "#{years.round}y"
216
+ end
217
+
218
+ # Check if project is stale (>90 days old)
219
+ def self.stale?(time)
220
+ return false if time.nil?
221
+
222
+ days = (Time.now - time) / 86_400 # seconds in a day
223
+ days > 90
224
+ end
225
+
186
226
  # Shorten path by replacing home directory with ~
187
227
  def self.shorten_path(path)
188
228
  path.sub(Dir.home, '~')
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Appydave
4
4
  module Tools
5
- VERSION = '0.43.0'
5
+ VERSION = '0.44.0'
6
6
  end
7
7
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appydave-tools",
3
- "version": "0.43.0",
3
+ "version": "0.44.0",
4
4
  "description": "AppyDave YouTube Automation Tools",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appydave-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.43.0
4
+ version: 0.44.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys