appydave-tools 0.64.0 → 0.66.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 +4 -4
- data/CHANGELOG.md +14 -0
- data/bin/dam +2 -1
- data/lib/appydave/tools/dam/project_listing.rb +75 -24
- data/lib/appydave/tools/dam/status.rb +35 -0
- data/lib/appydave/tools/version.rb +1 -1
- data/package.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 49b33917d15a258c9667a68d5fb8590788c62e1fb767cb3b875a18c05af2f319
|
|
4
|
+
data.tar.gz: 3c14d3121215a6b84d25f892be0d0443006668cfc9d6984b881ebd6474d2a027
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef00bcc7bc6291daca49f5268e6fd55ed5d61e06f35485a989c77494f04ae445c301cad2edeb5d6f8ddc95a4e4887d0318a6592264ecb1bd2704f9f569a65709
|
|
7
|
+
data.tar.gz: 1f0d07a95afd62100c7e8816f5e9a1ef039f818281678dc647ed3447e8c3e836c84e918b56f1ebdf2525f9657d70b19e5cfd2d0b7230160435fdfed3d195ed03
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [0.65.0](https://github.com/appydave/appydave-tools/compare/v0.64.0...v0.65.0) (2025-11-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add last S3 sync time to brand status showing most recent file in s3-staging folders ([d373b66](https://github.com/appydave/appydave-tools/commit/d373b66e6323521be3d750a9330769fa33b4fed2))
|
|
7
|
+
|
|
8
|
+
# [0.64.0](https://github.com/appydave/appydave-tools/compare/v0.63.0...v0.64.0) (2025-11-22)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add S3 SYNC column to project list showing if project has s3-staging folder ([03c8780](https://github.com/appydave/appydave-tools/commit/03c8780070df1cee3ec432cf2798c10d30bb1890))
|
|
14
|
+
|
|
1
15
|
# [0.63.0](https://github.com/appydave/appydave-tools/compare/v0.62.0...v0.63.0) (2025-11-22)
|
|
2
16
|
|
|
3
17
|
|
data/bin/dam
CHANGED
|
@@ -129,6 +129,7 @@ class VatCLI
|
|
|
129
129
|
|
|
130
130
|
# List brands and projects
|
|
131
131
|
def list_command(args)
|
|
132
|
+
detailed = args.include?('--detailed')
|
|
132
133
|
args = args.reject { |arg| arg.start_with?('--') || arg.start_with?('-') }
|
|
133
134
|
|
|
134
135
|
brand_arg = args[0]
|
|
@@ -136,7 +137,7 @@ class VatCLI
|
|
|
136
137
|
|
|
137
138
|
if brand_arg.nil?
|
|
138
139
|
# List all brands with summary
|
|
139
|
-
Appydave::Tools::Dam::ProjectListing.list_brands_with_counts
|
|
140
|
+
Appydave::Tools::Dam::ProjectListing.list_brands_with_counts(detailed: detailed)
|
|
140
141
|
elsif pattern_arg
|
|
141
142
|
# Pattern matching
|
|
142
143
|
Appydave::Tools::Dam::ProjectListing.list_with_pattern(brand_arg, pattern_arg)
|
|
@@ -10,7 +10,7 @@ module Appydave
|
|
|
10
10
|
# Project listing functionality for VAT
|
|
11
11
|
class ProjectListing
|
|
12
12
|
# List all brands with summary table
|
|
13
|
-
def self.list_brands_with_counts
|
|
13
|
+
def self.list_brands_with_counts(detailed: false)
|
|
14
14
|
brands = Config.available_brands
|
|
15
15
|
|
|
16
16
|
if brands.empty?
|
|
@@ -19,27 +19,53 @@ module Appydave
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
# Gather brand data
|
|
22
|
-
brand_data = brands.map { |brand| collect_brand_data(brand) }
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
22
|
+
brand_data = brands.map { |brand| collect_brand_data(brand, detailed: detailed) }
|
|
23
|
+
|
|
24
|
+
if detailed
|
|
25
|
+
# Detailed view with additional columns
|
|
26
|
+
header = 'BRAND KEY PROJECTS SIZE LAST MODIFIED ' \
|
|
27
|
+
'GIT S3 SYNC PATH SSD BACKUP ' \
|
|
28
|
+
'WORKFLOW ACTIVE'
|
|
29
|
+
puts header
|
|
30
|
+
puts '-' * 200
|
|
31
|
+
|
|
32
|
+
brand_data.each do |data|
|
|
33
|
+
brand_display = "#{data[:shortcut]} - #{data[:name]}"
|
|
34
|
+
|
|
35
|
+
puts format(
|
|
36
|
+
'%-30s %-12s %10d %12s %20s %-15s %-10s %-35s %-30s %-10s %6d',
|
|
37
|
+
brand_display,
|
|
38
|
+
data[:key],
|
|
39
|
+
data[:count],
|
|
40
|
+
format_size(data[:size]),
|
|
41
|
+
format_date(data[:modified]),
|
|
42
|
+
data[:git_status],
|
|
43
|
+
data[:s3_sync],
|
|
44
|
+
shorten_path(data[:path]),
|
|
45
|
+
data[:ssd_backup] || 'N/A',
|
|
46
|
+
data[:workflow] || 'N/A',
|
|
47
|
+
data[:active_count] || 0
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
else
|
|
51
|
+
# Default view
|
|
52
|
+
puts 'BRAND KEY PROJECTS SIZE LAST MODIFIED GIT S3 SYNC'
|
|
53
|
+
puts '-' * 130
|
|
54
|
+
|
|
55
|
+
brand_data.each do |data|
|
|
56
|
+
brand_display = "#{data[:shortcut]} - #{data[:name]}"
|
|
57
|
+
|
|
58
|
+
puts format(
|
|
59
|
+
'%-30s %-12s %10d %12s %20s %-15s %-10s',
|
|
60
|
+
brand_display,
|
|
61
|
+
data[:key],
|
|
62
|
+
data[:count],
|
|
63
|
+
format_size(data[:size]),
|
|
64
|
+
format_date(data[:modified]),
|
|
65
|
+
data[:git_status],
|
|
66
|
+
data[:s3_sync]
|
|
67
|
+
)
|
|
68
|
+
end
|
|
43
69
|
end
|
|
44
70
|
|
|
45
71
|
# Print footer summary
|
|
@@ -241,7 +267,7 @@ module Appydave
|
|
|
241
267
|
end
|
|
242
268
|
|
|
243
269
|
# Collect brand data for display
|
|
244
|
-
def self.collect_brand_data(brand)
|
|
270
|
+
def self.collect_brand_data(brand, detailed: false)
|
|
245
271
|
Appydave::Tools::Configuration::Config.configure
|
|
246
272
|
brand_info = Appydave::Tools::Configuration::Config.brands.get_brand(brand)
|
|
247
273
|
brand_path = Config.brand_path(brand)
|
|
@@ -262,7 +288,7 @@ module Appydave
|
|
|
262
288
|
# Get S3 sync status (count of projects with s3-staging)
|
|
263
289
|
s3_sync_status = calculate_s3_sync_status(brand, projects)
|
|
264
290
|
|
|
265
|
-
{
|
|
291
|
+
result = {
|
|
266
292
|
shortcut: shortcut || key,
|
|
267
293
|
key: key,
|
|
268
294
|
name: name || key.capitalize,
|
|
@@ -273,6 +299,31 @@ module Appydave
|
|
|
273
299
|
git_status: git_status,
|
|
274
300
|
s3_sync: s3_sync_status
|
|
275
301
|
}
|
|
302
|
+
|
|
303
|
+
# Add detailed fields if requested
|
|
304
|
+
if detailed
|
|
305
|
+
# SSD backup path
|
|
306
|
+
ssd_backup = brand_info.locations.ssd_backup
|
|
307
|
+
ssd_backup = nil if ssd_backup.nil? || ssd_backup.empty? || ssd_backup == 'NOT-SET'
|
|
308
|
+
|
|
309
|
+
# Workflow type (inferred from projects_subfolder setting)
|
|
310
|
+
workflow = brand_info.settings.projects_subfolder == 'projects' ? 'storyline' : 'flivideo'
|
|
311
|
+
|
|
312
|
+
# Active project count (projects with flat structure, not archived)
|
|
313
|
+
active_count = projects.count do |project|
|
|
314
|
+
project_path = Config.project_path(brand, project)
|
|
315
|
+
# Check if not in archived/ subfolder
|
|
316
|
+
!project_path.include?('/archived/')
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
result.merge!(
|
|
320
|
+
ssd_backup: ssd_backup ? shorten_path(ssd_backup) : nil,
|
|
321
|
+
workflow: workflow,
|
|
322
|
+
active_count: active_count
|
|
323
|
+
)
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
result
|
|
276
327
|
end
|
|
277
328
|
|
|
278
329
|
# Calculate git status for a brand
|
|
@@ -232,6 +232,10 @@ module Appydave
|
|
|
232
232
|
|
|
233
233
|
puts " Local: #{local_count}"
|
|
234
234
|
puts " S3 staging: #{s3_count}"
|
|
235
|
+
|
|
236
|
+
# Show last S3 sync time if S3 is configured
|
|
237
|
+
show_last_s3_sync_time if s3_configured?
|
|
238
|
+
|
|
235
239
|
puts " SSD backup: #{ssd_count}"
|
|
236
240
|
|
|
237
241
|
# Project types
|
|
@@ -436,6 +440,37 @@ module Appydave
|
|
|
436
440
|
puts '💡 Suggestions:'
|
|
437
441
|
suggestions.each { |s| puts " #{s}" }
|
|
438
442
|
end
|
|
443
|
+
|
|
444
|
+
# Check if S3 is configured for this brand
|
|
445
|
+
def s3_configured?
|
|
446
|
+
s3_bucket = brand_info.aws.s3_bucket
|
|
447
|
+
s3_bucket && !s3_bucket.empty? && s3_bucket != 'NOT-SET'
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
# Show last S3 sync time for the brand
|
|
451
|
+
def show_last_s3_sync_time
|
|
452
|
+
# Find most recent S3 file across all projects with s3-staging
|
|
453
|
+
projects = ProjectResolver.list_projects(brand)
|
|
454
|
+
latest_sync = nil
|
|
455
|
+
|
|
456
|
+
projects.each do |project|
|
|
457
|
+
project_path = Config.project_path(brand, project)
|
|
458
|
+
staging_dir = File.join(project_path, 's3-staging')
|
|
459
|
+
next unless Dir.exist?(staging_dir)
|
|
460
|
+
|
|
461
|
+
# Get most recent file modification time in s3-staging
|
|
462
|
+
files = Dir.glob(File.join(staging_dir, '*')).select { |f| File.file?(f) }
|
|
463
|
+
next if files.empty?
|
|
464
|
+
|
|
465
|
+
project_latest = files.map { |f| File.mtime(f) }.max
|
|
466
|
+
latest_sync = project_latest if latest_sync.nil? || project_latest > latest_sync
|
|
467
|
+
end
|
|
468
|
+
|
|
469
|
+
return unless latest_sync
|
|
470
|
+
|
|
471
|
+
age = format_age(latest_sync)
|
|
472
|
+
puts " Last S3 sync: #{age} ago"
|
|
473
|
+
end
|
|
439
474
|
end
|
|
440
475
|
end
|
|
441
476
|
end
|
data/package.json
CHANGED