1scout-plugins(1)                                              scout-plugins(1)
2
3
4

NAME

6       scout-plugins - How to write plugins for Scout
7

DESCRIPTION

9       Sub-commands  to Scout are called actions.  A sub-command should repre‐
10       sent an action that the user performs on notes.
11
12       Action modules are subclasses of scout.plugins.ActionPlugin.  The  per‐
13       form_action is the action's entry point – so the main program will call
14       this method to delegate control – and this method must  be  overridden.
15       It can import scout classes and any other packages to help in its task.
16       An action should use scout to get or send information from or to Tomboy
17       or  Gnote  and  use the standard input, output and error streams as its
18       interface with the user.
19
20       Actions are listed dynamically in scout's basic help message  and  will
21       appear as soon as setuptools knows about the subscriptiong to the entry
22       point.  Their descriptions are taken from the first line of the  action
23       module's docstring.  Make sure to keep the docstring's first line short
24       but precise.  The entire line (with two leading spaces for indentation,
25       the action's name and its description) should fit in less than 80 char‐
26       acters.
27
28       Subscribing an action to the setuptools entry point is done via a  set‐
29       up.py  script.   For example, let's subscribe a new action named backup
30       that is defined in the module scout-backup in the  class  named  Backu‐
31       pAction:
32
33              from setuptools import setup
34              setup(
35                  name="scout-backup",
36                  # ...
37                  entry_points = {
38                      "scout.actions": [
39                          "backup = scout-backup::BackupAction",
40                      ],
41                  }
42              )
43
44       KeyboardInterrupt  exceptions  are handled by the main application.  An
45       action can intercept this exception if it needs to rollback  an  opera‐
46       tion  in  order  to  finish  its  work in a consistant state.  The user
47       should be warned right away that the application is trying to stop  its
48       work.   After  the  state  is safe, the action should re-raise the Key‐
49       boardInterrupt exception so that the application exits cleanly.
50

SEE ALSO

52       http://wiki.github.com/lelutin/scout/plugins
53

SCOUT

55       Part of the scout(1) project.
56

AUTHORS

58       Gabriel Filion <lelutin@gmail.com>.
59
60
61
62Scout 0.4                  2010-09-26 23:28:12 -0400          scout-plugins(1)
Impressum