dotfiles/dot_config/task/hooks/disabled/DISABLED-on-add.jrnl

13 lines
271 B
Text
Raw Normal View History

2021-10-13 13:04:48 -04:00
#!/usr/bin/python3
import sys
import json
import subprocess
for line in sys.stdin:
if '{' in line:
entry = json.loads(line.strip())
print(line)
message = f"Added: \"{entry['description']}\" to: {entry['project']}"
subprocess.call(['jrnl', message])