Changeset 905


Ignore:
Timestamp:
Jun 11, 2012 5:45:28 PM (10 years ago)
Author:
jemian
Message:

learning more

Location:
specdomain/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • specdomain/src/sphinxcontrib/specdomain.py

    r904 r905  
    6868
    6969spec_paramlist_re = re.compile(r'([\[\],])')  # split at '[', ']' and ','
    70 
    71 
    72 
    73 #### re parts that recognize the start of a macro definition (def or rdef)
    74 # # ^
    75 # # [\s]*
    76 # # [r]?
    77 # # def
    78 # # [\s]+
    79 # # ([a-zA-Z_][\w]*)
    80 # #
    81 #### re parts that recognize the start of a chained macro definition (cdef)
    82 # # ^
    83 # # [\s]*
    84 # # cdef
    85 # # \(
    86 #
    87 # def _ascan ''
    88 #
    89 # kohzuMove_PV = "32ida:KohzuPutBO"
    90 # Und_Delay = 0.1
    91 #
    92 # def kohzuE_cmd(mne,key,p1) '{
    93 #      if (key == "set_position") {
    94 #       return
    95 #      }
    96 # }'
    97 #
    98 # def show_und'
    99 #    printf("\n%40.40s","Curent Undulator Status")
    100 # '
    101 #
    102 #   # cleanup macro for ^C usage
    103 #   rdef _cleanup3 \'resetUSAXS\'
    104 #   rdef _cleanup3 \'\'
    105 #      cdef("Fheader", fheader,  "UCOL", 0x20)
    106 #      rdef Flabel \'""\'
    107 
    108 
    109 #### re parts that recognize a global variable declaration
    110 # ^                                    # start of line
    111 # ([\s]*)                              # optional preceding white space
    112 # global                               # "global" declaration
    113 # ([\s]+[@]?[a-zA-Z_][\w]*(\[\])?)+    # one or more variable names
    114 # ([\s]+#.*)*                          # optional comment
    115 # $                                    # end of line
    116 
    117 # global  BCDA_GM[]
    118 #
    119 #    global    billy[]
    120 #    global    9billy[]
    121 #    global    _billy[]
    122 #
    123 # global kohzu_PV kohzuMV_PV UND_PV Und_Off UNDE_TRACK_ON
    124 # global       kohzuStop_PV kohzuMode_PV      kohzuMove_PV
    125 # global CCD_PREFIX            # EPICS PV for CCD server
    126 # global CCD_OVERHEAD_SECS        # readout time
    127 # global CCD_OVERHEAD_SECS_MEASURED   # measured readout time
    128 #
    129 #     global @A_name[] @B_name[]
    130 #        unglobal @A_name
    131 #        unglobal @B_name
    132 # global CCD_DARK_NUM CCDDARK CCD_THROW
    133 # global MULTI_IMGS # useful 8-ID's imm fileformat; currently not used
    13470
    13571
     
    529465            arity = min(arities)
    530466        if arity in arities:
    531              docname, targetname = arities[arity]
    532              return targetname, docname
     467            docname, targetname = arities[arity]
     468            return targetname, docname
    533469        return None, None
    534470
     
    557493
    558494    def get_objects(self):
    559         for refname, (docname, type) in self.data['objects'].iteritems():
    560             yield (refname, refname, type, docname, refname, 1)
     495        for refname, (docname, doctype) in self.data['objects'].iteritems():
     496            yield (refname, refname, doctype, docname, refname, 1)
    561497
    562498
    563499def setup(app):
    564500    app.add_domain(SpecDomain)
     501    # http://sphinx.pocoo.org/ext/appapi.html#sphinx.domains.Domain
  • specdomain/src/test/hints.rst

    r904 r905  
    1111* http://sphinx.pocoo.org/ext/tutorial.html
    1212* https://bitbucket.org/birkenfeld/sphinx-contrib/
     13* http://sphinx.pocoo.org/ext/appapi.html#sphinx.domains.Domain
     14
     15.. note:: Per ``src/refs/sphinx-contrib/README``,
     16        *Use "make-ext.py" to set up your extension subdirectory.*
     17       
     18        There is also a useful comment about using ``ez_setup.py``.
    1319
    1420
Note: See TracChangeset for help on using the changeset viewer.