# ddf.yml - documentation data flow
#
# Format: YAML (YAML Ain't Markup Language; http://www.yaml.org)
#
#  Diagrams:
#    <name>:
#       size:   x               # diagram size (e.g., '8,6')
#       nodes:  |
#         x                     # nodes to include in diagram
#    ...
#
#  Extensions:
#    <ext>:
#      desc:    x              # description of file extension
#      shape:   x              # node shape, based on file extension
#    ...
#
# Caveats:
#
#   The YAML in this file is supplemented by that in a_ddf/file_sets.yml,
#   which ddf_y2d extracts from "#DDF" lines in the hand-edited files.
#
#   If a set of inputs is hand-edited, each of them must be mentioned
#   in inp_m.  If they are generated, a single instance will suffice.
#
# Conventions:
#
#   The default node shape for scripts is "ellipse". 
#   Other default node shapes are stored in the Extensions hash.
#
#   Hand-edited files (roughly, ./*, bin/*, and e_*/*) are filled
#   (using the dot(1) default of 'lightgrey').
#
#   No default diagram size is set.  Normally, dot(1) calculates the size,
#   based on ranksep, fontsize, etc.
#
#   If {inp,out}_m isn't defined, {inp,out}_g is used, instead.
#   If url         isn't defined, path is used, instead.
#
#   "shtml" and "yml" are the default extensions for the "octagon" and "box"
#   node shapes, respectively.
#
#   Braces and commas can be used in many of the fields, to indicate
#   variant forms of strings.  This is adopted from csh(1).
#
# Written by Rich Morin, rdm@slac.stanford.edu

#DDF    - patt:     'e_etc/ddf'
#DDF      desc:     'documentation data flow'
#DDF      exts:     'yml'

  Diagrams:

    all:
      flags:    'no_labels'
      size:     '6,9'
      nodes:    'bin/all_d2ic'

    cat:
      dash:
        - 'a_cat/*/*/*/*/*/*/*.dot -> a_cat/*/*/*/*/*/*/*.shtml'
      rank:
        same:
          - 'a_etc/use_tree.yml  bin/cat_get   a_cat/lcat_*.yml'
      nodes:    |
        a_cat/lcat_*.yml
        a_cat/*/*/both/*.shtml
        a_cat/*/*/*.{pdf,ps,tr}
        a_cat/*/*/*/*.shtml
        a_cat/*/*/*/*/*/*/*.{dot,shtml}

        a_etc/use_tree.yml

        bin/{cat_{get,y2d,y2h,y2t},tr_etc}

        e_cat/{book,cat,html}.yml
        e_etc/{function,package,rtt_fsw}.yml

    doc:
      dash:
        - 'a_ddf/*.dot     -> e_inc/ddf_*.shtml'
        - 'e_etc/ddf_*.dot -> e_inc/ddf_*.shtml'
      rank:
        same:
          - 'bin/ddf_y2d   e_etc/ddf.yml'
      nodes:    |
        ./FSW_ddf.shtml
        ./makefile

        a_ddf/*.{dot,inc}
        a_ddf/file_sets.yml
        a_ddf/makevile

        bin/ddf_{get,y2d,y2m}

        e_etc/ddf.yml
        e_etc/ddf_*.dot

        e_inc/ddf_*.shtml

    fe1:
      rank:
        same:
          - 'a_etc/use_tree.yml    bin/use_tree_get  bin/version_get'
          - 'a_etc/traveler.yml    bin/con_get'
          - 'a_pnp/Pack_*.shtml    a_pnp/Proj_*.shtml'
          - 'a_tmp/use_tree_*.dot  bin/use_tree_i2m'
      size:     '6,10'
      dash:
        - 'a_cir/*_*_*.dot         -> a_cir/*_*_*.shtml'
        - 'a_con/*_*.dot           -> a_con/*_*.shtml'
        - 'a_etc/spec_*.dot        -> ./FSW_use_tree_*.shtml'
        - 'a_etc/use_tree.dot      -> ./FSW_use_tree.shtml'
        - 'a_pnp/Pack_*.dot        -> a_pnp/Pack_*.shtml'
        - 'a_pnp/Proj_*.dot        -> a_pnp/Proj_*.shtml'
        - 'a_pnp/Proj_*_TL.grap    -> a_etc/version.inc'
        - 'a_tmp/use_tree_*.dot  -> bin/use_tree_i2m'
      nodes:    |

        ./FSW_{use_tree,use_tree_*,versions}.shtml

        a_cat/lcat_*.yml

        a_cir/*_*_*.{dot,inc,shtml}
        a_con/*_*.{dot,shtml}

        a_etc/{con,ltx,message,pkg_use}.yml
        a_etc/spec_*.{dot,inc}
        a_etc/{tag_sum,traveler}.yml
        a_etc/use_tree.{dot,inc,yml}
        a_etc/use_tree_*.mov
        a_etc/version.{inc,yml}

        a_pnp/{Pack,Proj}_*.{dot,shtml}
        a_pnp/Pack_*_con.inc
        a_pnp/Proj_*_TL.grap

        a_tmp/use_tree_*.dot

        bin/con_{get,y2d,y2h}
        bin/package_y2h
        bin/use_tree_{d2d,get,i2m,y2d}
        bin/version_{get,y2g}

        e_etc/def_{con,int}.yml
        e_etc/{function,idf,package}.yml

    fun:
      nodes:    |
        a_fun/{func_*,ndx_func}.shtml

        bin/function_y2h

        e_etc/{function,package,rtt_fsw}.yml

    glo:
      nodes:    |
        ./FSW_glossary.shtml

        a_etc/glossary.inc

        bin/glossary_y2h

        e_etc/glossary.yml

    lat:
      nodes:    |
        ./FSW_{latdocs,latdocs_t}.shtml
        
        a_etc/{latdocs,latdocs_t}.inc

        bin/latdocs_y2h

        e_etc/{codes,latdocs,personnel}.yml
        e_etc/lat_{note1,note2}.inc

    ltx:
      nodes:    |

        a_etc/ltx.yml           a_etc/use_tree.yml

        a_ltx/{dtd,pt,td,ti,xml}_*.shtml

        bin/ltx_get

        e_etc/personnel.yml

    ltx_db:
      dash:
        - 'a_etc/ltx_db.dot -> ./FSW_ltx_db.shtml'
      nodes:    |
        ./FSW_ltx_db.shtml

        a_etc/ltx_db.{dot,inc}

        bin/db_get

    msg:
      nodes:    |
        a_etc/{message,use_tree}.yml

        a_msg/*.inc

        bin/msg_get

        e_etc/package.yml

    per:
      nodes:    |
        ./FSW_personnel.shtml

        a_etc/personnel.inc

        bin/personnel_y2h

        e_etc/personnel.yml

    rtt:
      rank:
        same:
          - 'bin/rtt_y2d  e_etc/rtt_fsw.yml'
          - |
            a_tmp/misc_*.dot             a_idf/misc_*.mov
            e_idf/misc_*_anim.shtml
          - |
            a_tmp/task_*.dot bin/idf_i2m a_idf/task_*.mov
            e_idf/task_*_anim.shtml
      dash:
        - 'a_rtf/req_*.dot  -> a_rtf/req_*.shtml'
        - 'a_rtf/tst_*.dot  -> a_rtf/tst_*.shtml'
        - 'e_idf/misc_*.dot -> e_idf/misc_*.shtml'
        - 'e_idf/task_*.dot -> a_idf/task_*.shtml'
      nodes:    |
        ./FSW_tasks.shtml

        a_idf/misc_*.mov
        a_idf/{ndx_task.inc,task_*.{mov,shtml}}

        a_rtf/ndx_*_*.shtml
        a_rtf/{req,tst}_*.{dot,shtml}

        a_tmp/{misc,task}_*.dot

        bin/{idf_{d2d,i2m,y2h},rtt_{y2d,y2h}}

        e_etc/{function,idf,package,rtt_fsw}.yml

        e_idf/misc_*.{dot,shtml}
        e_idf/misc_*_anim.shtml
        e_idf/task_*.dot
        e_idf/task_*_anim.shtml
        e_idf/anim.yml

    trv:
      nodes:    |
        ./FSW_traveler.shtml

        a_etc/tag_sum.yml
        a_etc/tags_by_*.shtml
        a_etc/traveler.{inc,yml}
        
        bin/{tag_sum_get,traveler_{get,y2h}}

        e_etc/package.yml

  Extensions:

    cmap:
      desc:     'client-side image map'
      shape:    'box'
    data:
      desc:     'grap(1) input data'
      shape:    'box'
    dot:
      desc:     'dot(1) diagram layout'
      shape:    'box'
    dtr:
      desc:     'dot(1) diagram layout for troff(1)'
      shape:    'box'
    gif:
      desc:     'GIF image'
      shape:    'box'
    grap:
      desc:     'grap(1) diagram layout'
      shape:    'box'
    inc:
      desc:     'included HTML code'
      shape:    'box'
    jpeg:
      desc:     'JPEG image'
      shape:    'box'
    mov:
      desc:     'QuickTime movie'
      shape:    'box'
    pdf:
      desc:     'Adobe Portable Document Format'
      shape:    'octagon'
    pic:
      desc:     'pic(1) diagram layout'
      shape:    'box'
    png:
      desc:     'PNG image'
      shape:    'box'
    ps:
      desc:     'PostScript'
      shape:    'box'
    shtml:
      desc:     'SSI-enabled HTML page'
      shape:    'octagon'
    tr:
      desc:     'troff(1), tbl(1), ...'
      shape:    'box'
    yml:
      desc:     'YAML data file'
      shape:    'box'
