~ubuntu-branches/ubuntu/precise/gozerbot/precise

« back to all changes in this revision

Viewing changes to debian/gozerbot/usr/lib/python2.5/site-packages/gozerplugs/plugs/tail.py

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Malcolm
  • Date: 2008-06-02 19:26:39 UTC
  • mfrom: (1.1.3 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080602192639-3rn65nx4q1sgd6sy
Tags: 0.8.1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#
3
3
#
4
4
 
5
 
""" used in a pipeline .. show last <nr> elements """
6
 
 
7
5
__copyright__ = 'this file is in the public domain'
8
6
 
9
7
from gozerbot.generic import waitforqueue
10
8
from gozerbot.commands import cmnds
11
9
from gozerbot.plughelp import plughelp
 
10
from gozerbot.examples import examples
12
11
 
13
12
plughelp.add('tail', 'show last <nr> elements of pipeline')
14
13
 
29
28
    ievent.reply(result[-nr:])
30
29
    
31
30
cmnds.add('tail', handle_tail, ['USER', 'ANON'])
 
31
examples.add('tail', 'show last <nr> lines of pipeline output', \
 
32
'list | tail 5')