Skip to content

Commit

Permalink
Removing Commons-CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
avishek-sen-gupta committed Jul 21, 2024
1 parent 8eadc9c commit 5cf4798
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 147 deletions.
122 changes: 0 additions & 122 deletions smojol-cli/src/main/java/org/smojol/cli/CliOptionsReader.java

This file was deleted.

26 changes: 1 addition & 25 deletions smojol-cli/src/main/java/org/smojol/cli/FlowchartCLI.java
Original file line number Diff line number Diff line change
@@ -1,38 +1,14 @@
package org.smojol.cli;

import com.google.common.collect.ImmutableList;
import org.apache.commons.cli.*;
import org.smojol.analysis.LanguageDialect;
import org.smojol.analysis.visualisation.FlowchartCommand;
import org.smojol.flowchart.FlowchartTasks;
import org.smojol.interpreter.FlowchartGenerationStrategy;
import picocli.CommandLine;

import java.io.File;
import java.io.IOException;
import java.util.List;

/*
Use something like:
java -jar smojol-cli/target/smojol-cli.jar test-exp.cbl --srcDir /Users/asgupta/code/smojol/smojol-test-code --copyBooksDir /Users/asgupta/code/smojol/smojol-test-code --dialectJarPath /Users/asgupta/code/smojol/che-che4z-lsp-for-cobol-integration/server/dialect-idms/target/dialect-idms.jar --dialect COBOL --reportDir /Users/asgupta/code/smojol/out/report --generation PROGRAM
*/
public class FlowchartCLI {
public static void main(String[] args) throws ParseException, IOException, InterruptedException {
// CliOptionsReader optionsReader = new CliOptionsReader().read(args);
// if (!optionsReader.isValid()) {
// optionsReader.printUsage();
// return;
// }
// String source = optionsReader.getSource();
// String sourceDir = optionsReader.getSourceDir();
// File[] copyBookPaths = optionsReader.getCopyBookPaths();
// String dialectJarPath = optionsReader.getDialectJarPath();
// String reportRootDir = optionsReader.getReportRootDir();
// LanguageDialect dialect = optionsReader.getDialect();
// FlowchartGenerationStrategy flowchartGenerationStrategy = optionsReader.getFlowchartGenerationStrategy();
//
// List<String> programNames = ImmutableList.of(source);
// new FlowchartTasks(sourceDir, reportRootDir, copyBookPaths, dialectJarPath).generateForPrograms(programNames, flowchartGenerationStrategy, dialect);
public static void main(String[] args) {
int exitCode = new CommandLine(new FlowchartCommand()).execute(args);
System.exit(exitCode);
}
Expand Down

0 comments on commit 5cf4798

Please sign in to comment.