Skip to content

Commit

Permalink
Render globals totals after running nuget command
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Sep 28, 2024
1 parent c65466e commit 44b682e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Commands/NuGetStatsCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Devlooped.Web;
using DotNetConfig;
using Humanizer;
using Microsoft.OData;
using NuGet.Configuration;
using NuGet.Packaging;
using NuGet.Packaging.Core;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 44b682e

Please sign in to comment.