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>(
|
var outputOption = new Option<string>(
|
||||||
"--output",
|
"--output",
|
||||||
"Specify the output given to the user"
|
"Specify the output given to the user"
|
||||||
).FromAmong("stdout", "xlsx");
|
).FromAmong("stdout", "xlsx", "pdf");
|
||||||
outputOption.AddAlias("-o");
|
outputOption.AddAlias("-o");
|
||||||
|
|
||||||
var branchOption = new Option<string>(
|
var branchOption = new Option<string>(
|
||||||
@ -59,6 +59,22 @@ static class Program
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
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:
|
case null:
|
||||||
StdOutDataService stdOutDataService = new StdOutDataService();
|
StdOutDataService stdOutDataService = new StdOutDataService();
|
||||||
DataAccess dataAccessNullCase = new DataAccess(stdOutDataService);
|
DataAccess dataAccessNullCase = new DataAccess(stdOutDataService);
|
||||||
|
Loading…
Reference in New Issue
Block a user