aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bachelier <laurent@bachelier.name>2014-09-01 19:44:02 +0200
committerLaurent Bachelier <laurent@bachelier.name>2014-09-01 19:44:02 +0200
commit18ba529d8641b051a94525ec1ecd8d875ab54deb (patch)
treeb43227d905ed80166cdbca3a8f04d7655d0809a2
parentRelease 1.0.2 (diff)
downloadbrutha-18ba529d8641b051a94525ec1ecd8d875ab54deb.tar.xz
Make sox parameter line more readable
-rw-r--r--brutha/file.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/brutha/file.py b/brutha/file.py
index 1531105..3656629 100644
--- a/brutha/file.py
+++ b/brutha/file.py
@@ -93,8 +93,16 @@ class FlacFile(File):
def transcode(self, commands):
rate, bits = self.resample()
- commands.append('sox -V1 %s -C %s%s %s%s' %
- (escape(self.src()), self.options['quality'], bits, escape(self.dest()), rate))
+ commands.append(
+ 'sox -V1 %(src)s -C %(quality)s%(bits)s %(dest)s%(rate)s' %
+ dict(
+ src=escape(self.src()),
+ quality=self.options['quality'],
+ bits=bits,
+ dest=escape(self.dest()),
+ rate=rate
+ )
+ )
class LossyFile(File):