Skip to content

Commit

Permalink
Welcoming moku
Browse files Browse the repository at this point in the history
  • Loading branch information
goFrendiAsgard committed Apr 11, 2024
1 parent 22edd64 commit 9f295c1
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "zrb-noto"
version = "0.0.3"
version = "0.0.4"
description = "Personal todo and logging management"
authors = ["Go Frendi Gunawan <[email protected]>"]
license = "AGPL-3.0-or-later"
Expand Down
6 changes: 4 additions & 2 deletions src/zrb_noto/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
def list_noto(*args: Any, **kwargs: Any):
task: Task = kwargs.get("_task")
items = get_todo_items(completed=False)
show_lines(task, *get_pretty_log_lines(), "", *get_pretty_todo_item_lines(items))
show_lines(
task, *get_pretty_log_lines(), "", *get_pretty_todo_item_lines(items)
)


create_sync_noto_task() >> list_noto
create_sync_noto_task(name="pre-sync") >> list_noto
runner.register(list_noto)
2 changes: 1 addition & 1 deletion src/zrb_noto/log/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ def add_log(*args, **kwargs):
show_lines(task, *get_pretty_log_lines())


create_sync_noto_task() >> add_item >> create_sync_noto_task() >> add_log
create_sync_noto_task(name="pre-sync") >> add_item >> create_sync_noto_task(name="post-sync") >> add_log # noqa
runner.register(add_log)
2 changes: 1 addition & 1 deletion src/zrb_noto/log/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ def list_log(*args, **kwargs):
show_lines(task, *get_pretty_log_lines(file_name))


create_sync_noto_task() >> list_log
create_sync_noto_task(name="pre-sync") >> list_log
runner.register(list_log)
3 changes: 2 additions & 1 deletion src/zrb_noto/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@


def create_sync_noto_task(
name: str = "sync",
group: Optional[Group] = None,
retry: int = 0,
ignore_error: bool = True,
upstreams: List[Task] = [],
custom_commit_message: bool = False,
) -> Task:
sync_noto = CmdTask(
name="sync",
name=name,
group=group,
description="Sync noto",
upstreams=upstreams,
Expand Down
1 change: 0 additions & 1 deletion src/zrb_noto/sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ if git diff --quiet && git diff --cached --quiet
then
echo "Nothing to commit"
else
echo "Commiting changes"
if [ -z "${COMMIT_MESSAGE}" ]
then
COMMIT_MESSAGE="Modified on $(date)"
Expand Down
2 changes: 1 addition & 1 deletion src/zrb_noto/todo/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,5 @@ def add_todo(*args, **kwargs):
show_lines(task, *get_pretty_todo_item_lines(get_todo_items()))


create_sync_noto_task() >> add_item >> create_sync_noto_task() >> add_todo
create_sync_noto_task(name="pre-sync") >> add_item >> create_sync_noto_task(name="post-sync") >> add_todo # noqa
runner.register(add_todo)
2 changes: 1 addition & 1 deletion src/zrb_noto/todo/complete.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ def complete_todo(*args, **kwargs):
)


create_sync_noto_task() >> complete_item >> create_sync_noto_task() >> complete_todo
create_sync_noto_task(name="pre-sync") >> complete_item >> create_sync_noto_task(name="post-sync") >> complete_todo # noqa
runner.register(complete_todo)
2 changes: 1 addition & 1 deletion src/zrb_noto/todo/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ def delete_todo(*args, **kwargs):
show_lines(task, *get_pretty_todo_item_lines(get_todo_items()))


create_sync_noto_task() >> delete_item >> create_sync_noto_task() >> delete_todo
create_sync_noto_task(name="pre-sync") >> delete_item >> create_sync_noto_task(name="post-sync") >> delete_todo # noqa
runner.register(delete_todo)
2 changes: 1 addition & 1 deletion src/zrb_noto/todo/edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,5 @@ def edit_todo(*args, **kwargs):
)


create_sync_noto_task() >> edit_item >> create_sync_noto_task() >> edit_todo
create_sync_noto_task(name="pre-sync") >> edit_item >> create_sync_noto_task(name="post-sync") >> edit_todo # noqa
runner.register(edit_todo)
2 changes: 1 addition & 1 deletion src/zrb_noto/todo/find.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ def find_todo(*args, **kwargs):
)


create_sync_noto_task() >> find_todo
create_sync_noto_task(name="pre-sync") >> find_todo
runner.register(find_todo)
2 changes: 1 addition & 1 deletion src/zrb_noto/todo/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ def list_todo(*args, **kwargs):
)


create_sync_noto_task() >> list_todo
create_sync_noto_task(name="pre-sync") >> list_todo
runner.register(list_todo)
2 changes: 1 addition & 1 deletion src/zrb_noto/todo/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ def start_todo(*args, **kwargs):
)


create_sync_noto_task() >> start_item >> create_sync_noto_task() >> start_todo
create_sync_noto_task(name="pre-sync") >> start_item >> create_sync_noto_task(name="post-sync") >> start_todo # noqa
runner.register(start_todo)
2 changes: 1 addition & 1 deletion src/zrb_noto/todo/stop.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ def stop_todo(*args, **kwargs):
)


create_sync_noto_task() >> stop_item >> create_sync_noto_task() >> stop_todo
create_sync_noto_task(name="pre-sync") >> stop_item >> create_sync_noto_task(name="post-sync") >> stop_todo # noqa
runner.register(stop_todo)

0 comments on commit 9f295c1

Please sign in to comment.