ford.output module#
- class ford.output.AbsIntList(data, proj, obj=None)#
Bases:
ListPage
- list_page = 'absint_list.html'#
- out_page = 'absint.html'#
- class ford.output.AbsIntPage(data, proj, obj=None)#
Bases:
DocPage
- page_path = 'nongenint_page.html'#
- payload_key = 'interface'#
- class ford.output.BasePage(data, proj, obj=None)#
Bases:
object
Abstract class for representation of pages in the documentation.
- data
Dictionary containing project information (to be used when rendering)
- proj
FortranProject object
- obj
The object/item in the code which this page is documenting
- property html#
Wrapper for only doing the rendering on request (drastically reduces memory)
- render(data, proj, obj)#
Get the HTML for the page. This method must be overridden. Arguments are proj_data, project object, and item in the code which the page documents.
- class ford.output.BlockList(data, proj, obj=None)#
Bases:
ListPage
- list_page = 'block_list.html'#
- out_page = 'blockdata.html'#
- class ford.output.BlockPage(data, proj, obj=None)#
Bases:
DocPage
- page_path = 'block_page.html'#
- payload_key = 'blockdat'#
- class ford.output.DocPage(data, proj, obj=None)#
Bases:
BasePage
Abstract class to be inherited by all pages for items in the code.
- property loc#
- property object_page#
- property outfile#
- property page_path#
- property payload_key#
- render(data, project, object)#
Get the HTML for the page. This method must be overridden. Arguments are proj_data, project object, and item in the code which the page documents.
- class ford.output.Documentation(settings, proj_docs, project, pagetree)#
Bases:
object
Represents and handles the creation of the documentation files from a project.
- class ford.output.FileList(data, proj, obj=None)#
Bases:
ListPage
- list_page = 'file_list.html'#
- out_page = 'files.html'#
- class ford.output.FilePage(data, proj, obj=None)#
Bases:
DocPage
- page_path = 'file_page.html'#
- payload_key = 'src'#
- class ford.output.GenericInterfacePage(data, proj, obj=None)#
Bases:
DocPage
- page_path = 'genint_page.html'#
- payload_key = 'interface'#
- class ford.output.IndexPage(data, proj, obj=None)#
Bases:
ListTopPage
- list_page = 'index.html'#
- class ford.output.InterfacePage(data, proj, obj=None)#
Bases:
DocPage
- page_path = 'nongenint_page.html'#
- payload_key = 'interface'#
- class ford.output.ListPage(data, proj, obj=None)#
Bases:
BasePage
- property list_page#
- property out_page#
- property outfile#
- render(data, proj, obj)#
Get the HTML for the page. This method must be overridden. Arguments are proj_data, project object, and item in the code which the page documents.
- class ford.output.ListTopPage(data, proj, obj=None)#
Bases:
BasePage
- property list_page#
- property outfile#
- render(data, proj, obj)#
Get the HTML for the page. This method must be overridden. Arguments are proj_data, project object, and item in the code which the page documents.
- class ford.output.ModList(data, proj, obj=None)#
Bases:
ListPage
- list_page = 'mod_list.html'#
- out_page = 'modules.html'#
- class ford.output.ModulePage(data, proj, obj=None)#
Bases:
DocPage
- page_path = 'mod_page.html'#
- payload_key = 'module'#
- class ford.output.NamelistList(data, proj, obj=None)#
Bases:
ListPage
- list_page = 'namelist_list.html'#
- out_page = 'namelists.html'#
- class ford.output.NamelistPage(data, proj, obj=None)#
Bases:
DocPage
- page_path = 'namelist_page.html'#
- payload_key = 'namelist'#
- class ford.output.PagetreePage(data, proj, obj=None)#
Bases:
BasePage
- property loc#
- property outfile#
- render(data, proj, obj)#
Get the HTML for the page. This method must be overridden. Arguments are proj_data, project object, and item in the code which the page documents.
- writeout()#
- class ford.output.ProcList(data, proj, obj=None)#
Bases:
ListPage
- list_page = 'proc_list.html'#
- out_page = 'procedures.html'#
- ford.output.ProcPage(data, proj, obj)#
Factory function for creating procedure or interface pages
- class ford.output.ProcedurePage(data, proj, obj=None)#
Bases:
DocPage
- page_path = 'proc_page.html'#
- payload_key = 'procedure'#
- class ford.output.ProgList(data, proj, obj=None)#
Bases:
ListPage
- list_page = 'prog_list.html'#
- out_page = 'programs.html'#
- class ford.output.ProgPage(data, proj, obj=None)#
Bases:
DocPage
- page_path = 'prog_page.html'#
- payload_key = 'program'#
- class ford.output.SearchPage(data, proj, obj=None)#
Bases:
ListTopPage
- list_page = 'search.html'#
- class ford.output.TypeList(data, proj, obj=None)#
Bases:
ListPage
- list_page = 'types_list.html'#
- out_page = 'types.html'#
- class ford.output.TypePage(data, proj, obj=None)#
Bases:
DocPage
- page_path = 'type_page.html'#
- payload_key = 'dtype'#
- ford.output.copytree(src, dst)#
Wrapper around shutil.copytree that: a) doesn’t try to set xattrs; and b) ensures modification time is time of current FORD run
- Return type:
- ford.output.is_more_than_one(collection)#
- ford.output.meta(entity, item)#
Get item from entity’s meta dict, but give a more helpful error message if entity doesn’t have a meta attribute
Hopefully gives a better error than the common “RuntimeError: ‘str object’ has no attribute ‘meta’”