This note is composed from Igor's e-mail about Python module for posting message into ELog (from analysis releases).
sit_setup addpkg LogBook V00-03-05 (or HEAD) scons |
First of all, one need to import the module and instantiate the 'poster':
from LogBook import message_poster poster = message_poster.message_poster_self ( 'AMO', experiment='amodaq09' ) |
poster.post ( 'This is just a test' ) |
msg = 'This is just a test' attachments = ['/reg/neh/home1/gapon/AFS_HOME/public_html/NewOrgChart.pdf'] poster.post ( msg, attachments=attachments ) |
attachments = ['/reg/neh/home1/gapon/AFS_HOME/public_html/NewOrgChart.pdf', 'SomeOtherFile.jpg'] poster.post ( msg, attachments=attachments ) |
msg = ... attachments = ... tags = ... poster.post ( msg, attachments=attachments, tags=tags ) |
parent_message_id = poster.post ( 'The main thread for the discussion' ) child_message_id = poster.post ( 'Here comes my reply', parent_message_id = parent_message_id ) |
For obvious reason this can't be combined with posting replies to existing messages: |
run_num = 123 poster.post ( 'Go look for this message close to that run', run_num = run_num ) |