a tool to create an installer, fix to play audios using sndup and uploading audios to TwUp

This commit is contained in:
2014-11-07 20:14:06 -06:00
parent 9e79bdfbcb
commit 68036e1715
5 changed files with 433 additions and 7 deletions

View File

@@ -44,13 +44,13 @@ def convert_twup(url):
audio_id = result.group("audio_id")
return 'http://twup.me/%s' % audio_id
@matches_url('http://sndup.net')
def convert_sndup(url):
result = re.match("^http://sndup.net/(?P<audio_id>[a-z0-9]+/?)(|d|l|a)/?$", url, re.I)
if not result or result.group("audio_id") is None:
raise TypeError('%r is not a valid URL' % url)
audio_id = result.group("audio_id")
return 'http://sndup.net/%s/a' % audio_id
#@matches_url('http://sndup.net')
#def convert_sndup(url):
# result = re.match("^http://sndup.net/(?P<audio_id>[a-z0-9]+/?)(|d|l|a)/?$", url, re.I)
# if not result or result.group("audio_id") is None:
# raise TypeError('%r is not a valid URL' % url)
# audio_id = result.group("audio_id")
# return 'http://sndup.net/%s/a' % audio_id
def convert_generic_audio(url):
return url