Skip to content

Commit

Permalink
beepz
Browse files Browse the repository at this point in the history
  • Loading branch information
za3k committed Apr 17, 2023
1 parent 9c03a23 commit 82184ec
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ battery
---
Displays the current battery percentage as a short string for displays

beepz
---
Sounds three beeps, even on devices with beep turned off.

budget_summary
---
Helper for za3k only. Summarizes budget categories typed in from my logbook
Expand Down
1 change: 1 addition & 0 deletions beepz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
for x in {1..3}; do play -q -r 44100 -c2 -n synth 0.5 50; sleep 0.5; done
7 changes: 5 additions & 2 deletions quiz
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ Interactively prompt the user to fill out a questionnaire. Reads the questions a
Intended use is for daily, weekly, etc logging of something.
"""
import csv, io, readline, sys
import csv, io, readline, subprocess, sys

if __name__ == '__main__':
if len(sys.argv) != 2:
print("Usage: quiz FILE.csv")
with open(sys.argv[1], 'r+', newline='') as csvfile:
headers = next(csv.reader(csvfile))
reader = csv.reader(csvfile)
lines = list(reader)
headers = lines[0]
subprocess.run("tail -n 5 " + sys.argv[1] + " | csvunpipe", shell=True)
entry = [input(question + " ? ") for question in headers]
csvfile.seek(0, io.SEEK_END)
csv.writer(csvfile).writerow(entry)
Expand Down

0 comments on commit 82184ec

Please sign in to comment.