File: adding-a-manual.rst

package info (click to toggle)
ecflow 5.15.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 51,868 kB
  • sloc: cpp: 269,341; python: 22,756; sh: 3,609; perl: 770; xml: 333; f90: 204; ansic: 141; makefile: 70
file content (71 lines) | stat: -rw-r--r-- 2,425 bytes parent folder | download
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
.. index::
   single: manual (tutorial)

.. _tutorial-manual:

Adding a manual
===============
  
A :term:`manual page` allows including documentation directly **in** a :term:`ecf script` to be viewed in :term:`ecflow_ui`.

The manual page is the concatenation of all the text within the :code:`%manual` and :code`%end` :term:`directives`.

To include the manual for task :code:`t2`, modify :file:`t2.ecf` to include the following:

.. code-block:: shell
   :caption: $HOME/course/test/f1/t2.ecf

   %manual
      Manual for task t2
      Operations: if this task fails, set it to complete and report next working day
      Analyst:    Check something ?
   %end

   %include "../head.h" 
   echo "I am part of a suite that lives in %ECF_HOME%" 
   %include "../tail.h" 

   %manual

      There can be multiple manual pages in the same file.
      When viewed they are simply concatenated.
   %end

A manual page can also be added to a family and suite node.

To add a manual page for family :code:`f1`, create a file named :file:`f1.man`
with the following content in the directory :file:`{{HOME}}/course/test`:

.. code-block:: shell
   :caption: $HOME/course/test/f1.man (Family Manual Page)

   This manual is for family %FAMILY%
   It can have any text and will also have variable substitution
   Notice that this does not have manual..end since the whole file is a manual page.

To add a manual page for suite :code:`test`, create a file named :file:`test.man``
with the following content in the directory :file:`{{HOME}}/course`:

.. code-block:: shell
   :caption: $HOME/course/test.man (Suite Manual Page)

   %manual
   This is the manual page for the %SUITE% suite.
   It lives in %ECF_HOME%
   %end
   This text is not visible in the man page since it is out side of the %manual..%end

.. important::

   Notice that for family and suite nodes, the enclosure in :code:`%manual ... %end`
   is not strictly necessary. However, adding :code:`%manual ... %end` allows to decide
   what parts are made visible when using :term:`ecflow_ui`.

**What to do**

#. Add the task manual to :file:`t2.ecf` script
#. Add the file :file:`f1.man`
#. Add the file :file:`test.man`
#. View the :term:`manual page` for :term:`task` :code:`t2` in :term:`ecflow_ui`
#. View the :term:`manual page` for :term:`family` :code:`f1` in :term:`ecflow_ui`
#. View the :term:`manual page` for :term:`suite` :code:`test` in :term:`ecflow_ui`