This package is notification tools for Julialang.
using Notifier
notify("Task completed")
- Linux and macOS
- popup notification (desktop notification)
- sound notification
- say notification (Read a given message aloud)
- email notification
- count up and count down timer
- Windows (Experimental)
- popup notification (desktop notification)
- sound notification
- say notification (Read a given message aloud)
- count up and count down timer
using Pkg
Pkg.add("Notifier")
Before using Notifier.jl, you need to install following softwares in your Linux system.
libnotify
for a desktop notificationmail
for an e-mail notificationaplay
(Advanced Linux Sound Architecture) for a sound notificationespeak
for reading a given message aloud
$ sudo apt install libnotify-bin alsa-utils espeak mailutils heirloom-mailx bsd-mailx
This package uses mail
command to notify by e-mail. You may need some settings in advance.
If following command works correctly, you don't need further setting.
$ echo test | mail -s foo yourmail@example.com
using Notifier
notify("Task completed")
# defalut title is "Julia".
# You can change the title by title option.
notify("Task completed", title="foofoo")
notify("Task completed", sound=true) # with sound
notify("Task completed", sound="foo.wav") # Specify a sound file (for Linux and Windows)
alarm() # only sound. You can specify a sound file, alarm(sound="foo.wav")
say("Finish calculation!") # Read aloud
email("message", To="foo@example.com") # default subject is set by date.
email("message", subject="result", To="foo@example.com")
If you use email
function frequently, I recommend you to register your email address by register_email
function.
julia> register_email()
Type your desired recipient e-mail address to receive a notification.
e-mail: foo@example.com
Recipient e-mail address is saved at /path/to/.julia/v0.6/Notifier/email/address.txt.
If you want to change the address, modify /path/to/.julia/v0.6/Notifier/email/address.txt directly or run register_email() again
After you registered, you don't need to specify e-mail address.
email("message")
When the specified time limit has been reached, notify by sound.
h,m,s = 1,2,3
countup(h,m,s) # Hour, Minute, Second
countdown(h,m,s)
Inspired by OSXNotifier.jl.