Skip to content

Commit

Permalink
normal update
Browse files Browse the repository at this point in the history
  • Loading branch information
you-n-g committed Jul 15, 2020
1 parent ca9d82c commit 3a42c7d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ log_level: DEBUG # the default level is INFO
# Usage
## Use in python code
* Call the function in python code directly.
```python
<Your code which takes a lot of time>
from wan import ntf; ntf('Finished')
```

* Call the function in shell directly
```shell
> sleep 10 ; wan ntf sleep finished
```

4 changes: 2 additions & 2 deletions docs/RoadMap.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Plan



## Development
- [ ] Start command after another process ends or become idle
- [ ] Draw the workflow.
- [ ] auto find my running process
- [ ] Run and wait the command
- [ ] GIF to demonstrate the usage of WAN
- [ ] documents(rst??)
- [ ] Opensource Licence?
- [ ] travies - CI


Expand Down
3 changes: 2 additions & 1 deletion wan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def __init__(self, config_path: str = '~/.dotfiles/.notifers.yaml'):
kwargs = self.config['kwargs']
self._ntf = partial(self._provider.notify, **kwargs)

def ntf(self, message):
def ntf(self, *messages):
message = " ".join(messages)
logger.debug("Sending message: {}".format(message))
self._ntf(message=message)

Expand Down
1 change: 0 additions & 1 deletion wan/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def get_pid_from_line(line):


def get_pid_via_fzf(exact=True):
# TODO: make it can be selected with full match
return get_pid_from_line(iterfzf(iter_ps(), multi=False, exact=exact))


Expand Down

0 comments on commit 3a42c7d

Please sign in to comment.