20
20
VERSION = 'Classifier 1.99dev'
21
21
DIRCONFFILE = '.classifier.conf'
22
22
PLATFORM = sys .platform
23
+ OS = os .name
24
+
23
25
if PLATFORM == 'darwin' :
24
26
CONFIG = os .path .join (os .path .expanduser ('~' ), '.classifier-master.conf' )
25
- elif PLATFORM == 'nt' :
27
+ elif PLATFORM == 'win32' or OS == ' nt' :
26
28
CONFIG = os .path .join (os .getenv ('userprofile' ), 'classifier-master.conf' )
27
- elif PLATFORM == 'linux' :
29
+ elif PLATFORM == 'linux' or PLATFORM == 'linux2' or OS == 'posix' :
28
30
CONFIG = os .path .join (os .getenv ('HOME' ), '.classifier-master.conf' )
31
+ else :
32
+ CONFIG = os .path .join (os .getcwd (), '.classifier-master.conf' )
29
33
30
34
31
35
def main ():
@@ -168,6 +172,7 @@ def classify_by_date(self, date_format, output, directory):
168
172
return
169
173
170
174
def _format_text_arg (self , arg ):
175
+ """ Set a date format to name your folders"""
171
176
if not isinstance (arg , str ):
172
177
arg = arg .decode ('utf-8' )
173
178
return arg
@@ -190,9 +195,9 @@ def run(self):
190
195
if self .args .edittypes :
191
196
if PLATFORM == 'darwin' :
192
197
subprocess .call (('open' , CONFIG ))
193
- elif PLATFORM == 'nt' :
198
+ elif PLATFORM == 'win32' or OS == ' nt' :
194
199
os .startfile (CONFIG )
195
- elif PLATFORM == 'linux' :
200
+ elif PLATFORM == 'linux' or PLATFORM == 'linux2' or OS == 'posix'
196
201
subprocess .Popen (['xdg-open' , CONFIG ])
197
202
return False
198
203
if bool (self .args .specific_folder ) ^ bool (self .args .specific_types ):
0 commit comments