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

12 lines
271 B
Python
Executable file

#!/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])