Changeset a42b091 in sasmodels for doc/genmodel.py


Ignore:
Timestamp:
Mar 30, 2019 12:23:16 AM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master
Children:
d57b06c
Parents:
c1e44e5
Message:

suggest a way to do syntax highlighting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/genmodel.py

    rc1e44e5 ra42b091  
    157157    downloads = [":download:`%s <src/%s>`"%(path, path) for path in sources] 
    158158 
     159    # Could do syntax highlighting on the model files by creating a rst file 
     160    # beside each source file named containing source file with 
     161    # 
     162    #    src/path.rst: 
     163    # 
     164    #    .. {{ path.replace('/','_') }}: 
     165    # 
     166    #    .. literalinclude:: {{ src/path }} 
     167    #        :language: {{ "python" if path.endswith('.py') else "c" }} 
     168    #        :linenos: 
     169    # 
     170    # and link to it using 
     171    # 
     172    #     colors = [":ref:`%s`"%(path.replace('/','_')) for path in sources] 
     173    # 
     174    # Probably need to dump all the rst files into an index.rst to build them. 
     175 
    159176    # Link to github repo (either the tagged sasmodels version or master) 
    160177    url = "https://github.com/SasView/sasmodels/blob/v%s"%sasmodels.__version__ 
Note: See TracChangeset for help on using the changeset viewer.