initial code

This commit is contained in:
Sqozz 2016-10-09 19:29:39 +02:00
parent 8a4bc391f5
commit 4a7912f0ca
2 changed files with 16 additions and 0 deletions

2
.gitignore vendored
View file

@ -58,3 +58,5 @@ docs/_build/
# PyBuilder # PyBuilder
target/ target/
# Vim
*.swp

14
ripbot.py Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env python3
import subprocess
import sys
process = subprocess.Popen(["cdparanoia", "-B", "--stderr-progress"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
for line in process.stderr:
out = line
if "outputting to" in out.decode():
print(out.decode().strip())
elif "##" == out.decode()[:2]:
print(out.decode().strip(), end="\r")
sys.stdout.write("\r")
else:
print(out.decode().strip())