added command line args to export to a PDF
This commit is contained in:
parent
ddabd6080f
commit
7478f38782
18
Program.cs
18
Program.cs
@ -7,7 +7,7 @@ static class Program
|
||||
var outputOption = new Option<string>(
|
||||
"--output",
|
||||
"Specify the output given to the user"
|
||||
).FromAmong("stdout", "xlsx");
|
||||
).FromAmong("stdout", "xlsx", "pdf");
|
||||
outputOption.AddAlias("-o");
|
||||
|
||||
var branchOption = new Option<string>(
|
||||
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user