This file is indexed.

/usr/share/doc/gnumed/user-manual/Gnumed/GmManualHooksFramework.html is in gnumed-doc 1.4.6+dfsg-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
	<title> GmManualHooksFramework &lt; Gnumed &lt; Foswiki</title>
		  
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="robots" content="noindex" /> <link rel="alternate" type="application/rss+xml" title="RSS Feed" href="WebRss.html" />
	<link rel="icon" href="../rsrc/System/ProjectLogos/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="../rsrc/System/ProjectLogos/favicon.ico" type="image/x-icon" />
	<link rel="alternate" href="http://wiki.gnumed.de/bin/edit/Gnumed/GmManualHooksFramework?t=1391005512" type="application/x-wiki" title="edit GmManualHooksFramework" />
	<meta name="description" content="GmManualHooksFramework" />
	 <!--[if IE]></base><![endif]-->
	
	<style type="text/css" media="all">
@import url('../rsrc/System/SkinTemplates/base.css');
</style>
<style type="text/css" media="all">
@import url('../rsrc/System/SkinTemplates/default.css');
</style>
<!--[if IE]><style type="text/css" media="screen">
pre {
	overflow-x:auto;
	padding-bottom:expression(this.scrollWidth > this.offsetWidth ? 16 : 0);
}
</style>
<![endif]-->

<meta name="foswiki.PUBURL" content="http://wiki.gnumed.de/pub" /> <!-- PUBURL -->
<meta name="foswiki.PUBURLPATH" content="/pub" /> <!-- PUBURLPATH -->
<meta name="foswiki.SCRIPTSUFFIX" content="" /> <!-- SCRIPTSUFFIX -->
<meta name="foswiki.SCRIPTURL" content="http://wiki.gnumed.de/bin" /> <!-- SCRIPTURL -->
<meta name="foswiki.SCRIPTURLPATH" content="/bin" /> <!-- SCRIPTURLPATH -->
<meta name="foswiki.SERVERTIME" content="29%20Jan%202014%20-%2015:25" /> <!-- SERVERTIME -->
<meta name="foswiki.SKIN" content="twikinet%2c%20pattern" /> <!-- SKIN -->
<meta name="foswiki.SYSTEMWEB" content="System" /> <!-- SYSTEMWEB -->
<meta name="foswiki.TOPIC" content="GmManualHooksFramework" /> <!-- TOPIC -->
<meta name="foswiki.USERNAME" content="KarstenHilbert" /> <!-- USERNAME -->
<meta name="foswiki.USERSWEB" content="Main" /> <!-- USERSWEB -->
<meta name="foswiki.WEB" content="Gnumed" /> <!-- WEB -->
<meta name="foswiki.WIKINAME" content="KarstenHilbert" /> <!-- WIKINAME -->
<meta name="foswiki.WIKIUSERNAME" content="Main.KarstenHilbert" /> <!-- WIKIUSERNAME -->
<meta name="foswiki.NAMEFILTER" content="%5b%5cs%5c*%3f~%5e%5c%24%40%25%60%22'%26%3b%7c%3c%3e%5c%5b%5c%5d%23%5cx00-%5cx1f%5d" /> <!-- NAMEFILTER --><!--JQUERYPLUGIN::FOSWIKI::META-->
<script type='text/javascript' src='../rsrc/System/JQueryPlugin/jquery-1.4.3.js'></script><!--JQUERYPLUGIN-->
<script type='text/javascript' src='../rsrc/System/JQueryPlugin/plugins/livequery/jquery.livequery.js'></script><!--JQUERYPLUGIN::LIVEQUERY-->
<script type='text/javascript' src='../rsrc/System/JQueryPlugin/plugins/foswiki/jquery.foswiki.js'></script><!--JQUERYPLUGIN::FOSWIKI-->
<script type='text/javascript' src='../rsrc/System/JSTreeContrib/jquery.jstree.js'></script><!--JQUERYPLUGIN::JSTREE-->
</head>
<body class=""><div class="foswikiPage">
<a name="PageTop"></a> 
<p></p>
<p></p>
<h1><a name="Using_Hooks_to_make_GNUmed_do_what_you_want"></a>  Using Hooks to make GNUmed do what you want </h1>
<p></p>
At various points in the workflow (such as directly after activating a patient) GNUmed can invoke a script to allow you to customize what is happening. This is both powerful and possibly dangerous: You can make GNUmed do nearly anything you want - but an attacker might also find a hole to exploit that for evil deeds. GNUmed has, however, taken a few precautions to try to thwart the average <a href="http://www.catb.org/jargon/html/S/script-kiddies.html" target="_top">script kiddy</a> or <a href="http://www.catb.org/jargon/html/W/wannabee.html" target="_top">wannabe</a> <a href="http://www.catb.org/jargon/html/E/elite.html" target="_top">E7EET</a> <a href="http://www.catb.org/jargon/html/C/cracker.html" target="_top">hax</a><a href="http://www.catb.org/jargon/html/W/warez-d00dz.html" target="_top">xor</a>.
<p></p>
The documentation which comes with your package holds an <a href="http://gitorious.org/gnumed/gnumed/blobs/master/gnumed/gnumed/client/doc/hook_script_example.py" target="_top">example script</a> <code>hook_script_example.py</code> which contains a lot of examples for some known hooks.
<p></p>
You can always learn the exact hooks your version of GNUmed supports by starting GNUmed with <code>--debug</code> (or check the <code>[x] enable debugging</code> field in the login dialog) and then looking at the log file.
<p></p>
<h2><a name="The_hook_script"></a>  The hook script </h2>
<p></p>
The script <code>~/.gnumed/scripts/hook_script.py</code> is called for all hooks so there is a single script per user for hook actions.
<p></p>
This script file must meet the following conditions:
<p></p> <ul>
<li> must be owned by the user running GNUmed
</li> <li> must have permission bits set to <code>100600</code> (<code>- rw- --- ---</code>)
</li> <li> must have a module level Python function <code>run_script(hook=None)</code>
</li></ul> 
<p></p>
GNUmed will then import that file and execute the <code>run_script()</code> function at various times. The single argument passed into this function is named <code>hook</code>. It will hold the actual hook name the script was called from. This way appropriate action can be taken depending on which hook the script is called from. It can then do pretty much anything Python can do within the GNUmed framework - including finding out which user it is running as and which workplace it was called from.
<p></p>
Note that some hooks may be callled before or after the wxPython GUI is available.
<p></p>
<h2><a name="Known_hooks"></a>  Known hooks </h2>
<p></p> <ul>
<li> see the <a href="http://gitorious.org/gnumed/gnumed/blobs/master/gnumed/gnumed/client/pycommon/gmHooks.py" target="_top">list of hooks</a> in the latest source code
</li></ul> 
<p></p>
Note that some hooks may not yet be available in the currently released version.
<a name="TopicEnd"></a>
<p></p>
<p></p>
<p></p>
<p></p>
</div>
</body></html>