An open API service indexing awesome lists of open source software.

https://github.com/yuis-ice/notification-cli

Minimalistic Command Line Notification Application under 50 Lines
https://github.com/yuis-ice/notification-cli

cli cli-app command-line command-line-tool nodejs notifications reminder scheduler time-management

Last synced: 9 months ago
JSON representation

Minimalistic Command Line Notification Application under 50 Lines

Awesome Lists containing this project

README

          

# Notification-CLI

Minimalistic Command Line Notification Application under 50 Lines

## Quick Start

This will notify you when 2021 February 20, PM 6:00.

```
noc -d 2021022018 --desktop # for desktop notification
```

Very much minimalistic.

## Installation

```
npm install -g notification-cli
```

## Requirements

- node.js v13 or higher

Install node.js?

```
# node.js [nvm-sh/nvm](https://github.com/nvm-sh/nvm)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
bash
nvm install 13
node -v
```

## Examples

This will only notify you by command line console output:

```
noc -d 2021022018
```

The output be like:

```
$ noc -d 202102120234
2021-02-12T02:33:16+09:00 Jobs started...
2021-02-12T02:33:16+09:00 You will be notified at: 2021-02-12T02:34:00+09:00
2021-02-12T02:34:00+09:00 Notified.
$
```

You can abbreviate your seconds, minutes, hours and so on:

```
noc -d 2022
```

This will notify you when PM 11:00 in the day:

```
noc -d 23 --format HH
```

An alias makes your code much more minimalistic:

```
alias notify="noc --format MM,DD,HH" # Specifying absolute path recommended
notify -d 2,20,18
```

This will run your command:

```
noc -d 2021022018 -c "firefox.exe sound.mp3"
```

No logs on background be like:

```
noc -d 2021022018 --desktop --hide-log --log "" &
```

My favorite format <3

```
noc -d 2021022018 -c "firefox.exe sound.mp3" --desktop -t "your appointment soon"
```

## Command line Options

```
$ noc
Usage: noc [options]

Options:
-d, --date specify date to fire (e.g. "2022010100" for 2020/1/1 00:00) (default: null)
-f, --format specify date format (default: "YYYYMMDDHHmmss")
-D, --desktop enables desktop notification
-t, --title specify title (default: "Notification-CLI")
-m, --message specify message (default: ":)")
-c, --exec-command specify command to run (e.g. firefox.exe ringtone.mp3) (default: null)
-l, --log specify console log message (default: "Notified.")
-H, --hide-log hide information logs
-h, --help display help for command
```

## LICENSE

The software is released under the BSD-3-Clause license.

Copyright (c) 2021, Fumiya Arisaka \ All rights reserved.

This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree.