quick question: how can i supply the user's email address to a tool?
is there a variable i can use in the tool config xml file? thanks! ed
Hi Ed You can use the variable "$userEmail" in the 'command' tag of the tool definition file Regards, Hans On 05/06/2011 03:56 AM, Edward Kirton wrote:
is there a variable i can use in the tool config xml file? thanks! ed
___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
On Fri, May 6, 2011 at 8:18 AM, Hans-Rudolf Hotz <hrh@fmi.ch> wrote:
Hi Ed
You can use the variable "$userEmail" in the 'command' tag of the tool definition file
Regards, Hans
That should probably be listed on the wiki, https://bitbucket.org/galaxy/galaxy-central/wiki/ToolConfigSyntax Are there any other similar variables worth knowing about? Peter
Peter Cock wrote:
On Fri, May 6, 2011 at 8:18 AM, Hans-Rudolf Hotz <hrh@fmi.ch> wrote:
Hi Ed
You can use the variable "$userEmail" in the 'command' tag of the tool definition file
Regards, Hans
That should probably be listed on the wiki, https://bitbucket.org/galaxy/galaxy-central/wiki/ToolConfigSyntax
Are there any other similar variables worth knowing about?
Yes. I added these to the wiki under the <command> section. Also, since they used 3 different naming styles, I changed them all to use the pythonic standard for constants and reserved names, but the old names are maintained for backwards-compatibility. __new_file_path__ = universe_wsgi.ini new_file_path value __tool_data_path__ = GALAXY_DATA_INDEX_DIR = universe_wsgi.ini tool_data_path value __root_dir__ = GALAXY_ROOT_DIR = Top-level Galaxy source directory made absolute via os.path.abspath() __datatypes_config__ = GALAXY_DATATYPES_CONF_FILE = universe_wsgi.ini datatypes_config value __user_id__ = userId = Email's numeric ID (id column of galaxy_user table in the database) __user_email__ = userEmail = User's email address __app__ = The galaxy.app.UniverseApplication instance, gives access to __app__.config and much more. Should be used as a last resort, may go away in future releases. The new names will be available in the next stable release, which is looking like it will be out next week. --nate
Peter ___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
Hi Nate, can I access the values in the universe_wsgi.ini file? How would I retrieve the value of "smtp_server" for example? (Or do i just parse the file myself?) Thanks! On Fri, May 6, 2011 at 9:06 AM, Nate Coraor <nate@bx.psu.edu> wrote:
__tool_data_path__ = GALAXY_DATA_INDEX_DIR = universe_wsgi.ini tool_data_path value
Edward Kirton wrote:
Hi Nate, can I access the values in the universe_wsgi.ini file? How would I retrieve the value of "smtp_server" for example? (Or do i just parse the file myself?)
$__app__.config.smtp_server should do it. Most variables should match the name in the config file - a few may not, when in doubt, look in lib/galaxy/config.py. --nate
Thanks!
On Fri, May 6, 2011 at 9:06 AM, Nate Coraor <nate@bx.psu.edu> wrote:
__tool_data_path__ = GALAXY_DATA_INDEX_DIR = universe_wsgi.ini tool_data_path value
awesome; thanks everyone for your help. On Fri, May 6, 2011 at 9:03 PM, Nate Coraor <nate@bx.psu.edu> wrote:
Edward Kirton wrote:
Hi Nate, can I access the values in the universe_wsgi.ini file? How would I retrieve the value of "smtp_server" for example? (Or do i just parse the file myself?)
$__app__.config.smtp_server should do it. Most variables should match the name in the config file - a few may not, when in doubt, look in lib/galaxy/config.py.
--nate
Thanks!
On Fri, May 6, 2011 at 9:06 AM, Nate Coraor <nate@bx.psu.edu> wrote:
__tool_data_path__ = GALAXY_DATA_INDEX_DIR = universe_wsgi.ini tool_data_path value
participants (4)
-
Edward Kirton
-
Hans-Rudolf Hotz
-
Nate Coraor
-
Peter Cock