Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

161 lines (110 sloc) 4.094 kB

INSTALL jdone.

Document version.

Installing by GNU Make.

This command install man pages, command line client and Emacs mode:

$ make prefix=/usr/local

If you omit prefix its default value is ~/usr.

Using jdone.el in Emacs.

Installing jdone.el in Emacs.

Add jdone.el to Emacs load-path and load module:

(add-to-list 'load-path "/path/to/jdone/dir")
(require 'jdone)

Enable C-c y key binding and integrate jdone to some hooks:

(jdone-setup-key-binding)
(jdone-integrate-hook)

Personally I enable jdone by (assuming that load-path already updated somewhere):

(ignore-errors
  (require 'jdone)
  (jdone-setup-key-binding)
  (jdone-integrate-hook)
  )

If above key biding or hook integration was not satisfied your purpose write something like:

(global-set-key (kbd "C-c y") 'jdone-post-ui)
(add-hook 'log-edit-done-hook 'jdone-post-buffer)
(add-hook 'org-after-todo-state-change-hook 'jdone-post-org)

to your ~/.emacs.

Invoking jdone.el in Emacs.

When you register jdone with (jdone-integrate-hook) every time you commit jdone add log message from log-edit buffer to jdone storage (by default this is ~/.jdonedb/current).

Another way add message to storage is to call C-c y key binding which bound if you setup this binding with (jdone-setup-key-binding).

From documentation for jdone-post-ui function:

jdone-post-ui is an interactive Lisp function in `jdone.el'.
It is bound to C-c y.
(jdone-post-ui &optional PREFIX START END)

Add post.

Interactively, in Transient Mark mode when the mark is active,
operate on the contents of the region.

With prefix only post current line. If you prefix with M-- (or
C-u -) also kill current line (to `kill-ring').

Otherwise, open `jdone-post-buffer-name' buffer for message
editing.

So now you can post message to storage and look to it in ~/.jdonedb/current file.

You can get funny look HTML page from ~/.jdonedb/current file by using jdone-cgi-simple.bash script. Look next section for more info.

Publish jdone log in Web.

Publish jdone log with lighttpd.

Configure lighttpd like this:

server.document-root        = "/srv/www/htdocs/"
server.port                 = 80
server.pid-file            = "/var/run/lighttpd.pid"
server.modules = (
  "mod_access",
  "mod_accesslog",
  "mod_cgi",
)
server.errorlog             = "/var/log/lighttpd/error.log"
accesslog.filename          = "/var/log/lighttpd/access.log"

index-file.names += ( "index.html", )
cgi.assign += ( "jdone-cgi-simple.bash" => "/bin/bash", )

Copy jdone-cgi-simple.bash to server.document-root.

Create/update index.html with link to jdone-cgi-simple.bash in server.document-root:

<html>
<head></head>
<body>
<h1>Public services.</h1>
  <ul>
    <li><a href="/jdone-cgi-simple.bash">Job done.</a>
  </ul>
</body>
</html>

Start/restart lighttpd:

$ sudo kill -s INT `cat /var/run/lighttpd.pid`
$ sudo lighttpd -f /srv/www/lighttpd.conf

Open http://localhost in your favorite Web browser (Firefox suitable for this purpose) and navigate "Job done" URL!

Publish jdone log with lighttpd in Debian way.

Create config /etc/lighttpd/conf-available/90-jdone.conf:

$HTTP["url"] =~ "^/jdone-cgi-simple.bash" {
    alias.url = ( "/" => "/srv/www/" )
    cgi.assign = ( "jdone-cgi-simple.bash" => "/bin/bash" )
    setenv.add-environment = ( "HOME" => "/home/user" )
}

don't forget enable corresponding modules in /etc/lighttpd/lighttpd.conf:

server.modules += (
    "mod_alias",
    "mod_cgi",
    "mod_setenv",
)

Enable config:

$ sudo lighty-enable-mod jdone

Restart server:

$ sudo service lighttpd restart
Jump to Line
Something went wrong with that request. Please try again.