File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,9 @@ optional arguments:
88
88
-v, --version show version, filename and exit
89
89
-et, --edittypes Edit the list of types and formats
90
90
-t, --types Show the current list of types and formats
91
- -r, --recursive Search the source folder recursively for files
91
+ -r, --recursive Recursively search your source directory.
92
+ WARNING: Ensure you use the correct path as this
93
+ WILL move all files from your selected types.
92
94
-st SPECIFIC_TYPES [ SPECIFIC_TYPES ...] , --specific-types SPECIFIC_TYPES [ SPECIFIC_TYPES ...]
93
95
Move all file extensions, given in the args list, in
94
96
the current directory into the Specific Folder
Original file line number Diff line number Diff line change 20
20
21
21
VERSION = 'Classifier 1.99dev'
22
22
DIRCONFFILE = '.classifier.conf'
23
- OS = os .name
24
- if OS == 'nt' :
23
+ PLATFORM = sys .platform
24
+ if PLATFORM == 'darwin' :
25
+ CONFIG = os .path .join (os .path .expanduser ('~' ), '.classifier.conf' )
26
+ elif PLATFORM == 'nt' :
25
27
CONFIG = os .getenv ('userprofile' ) + '/classifier.conf'
26
- elif OS == 'posix ' :
28
+ elif PLATFORM == 'linux ' :
27
29
CONFIG = xdg_config_dirs [0 ] + '/classifier.conf'
28
30
29
31
def main ():
@@ -186,7 +188,12 @@ def run(self):
186
188
print (key , '\n ' , value )
187
189
return False
188
190
if self .args .edittypes :
189
- subprocess .Popen (['xdg-open' , CONFIG ])
191
+ if PLATFORM == 'darwin' :
192
+ subprocess .call (('open' , CONFIG ))
193
+ elif PLATFORM == 'nt' :
194
+ os .startfile (CONFIG )
195
+ elif PLATFORM == 'linux' :
196
+ subprocess .Popen (['xdg-open' , CONFIG ])
190
197
return False
191
198
if bool (self .args .specific_folder ) ^ bool (self .args .specific_types ):
192
199
print (
You can’t perform that action at this time.
0 commit comments