Manual fixes to Python file
To see if I like the rules
This commit is contained in:
parent
34b545890d
commit
8179433c41
10 changed files with 612 additions and 547 deletions
|
@ -1,13 +1,32 @@
|
|||
#! /usr/bin/env python2
|
||||
from subprocess import check_output
|
||||
import subprocess
|
||||
|
||||
|
||||
def get_pass(account):
|
||||
return check_output("pass " + account, shell=True).splitlines()[0]
|
||||
|
||||
|
||||
def beep():
|
||||
check_output(
|
||||
"play -n synth sine E4 sine A5 remix 1-2 fade 0.5 1.2 0.5 2",
|
||||
shell=True,
|
||||
def get_pass(account: str) -> str:
|
||||
proc = subprocess.run(
|
||||
["pass", account], # noqa: S607
|
||||
stdout=subprocess.PIPE,
|
||||
check=True,
|
||||
)
|
||||
|
||||
raw = proc.stdout.decode()
|
||||
return raw.splitlines()[0]
|
||||
|
||||
|
||||
def beep() -> None:
|
||||
cmd = [
|
||||
"play",
|
||||
"-n",
|
||||
"synth",
|
||||
"sine",
|
||||
"E4",
|
||||
"sine",
|
||||
"A5",
|
||||
"remix",
|
||||
"1-2",
|
||||
"fade",
|
||||
"0.5",
|
||||
"1.2",
|
||||
"0.5",
|
||||
"2",
|
||||
]
|
||||
subprocess.run(cmd, check=False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue