mirror of
https://github.com/fergalmoran/dss.git
synced 2026-01-30 20:54:13 +00:00
Broken push to get vagrant install running
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -21,3 +21,4 @@ downloads.txt
|
||||
plays.txt
|
||||
dss_ah
|
||||
fixtures.json
|
||||
dss_test.db
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
Django==1.5
|
||||
PIL>=1.1.7
|
||||
numpy
|
||||
pygtk
|
||||
timeside
|
||||
south
|
||||
beautifulsoup4>=4.1.1
|
||||
decorator>=3.3.3
|
||||
|
||||
15
spa/management/commands/create_waveforms.py
Normal file
15
spa/management/commands/create_waveforms.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from django.core.management.base import NoArgsCommand
|
||||
import timeside
|
||||
|
||||
|
||||
class Command(NoArgsCommand):
|
||||
def handle_noargs(self, **options):
|
||||
try:
|
||||
audio_file = 'spring.mp3'
|
||||
decoder = timeside.decoder.FileDecoder(audio_file)
|
||||
grapher = timeside.grapher.Spectrogram(width=1920, height=1080)
|
||||
(decoder | grapher).run()
|
||||
grapher.render('d:\spectrogram.png')
|
||||
|
||||
except Exception, ex:
|
||||
print "Debug exception: %s" % ex.message
|
||||
@@ -12,7 +12,7 @@ class Command(NoArgsCommand):
|
||||
in_file = mix.get_absolute_path()
|
||||
try:
|
||||
if os.path.isfile(in_file):
|
||||
create_waveform_task.delay(in_file=in_file, mix_uid=mix.uid)
|
||||
create_waveform_task.delay(in_file=in_file, uid=mix.uid)
|
||||
else:
|
||||
print "File %s not found" % in_file
|
||||
|
||||
|
||||
Reference in New Issue
Block a user