Skip to content
Permalink
Browse files

dump fragmented source to temp

  • Loading branch information...
Martin Gaitan
Martin Gaitan committed May 9, 2017
1 parent b1e2e04 commit 6ba2112c37f3da6b6a62ec71083af98b286ecf4d
Showing with 7 additions and 2 deletions.
  1. +3 −0 examples/macri_1/make.sh
  2. +4 −2 miau.py
@@ -0,0 +1,3 @@
#!/usr/bin/sh
youtube-dl https://youtu.be/GynDJC845Go -f 22 --external-downloader ffmpeg --external-downloader-args '-ss 365'
miau El\ presidente\ Mauricio\ Macri\ inauguró\ el\ nuevo\ Centro\ de\ Trasbordo\ Constitución-GynDJC845Go.* -r macri_remix.txt
@@ -3,7 +3,7 @@
Miau: Remix speeches for fun and profit
Usage:
miau <input_files>... -r <remix> [-o <output>] [-d <dump>] [--lang <lang>] [--debug]
miau <input_files>... -r <remix> [-o <output> -d <dump> --lang <lang> --debug]
miau -h | --help
miau --version
@@ -94,7 +94,9 @@ def iterate(lines):
logging.info('Fragmenting source. Iteration %s', count)
result, not_found = iterate(remix_lines)
if debug:
with open('_debug_source_{}.txt'.format(count), 'w') as _t:
d = tempfile.mkstemp(suffix='-iter{}.txt'.format(count))[1]
logging.debug('Writing fragmented source to {}'.format(d))
with open(d, 'w') as _t:
_t.write(result)
count += 1
results.append(result)

0 comments on commit 6ba2112

Please sign in to comment.
You can’t perform that action at this time.