-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
23 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
package ole.core; | ||
|
||
import picocli.CommandLine; | ||
import picocli.CommandLine.Command; | ||
import picocli.CommandLine.Option; | ||
|
||
@Command(name = "ole", description = "a tool make md file to html", mixinStandardHelpOptions = true) | ||
public class OleOption { | ||
|
||
@Option(names = {"-g", "--gen"}, description = "generate") | ||
private boolean gen; | ||
@Option(names = {"-g", "--genPath"}, description = "generate") | ||
private String localPath; | ||
|
||
@Option(names = {"-h", "--help"}, description = "prints this message", usageHelp = true) | ||
private boolean needHelp; | ||
|
||
|
||
public boolean isGen() { | ||
return gen; | ||
return localPath != null; | ||
} | ||
|
||
public boolean isHelpNeeded() { | ||
return needHelp || !gen; | ||
return needHelp || localPath == null; | ||
} | ||
|
||
public String getRootGenLocalPath() { | ||
return System.getProperty("user.dir"); | ||
public String getLocalPath() { | ||
return localPath; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters