As per https://docs.python.org/3.11/reference/lexical_analysis.html#encoding-declarations, the default encoding of Python files is UTF-8. In fact, it's been the default encoding since Python 3.0 (released in 2008).
19 lines
385 B
Python
19 lines
385 B
Python
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
import json
|
|
|
|
original_task = sys.stdin.readline()
|
|
modified_task = sys.stdin.readline()
|
|
|
|
task = json.loads(modified_task)
|
|
task["description"] = "This is an example modify hook"
|
|
|
|
# A random message
|
|
sys.stdout.write("Hello from the template hook\n")
|
|
|
|
sys.stdout.write(json.dumps(task, separators=(',', ':')) + '\n')
|
|
sys.exit(0)
|
|
|
|
# vim: ai sts=4 et sw=4
|