Coder Social home page Coder Social logo

cl-growl's Introduction

CL-Growl Client Library

Growl is a notification system originally written for Mac OS X, but now supported on Windows and Linux. Growl supports a small network protocol over UDP called GNTP. This is a Common Lisp client library for registering an application with Growl and sending Growl notifications on behalf of the registered application.

Obtaining the code

Usage

Before your application can start sending messages to Growl, it needs to register the notification types it intends to send. On the receiving end, the message display can be customized based on the notification type. Here is a simple example showing some of the many options to the register function for an application called Lambda Fun with four types of messages: debug, info, warn, and error where debug messages are not displayed unless you tweak your Growl preferences to display them:

(growl:register
   :app "Lambda Fun"
   :app-icon "http://nklein.com/favicon.ico"
   :enabled '( "info" "warn" "error" )
   :disabled '( "debug" )
   :host "localhost"
   :port 23053
   :password "growl-password"
   :checksum-mode :sha256)

See (documentation #'growl:register t) for a description of the other parameters available when calling register.

After an application has been registered once (from anywhere, in any process), you can send a message Cannot connect to database! with the title Critical Error of type Error with priority 2 that will stay showing on the receiving desktop with:

(growl:notify "Cannot cannoect to database!"
              :title "Critical Error"
              :priority 2
              :sticky t)

See (documentation #'growl:notify t) for a description of the other parameters available when calling notify.

Almost all of the parameters to both register and notify take their default values from special variables which can be rebound by your application. Here are the available variables. You can use (documentation <variable-name> 'variable) to see documentation for each of these variables.

*growl-default-host*     ; initially "localhost"
*growl-default-port*     ; initially 23053
*growl-default-app*
*growl-default-app-icon*
*growl-default-salt*
*growl-default-iv*

*growl-default-notification*
*growl-default-title*
*growl-default-priority*
*growl-default-icon*

*growl-default-callback-context*
*growl-default-callback-context-type*
*growl-default-callback-target*

*growl-default-origin-fields*
*growl-default-custom-fields*
*growl-default-application-fields*

*growl-default-checksum-mode*
*growl-default-encryption-mode*
*growl-default-password*

Compatibility

This library does not currently implement the subscribe protocol method of GNTP.

Currently, the Mac OS X Growl server does not support any of the encryption modes that Growl for Windows supports.

cl-growl's People

Contributors

nklein avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cl-growl's Issues

no response while cl-growl connect to Growl 1.2 with port 23052

Growl v1.3+ for Mac OS X is NOT free, so I'm using Growl v1.2.2.

(growl:register :app "Lambda Fun"
                :app-icon "http://nklein.com/favicon.ico"
                :enabled '( "info" "warn" "error" )
                :disabled '( "debug" )
                :host "localhost"
                :port 23052
                :password "growl-password"
                :checksum-mode :sha256)

Without any response. It just hang there.

I'm sure my Growl 1.2.2 is listen on port 23052:

telnet 127.0.0.1 23052
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
^]
telnet> ^C

usocket-udp is going away

Usocket now supports the udp features previously featured in usocket-udp. The author of usocket-udp wants it removed from quicklisp. Can you update cl-growl to use usocket directly?

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.