@@ -348,7 +348,7 @@ def argument_help(self, Args):
348
348
if Args [1 ] == '-h' and Args [0 ] == 'mv' :
349
349
print ("Usage: mv [-h] src [src ...] dest\n \n Move(Rename) a file or directory to a new name, or into a new directory." )
350
350
if Args [1 ] == '-h' and Args [0 ] == 'ping' :
351
- print ("Usage: ping [-h] [-c COUNT] Destination \n \n Send ping to network hosts." )
351
+ print ("Usage: ping [-h] [iP] \n Destination \n \n Send ping to network hosts." )
352
352
if Args [1 ] == '-h' and Args [0 ] == 'rm' :
353
353
print ("Usage: rm [-h] paths [paths ...]" )
354
354
if Args [1 ] == '-h' and Args [0 ] == 'python' :
@@ -714,10 +714,10 @@ def Argument_Paser(self, Args):
714
714
pass
715
715
try :
716
716
if Args [0 ] == 'help' :
717
- print ('[Default commands]:\n help, 2to3, cat, cd, echo, env, git(clone only), la, ls, ln, mkdir, open, ping, rm, tar, uznip, wget, zip, python, python3, pbcopy, pbpaste, delclip, showip, exit\n \n [Third Party commands]:\n ' + self .list_other_cmd () + '\n \n [Stash Extensions Commands]:\n ' + self .list_stash_bin ())
717
+ print ('[Default commands]:\n help, 2to3, cat, cd, echo, env, git(clone only), la, ls, ln, mkdir, open, ping, rm, tar, uznip, wget, zip, python, python3, qrcode, pbcopy, pbpaste, delclip, showip, exit\n \n [Third Party commands]:\n ' + self .list_other_cmd () + '\n \n [Stash Extensions Commands]:\n ' + self .list_stash_bin ())
718
718
elif Args [0 ] == 'cat' :
719
719
try :
720
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
720
+ if not Args [1 ] == '-h' :
721
721
ViewFile = self .readfile (Args [1 ])
722
722
if ViewFile [0 ] == '0' :
723
723
try :
@@ -726,19 +726,17 @@ def Argument_Paser(self, Args):
726
726
print ('Error: Read Text File?' )
727
727
elif ViewFile [0 ] == '3' :
728
728
print ('{}' .format (console .show_image (Args [1 ])).split ('None' )[0 ])
729
- else :
730
- print ('ERROR: Readed MediaFiles?' )
731
729
else :
732
- self . argument_help ( Args )
730
+ pass
733
731
except Exception as E :
734
732
print (E )
735
733
pass
736
734
elif Args [0 ] == '2to3' :
737
735
try :
738
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
736
+ if not Args [1 ] == '-h' :
739
737
self ._2to3 (Args [1 :])
740
738
else :
741
- self . argument_help ( Args )
739
+ pass
742
740
except :
743
741
pass
744
742
elif Args [0 ] == 'pbcopy' :
@@ -766,7 +764,7 @@ def Argument_Paser(self, Args):
766
764
pass
767
765
elif Args [0 ] == 'cd' :
768
766
try :
769
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
767
+ if not Args [1 ] == '-h' :
770
768
if '$' in Args [1 ] and '/' in Args [1 ]:
771
769
Arg1 = Args [1 ].replace ('$' , os .getenv (Args [1 ].split ('$' )[1 ].split ('/' )[0 ]))
772
770
Args [1 ] = Args .replace (Args [1 ].split ('$' )[1 ].split ('/' )[0 ], '' )
@@ -794,26 +792,26 @@ def Argument_Paser(self, Args):
794
792
except :
795
793
pass
796
794
else :
797
- self . argument_help ( Args )
795
+ pass
798
796
except :
799
797
try :
800
798
os .chdir (self .HOME_DIC )
801
799
except Exception as E :
802
800
print ('ERROR:{}' .format (E ))
803
801
elif Args [0 ] == 'cp' :
804
802
try :
805
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
803
+ if not Args [1 ] == '-h' :
806
804
if not '/' in Args [2 ]:
807
805
self .copyFiles (os .path .join (os .getcwd (),Args [1 ]),os .path .join (os .getcwd (), Args [2 ]))
808
806
else :
809
807
self .copyFiles (os .path .join (os .getcwd (),Args [1 ]), Args [2 ])
810
808
else :
811
- self . argument_help ( Args )
809
+ pass
812
810
except :
813
811
pass
814
812
elif Args [0 ] == 'echo' :
815
813
try :
816
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
814
+ if not Args [1 ] == '-h' :
817
815
try :
818
816
if Args [1 ][0 ] == '$' :
819
817
env_data = os .getenv (Args [1 ][1 :])
@@ -822,7 +820,7 @@ def Argument_Paser(self, Args):
822
820
except :
823
821
pass
824
822
else :
825
- self . argument_help ( Args )
823
+ pass
826
824
except IndexError :
827
825
print ('' )
828
826
except :
@@ -838,31 +836,31 @@ def Argument_Paser(self, Args):
838
836
pass
839
837
elif Args [0 ] == 'git' :
840
838
try :
841
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
839
+ if not Args [1 ] == '-h' :
842
840
if Args [1 ] == 'clone' :
843
841
self .git_clone (Args [2 :])
844
842
else :
845
843
print ('git is clone only' )
846
844
else :
847
- self . argument_help ( Args )
845
+ pass
848
846
except :
849
847
pass
850
848
elif Args [0 ] == 'la' or Args [0 ] == 'ls' :
851
849
try :
852
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
850
+ if not Args [1 ] == '-h' :
853
851
if Args [1 ] == '-l' :
854
852
self .listdir ('long' , os .getcwd ())
855
853
else :
856
854
self .listdir (None , None )
857
855
else :
858
- self . argument_help ( Args )
856
+ pass
859
857
except IndexError :
860
858
self .listdir (None , None )
861
859
except :
862
860
pass
863
861
elif Args [0 ] == 'ln' :
864
862
try :
865
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
863
+ if not Args [1 ] == '-h' :
866
864
if Args [1 ] == '-s' :
867
865
try :
868
866
if not '/' in Args [2 ] and not '/' in Args [3 ]:
@@ -880,7 +878,7 @@ def Argument_Paser(self, Args):
880
878
except :
881
879
pass
882
880
else :
883
- self . argument_help ( Args )
881
+ pass
884
882
except :
885
883
pass
886
884
elif Args [0 ] == 'pip' :
@@ -904,59 +902,59 @@ def Argument_Paser(self, Args):
904
902
pass
905
903
elif Args [0 ] == 'mkdir' :
906
904
try :
907
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
905
+ if not Args [1 ] == '-h' :
908
906
if Args [1 ] == '-p' :
909
907
os .makedirs (Args [2 ], exist_ok = True )
910
908
else :
911
909
os .makedirs (Args [1 ], exist_ok = True )
912
910
else :
913
- self . argument_help ( Args )
911
+ pass
914
912
except :
915
913
pass
916
914
elif Args [0 ] == 'qrcode' :
917
915
try :
918
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
916
+ if not Args [1 ] == '-h' :
919
917
with QRCodeView (Args [1 ]) as QR :
920
918
print ('{}' .format (console .show_image (QR )).split ('None' )[0 ])
921
919
else :
922
- self . argument_help ( Args )
920
+ pass
923
921
except :
924
922
pass
925
923
elif Args [0 ] == 'mv' :
926
924
try :
927
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
925
+ if not Args [1 ] == '-h' :
928
926
try :
929
927
shutil .move (Args [1 ], Args [2 ])
930
928
except IndexError :
931
929
pass
932
930
except Exception as E :
933
931
print (E )
934
932
else :
935
- self . argument_help ( Args )
933
+ pass
936
934
except :
937
935
pass
938
936
elif Args [0 ] == 'open' :
939
937
try :
940
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
938
+ if not Args [1 ] == '-h' :
941
939
try :
942
940
console .quicklook (Args [1 ])
943
941
except Exception as E :
944
942
print (E )
945
943
else :
946
- self . argument_help ( Args )
944
+ pass
947
945
except :
948
946
pass
949
947
elif Args [0 ] == 'ping' :
950
948
try :
951
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
949
+ if not Args [1 ] == '-h' :
952
950
try :
953
951
for _P in range (3 ):
954
952
print (self .ping (Args [1 ]))
955
953
time .sleep (1 )
956
954
except :
957
955
pass
958
956
else :
959
- self . argument_help ( Args )
957
+ pass
960
958
except :
961
959
pass
962
960
elif Args [0 ] == 'pwd' :
@@ -967,7 +965,7 @@ def Argument_Paser(self, Args):
967
965
print (path )
968
966
elif Args [0 ] == 'rm' :
969
967
try :
970
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
968
+ if not Args [1 ] == '-h' :
971
969
try :
972
970
if '$' in Args [1 ] and '/' in Args [1 ]:
973
971
Arg1 = Args [1 ].replace ('$' , os .getenv (Args [1 ].split ('$' )[1 ].split ('/' )[0 ]))
@@ -989,28 +987,28 @@ def Argument_Paser(self, Args):
989
987
except Exception as E :
990
988
print (E )
991
989
else :
992
- self . argument_help ( Args )
990
+ pass
993
991
except :
994
992
pass
995
993
elif Args [0 ] == 'tar' :
996
994
try :
997
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
995
+ if not Args [1 ] == '-h' :
998
996
self .TarArgument (Args )
999
997
else :
1000
- self . argument_help ( Args )
998
+ pass
1001
999
except :
1002
1000
pass
1003
1001
elif Args [0 ] == 'unzip' :
1004
1002
try :
1005
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
1003
+ if not Args [1 ] == '-h' :
1006
1004
self .ZIPExtractor (Args [1 ])
1007
1005
else :
1008
- self . argument_help ( Args )
1006
+ pass
1009
1007
except :
1010
1008
pass
1011
1009
elif Args [0 ] == 'python' or Args [0 ] == 'python3' or Args [0 ] == 'py' or Args [0 ] == 'py3' :
1012
1010
try :
1013
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
1011
+ if not Args [1 ] == '-h' :
1014
1012
if not '/' in Args [1 ]:
1015
1013
file_path = os .path .join (os .getcwd (), Args [1 ])
1016
1014
else :
@@ -1021,7 +1019,7 @@ def Argument_Paser(self, Args):
1021
1019
except :
1022
1020
pass
1023
1021
else :
1024
- self . argument_help ( Args )
1022
+ pass
1025
1023
except IndexError :
1026
1024
try :
1027
1025
code .interact ()
@@ -1031,25 +1029,25 @@ def Argument_Paser(self, Args):
1031
1029
pass
1032
1030
elif Args [0 ] == 'wget' :
1033
1031
try :
1034
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
1032
+ if not Args [1 ] == '-h' :
1035
1033
try :
1036
1034
if Args [2 ] == '-o' or Args [2 ] == '--output' :
1037
1035
self .wget (Args [1 ], filename = Args [3 ])
1038
1036
except IndexError :
1039
1037
self .wget (Args [1 ])
1040
1038
else :
1041
- self . argument_help ( Args )
1039
+ pass
1042
1040
except :
1043
1041
pass
1044
1042
elif Args [0 ] == 'zip' :
1045
1043
try :
1046
- if not Args [1 ] == '-h' or not Args [ 1 ] == '--help' :
1044
+ if not Args [1 ] == '-h' :
1047
1045
try :
1048
1046
self .ZipArchiveCreate (Args [1 ], Args [2 ])
1049
1047
except :
1050
1048
pass
1051
1049
else :
1052
- self . argument_help ( Args )
1050
+ pass
1053
1051
except :
1054
1052
pass
1055
1053
elif Args [0 ] == 'exit' :
0 commit comments