diff --git a/Program.cs b/Program.cs index d93bbc9..3430aad 100644 --- a/Program.cs +++ b/Program.cs @@ -7,7 +7,7 @@ static class Program var outputOption = new Option( "--output", "Specify the output given to the user" - ).FromAmong("stdout", "xlsx"); + ).FromAmong("stdout", "xlsx", "pdf"); outputOption.AddAlias("-o"); var branchOption = new Option( @@ -59,6 +59,22 @@ static class Program break; } break; + case "pdf": + PdfDataService pdfDataService = new PdfDataService(); + DataAccess dataAccessPdfCase = new DataAccess(pdfDataService); + + switch (branchOptionValue) + { + case null: + commits.GetCurrentCommitsByName(); + dataAccessPdfCase.WriteData(commits.CommitDetails); + break; + default: + commits.GetCommitsByBranch(branchOptionValue); + dataAccessPdfCase.WriteData(commits.CommitDetails); + break; + } + break; case null: StdOutDataService stdOutDataService = new StdOutDataService(); DataAccess dataAccessNullCase = new DataAccess(stdOutDataService);