initial code
This commit is contained in:
parent
8a4bc391f5
commit
4a7912f0ca
2 changed files with 16 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -58,3 +58,5 @@ docs/_build/
|
|||
# PyBuilder
|
||||
target/
|
||||
|
||||
# Vim
|
||||
*.swp
|
||||
|
|
14
ripbot.py
Executable file
14
ripbot.py
Executable 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())
|
Loading…
Reference in a new issue