Git Product home page Git Product logo

notifier.jl's Introduction

Notifier

Build Status Build status codecov.io

This package is no longer maintained.

This package is notification tools for Julialang.

using Notifier
notify("Task completed")

Screenshot of a Notification

Features:

  • 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

Installation

using Pkg
Pkg.add("Notifier")

Setup for Linux user

Before using Notifier.jl, you need to install following softwares in your Linux system.

  • libnotify for a desktop notification
  • mail for an e-mail notification
  • aplay (Advanced Linux Sound Architecture) for a sound notification
  • espeak 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 [email protected]

Usage

popup notification

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)

Linux
Screenshot of a Notification

macOS
Screenshot of a Notification

Windows
Screenshot of a Notification

sound and say notification

alarm() # only sound. You can specify a sound file, alarm(sound="foo.wav")
say("Finish calculation!") # Read aloud

e-mail notification

email("message", To="[email protected]") # default subject is set by date.
email("message", subject="result", To="[email protected]")

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")

Timer

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)

Acknowledgement

Inspired by OSXNotifier.jl.

notifier.jl's People

Contributors

adrian-tymorek avatar goropikari avatar pallharaldsson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

notifier.jl's Issues

Logo problems on linux

run(`notify-send $title $message -i $(joinpath(@__DIR__, "logo.svg")) -t $(time * 1000)`)

Hi, for some reason my libnotify does not support SVGs, so this command fails. It would be nice to be able to use a custom logo (as a workaround and as a feature).

Example (bash):
Working:
notify-send Julia "this is a message" -i /home/username/.julia/v0.6/Notifier/src/logo.png -t 3000 # (after creating the logo.png
notify-send Julia "this is a message" -i /home/username/.julia/v0.6/Notifier/src/nonexisting.png -t 3000
notify-send Julia "this is a message"-t 3000
NOT working:
notify-send Julia "this is a message" -i /home/IITaudio/.julia/v0.6/Notifier/src/logo.svg -t 3000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.