Skip to content

Commit

Permalink
Stash entries
Browse files Browse the repository at this point in the history
  • Loading branch information
lauft committed Mar 8, 2025
1 parent 41f53c2 commit c0dc54c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 8 additions & 4 deletions on_modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ def main(old, new):


if __name__ == "__main__":
old = json.loads(input_stream.readline().decode("utf-8", errors="replace"))
new = json.loads(input_stream.readline().decode("utf-8", errors="replace"))
print(json.dumps(new))
main(old, new)
inputs = []

for line in input_stream.readlines():
inputs.append(json.loads(line.decode("utf-8", errors="replace")))

inputs.append(None)
print(json.dumps(inputs[0]))
main(inputs[0], inputs[1])
1 change: 1 addition & 0 deletions test/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ WORKDIR /task-on-modify-hook
# Install on-modify-hook
RUN mkdir -p ~/.task/hooks
RUN cp on_modify.py ~/.task/hooks/on-modify.timewarrior
RUN ln -s on-add.timewarrior on-modify.timewarrior
RUN chmod +x ~/.task/hooks/on-modify.timewarrior

RUN echo "timew: $( timew --version )" ; \
Expand Down

0 comments on commit c0dc54c

Please sign in to comment.