From 44b682e3d24e9a003e7a6bae6c64ebcd543ac860 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Sat, 28 Sep 2024 03:56:08 -0300 Subject: [PATCH] Render globals totals after running nuget command --- src/Commands/NuGetStatsCommand.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Commands/NuGetStatsCommand.cs b/src/Commands/NuGetStatsCommand.cs index 9e8648d..6c847ad 100644 --- a/src/Commands/NuGetStatsCommand.cs +++ b/src/Commands/NuGetStatsCommand.cs @@ -8,7 +8,6 @@ using Devlooped.Web; using DotNetConfig; using Humanizer; -using Microsoft.OData; using NuGet.Configuration; using NuGet.Packaging; using NuGet.Packaging.Core; @@ -406,14 +405,14 @@ await Parallel.ForEachAsync(tasks, paralell, async (source, cancellation) => File.WriteAllText(fileName, JsonSerializer.Serialize(model, JsonOptions.Default)); } - listTask.Description = $":call_me_hand: [grey]Finished page[/] [aqua]#{index}[/][grey]. Total[/] [lime]{model.Authors.Count}[/] [grey]oss authors so far across[/] {model.Repositories.Count} [grey]repos.[/]"; + listTask.Description = $":call_me_hand: [grey]Finished page[/] [aqua]#{index}[/][grey]. Total[/] [lime]{model.Totals.Authors}[/] [grey]oss authors so far across[/] {model.Totals.Repositories} [grey]repos.[/]"; listTask.StopTask(); index++; } }); var path = new FileInfo(fileName).FullName; - AnsiConsole.MarkupLine($"Total [lime]{model.Authors.Count}[/] oss authors across {model.Repositories.Count} repos => [link={path}]{fileName}[/]"); + AnsiConsole.MarkupLine($"Total [lime]{model.Totals.Authors}[/] oss authors contributing to {model.Totals.Repositories} repos producing {model.Totals.Packages} with {model.Totals.Downloads} dl/day => [link={path}]{fileName}[/]"); return 0; }