changeset 17:eab191e0b9b3

meaningful descriptions from filenames
author k0s <k0scist@gmail.com>
date Sat, 26 Dec 2009 14:43:00 -0500
parents 985b3a7e0e88
children ebc1a802f9b8
files decoupage/formatters.py setup.py
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/decoupage/formatters.py	Fri Dec 25 18:57:56 2009 -0500
+++ b/decoupage/formatters.py	Sat Dec 26 14:43:00 2009 -0500
@@ -86,8 +86,10 @@
         for f in data['files']:
             if f['description'] is None:
                 description = f['name']
-                if 'strip' in self.args:
-                    description = description.rsplit('.', 1)[0]
+                description = description.rsplit('.', 1)[0]
+                decription = description.strip('_')
+                if '_' in description:
+                    description = ' '.join([i.title() for i in description.split('_')])
                 f['description'] = description
 
 
--- a/setup.py	Fri Dec 25 18:57:56 2009 -0500
+++ b/setup.py	Sat Dec 26 14:43:00 2009 -0500
@@ -6,7 +6,7 @@
 except IOError:
     description = ''
 
-version = '0.4'
+version = '0.4.1'
 
 setup(name='decoupage',
       version=version,