Added -h / -help option for better usability
This commit is contained in:
parent
e78234243f
commit
941a6e10f9
2 changed files with 37 additions and 13 deletions
37
.idea/workspace.xml
generated
37
.idea/workspace.xml
generated
|
@ -9,7 +9,8 @@
|
||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="9b57ac51-c870-474b-9dfd-64a5fc490635" name="Changes" comment="Added Number of files in -d option">
|
<list default="true" id="9b57ac51-c870-474b-9dfd-64a5fc490635" name="Changes" comment="Added -h / -help option for better usability">
|
||||||
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Main.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Main.java" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
@ -34,6 +35,9 @@
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
<component name="GithubDefaultAccount">
|
||||||
|
<option name="defaultAccountId" value="1ec83841-9eac-4bec-b8b8-e821355f624e" />
|
||||||
|
</component>
|
||||||
<component name="GithubPullRequestsUISettings">
|
<component name="GithubPullRequestsUISettings">
|
||||||
<option name="selectedUrlAndAccountId">
|
<option name="selectedUrlAndAccountId">
|
||||||
<UrlAndAccount>
|
<UrlAndAccount>
|
||||||
|
@ -51,22 +55,28 @@
|
||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent">{
|
<component name="PropertiesComponent"><![CDATA[{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||||
"last_opened_file_path": "/home/bly/IdeaProjects/Sherly",
|
"last_opened_file_path": "/home/bly/IdeaProjects/Sherly",
|
||||||
"project.structure.last.edited": "Artifacts",
|
"project.structure.last.edited": "Artifacts",
|
||||||
"project.structure.proportion": "0.15",
|
"project.structure.proportion": "0.15",
|
||||||
"project.structure.side.proportion": "0.2"
|
"project.structure.side.proportion": "0.2",
|
||||||
|
"settings.editor.selected.configurable": "vcs.Git"
|
||||||
}
|
}
|
||||||
}</component>
|
}]]></component>
|
||||||
|
<component name="RunAnythingCache">
|
||||||
|
<option name="myCommands">
|
||||||
|
<command value="github" />
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
<component name="RunManager">
|
<component name="RunManager">
|
||||||
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||||
<option name="MAIN_CLASS_NAME" value="Main" />
|
<option name="MAIN_CLASS_NAME" value="Main" />
|
||||||
<module name="Sherly" />
|
<module name="Sherly" />
|
||||||
<option name="PROGRAM_PARAMETERS" value="-f $USER_HOME$/Pictures/ -p -d" />
|
<option name="PROGRAM_PARAMETERS" value="-f $USER_HOME$/Pictures/ -p -h" />
|
||||||
<method v="2">
|
<method v="2">
|
||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
</method>
|
</method>
|
||||||
|
@ -213,7 +223,8 @@
|
||||||
<MESSAGE value="Fixed another Random Crash that happened when a file size is near 0" />
|
<MESSAGE value="Fixed another Random Crash that happened when a file size is near 0" />
|
||||||
<MESSAGE value="Simplify code in ThreadedCompare.java and added option for debuging with -debug" />
|
<MESSAGE value="Simplify code in ThreadedCompare.java and added option for debuging with -debug" />
|
||||||
<MESSAGE value="Added Number of files in -d option" />
|
<MESSAGE value="Added Number of files in -d option" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="Added Number of files in -d option" />
|
<MESSAGE value="Added -h / -help option for better usability" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="Added -h / -help option for better usability" />
|
||||||
</component>
|
</component>
|
||||||
<component name="XDebuggerManager">
|
<component name="XDebuggerManager">
|
||||||
<breakpoint-manager>
|
<breakpoint-manager>
|
||||||
|
|
|
@ -22,6 +22,7 @@ public class Main {
|
||||||
boolean deleteDups = false;
|
boolean deleteDups = false;
|
||||||
boolean recordFolder = false;
|
boolean recordFolder = false;
|
||||||
boolean showDebug = false;
|
boolean showDebug = false;
|
||||||
|
boolean help = false;
|
||||||
|
|
||||||
List<String> paths = new ArrayList<>();
|
List<String> paths = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -36,10 +37,22 @@ public class Main {
|
||||||
if (i.equalsIgnoreCase("-p") || i.equalsIgnoreCase("-progress")) { showProgress = true;}
|
if (i.equalsIgnoreCase("-p") || i.equalsIgnoreCase("-progress")) { showProgress = true;}
|
||||||
if (i.equalsIgnoreCase("-f") || i.equalsIgnoreCase("-folder")) { recordFolder = true;}
|
if (i.equalsIgnoreCase("-f") || i.equalsIgnoreCase("-folder")) { recordFolder = true;}
|
||||||
if (i.equalsIgnoreCase("-d") || i.equalsIgnoreCase("-delete")) { deleteDups = true;}
|
if (i.equalsIgnoreCase("-d") || i.equalsIgnoreCase("-delete")) { deleteDups = true;}
|
||||||
|
if (i.equalsIgnoreCase("-h") || i.equalsIgnoreCase("-help")) { help = true;}
|
||||||
if (i.equalsIgnoreCase("-debug")) { showDebug = true;}
|
if (i.equalsIgnoreCase("-debug")) { showDebug = true;}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (help) {
|
||||||
|
System.out.println("Usage: sherly -f inputfolder1 inputfolder2 inputfolder3 [options]...");
|
||||||
|
System.out.println(" ");
|
||||||
|
System.out.println(" -h / -help show this");
|
||||||
|
System.out.println(" -f / -folder all the folders you want to scan for (see example above!)");
|
||||||
|
System.out.println(" -c / -color enable colored messages");
|
||||||
|
System.out.println(" -p / -progress enable progress indicator");
|
||||||
|
System.out.println(" -d / -delete delete all found duplicates except one");
|
||||||
|
System.out.println(" -debug debug stuff");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (paths.size() == 0) {
|
if (paths.size() == 0) {
|
||||||
System.out.println("Aborted, no Folders Found!");
|
System.out.println("Aborted, no Folders Found!");
|
||||||
return;
|
return;
|
||||||
|
|
Reference in a new issue