PlDoc --- SWI-Prolog source documentation

The pldoc module processes structured comments in Prolog source files. These comments can be saved to file. During development the documentation system can start a web-server to view the documentation of loaded sources through your browser. The server is defined in the file doc_http.pl and started through doc_server/1.

During development, a typical scenario is to first start the documentation server and start a browser at http://localhost:4000. Note that by default the web-pages allow for starting an editor only if the connection comes from localhost. See doc_server/2 to realise a different setup.

:- doc_server(4000).
:- [application].
author
- Jan Wielemaker
See also
- doc_server/1, doc_server/2, doc_collect/1.
license
- LGPL

Prolog files

doc_access.plShow source
host_access_options/2Filter the authorization options from AllOptions, leaving the remaining options in NoAuthOptions.Source
doc_colour.pl  -- Source colouring supportShow source
colour_fragments/2Create a list of colour fragments from In.Source
doc_html.pl  -- PlDoc HTML backendShow source
doc_file_objects/5Extracts relevant information for FileSpec from the PlDoc database.Source
doc_for_file/2HTTP handler that writes documentation for File as HTML.Source
doc_for_wiki_file/2Write HTML for the File containing wiki data.Source
doc_hide_private/3Remove the private objects from Objs according to Options.Source
doc_page_dom/3Create the complete HTML DOM from the Title and Body.Source
doc_resources/3Include required resources (CSS, JS) into the output.Source
doc_tag_title/2Title is the name to use for Tag in the generated documentation.Source
doc_write_html/3Write HTML for the documentation page DOM using Title to Out.Source
edit_button/4Create an edit button for File.Source
ensure_doc_objects/1Ensure we have documentation about File.Source
existing_linked_file/2True if File is a path to an existing file relative to the current file.Source
file/3Create a link to another filename if the file exists.Source
file/4Create a link to another filename if the file exists.Source
file_header/4Create the file header.Source
include/5Inline FileName.Source
is_op_type/2True if Atom is an operator of Type.Source
is_pi/1True if Term is a predicate indicator.Source
mode_anchor_name/2Get the anchor name for a mode.Source
module_info/3Add options module(Name), public(Exports) to OtherOptions if File is a module file.Source
multifile/2True if Obj is a multifile predicate.Source
object_edit_button/4Create a button for editing Object.Source
object_href/2HREF is the URL to access Object.Source
object_name/4HTML description of documented Obj.Source
object_page/4Generate an HTML page describing Obj.Source
object_page_footer/4Call the hook doc_object_page_footer//2.Source
object_ref/4Create a hyperlink to Object.Source
object_source_button/4Create a button for showing the source of Object.Source
object_synopsis/4Provide additional information about Obj.Source
object_tree/5Render a tree of objects used for navigation.Source
objects/4Emit the documentation body.Source
pred_anchor_name/3Create an HTML anchor name from Head.Source
pred_edit_button/4Create a button for editing the given predicate.Source
predref/3Create a reference to a predicate.Source
predref/4Create a reference to a predicate.Source
print_html_head/1Print the DOCTYPE line.Source
private/2True if Obj is not exported from Options.Source
source_button/4Add show-source button.Source
tags/3Emit the @tag tags of a description.Source
term/5Process the \term element as produced by doc_wiki.pl.Source
unquote_filespec/2Translate e.g.Source
zoom_button/4Add zoom in/out button to show/hide the private documentation.Source
doc_is_public_object/1Hook that allows objects to be displayed with the default public-only view.
doc_htmlsrc.pl  -- HTML source pretty-printerShow source
source_to_html/3Colourise Prolog source as HTML.Source
doc_index.pl  -- Create indexesShow source
dir_index/4Create an index for all Prolog files appearing in Dir or in any directory contained in Dir.Source
doc_file_href/2Create a /doc HREF from Path.Source
doc_for_dir/2Write summary index for all files in Dir to Out.Source
doc_links/4Provide overview links and search facilities.Source
file_index_header/4Create an entry in a summary-table for File.Source
object_summaries/5Create entries in a summary table for Objects.Source
places_menu/3Create a select menu with entries for all loaded directories.Source
source_directory/1True if Dir is a directory from which we have loaded Prolog sources.Source
doc_man.pl  -- Process SWI-Prolog HTML manualsShow source
clean_man_index/0Clean already loaded manual index.Source
current_man_object/1Source
index_man_directory/2Index the HTML directory Dir.Source
index_man_file/2Collect the documented objects from the SWI-Prolog manual file File.Source
man_content_tree/2Compute the content tree for a multi-file HTML document.Source
man_overview/3Provide a toplevel overview on the manual: the reference manual and the available packages.Source
man_packages_tree/1Tree is the content tree of all packages.Source
man_page/4Produce a Prolog manual page for Obj.Source
doc_object_href/2Produce a HREF for section objects.Source
doc_object_link/4Provide the HTML to describe Obj for linking purposes.Source
doc_modes.pl  -- Analyse PlDoc mode declarationsShow source
compile_clause/2Add a clause to the compiled program.Source
compile_mode/2Compile a PlDoc mode declararion into a term mode(Head, Determinism).Source
is_mode/1True if Head is a valid mode-term.Source
mode/2True if there is a mode-declaration for Head with Det.Source
mode_indicator/1Our defined argument-mode indicators.Source
modes_to_predicate_indicators/2Create a list of predicate indicators represented by Modes.Source
process_modes/6Process the formal header lines (upto the first blank line), returning the remaining lines and the names of the arguments used in the various header lines.Source
doc_pack.pl  -- PlDoc for Prolog extension packsShow source
doc_pack/1Generate stand-alone documentation for the package Pack.Source
doc_process.pl  -- Process source documentationShow source
doc_comment/4True if Comment is the comment describing object.Source
doc_file_has_comments/1True if we have loaded comments from Source.Source
doc_file_name/3Doc is the name of the file for documenting Source.Source
is_structured_comment/2True if Comment is a structured comment that should use Prefixes to extract the plain text using indented_lines/3.Source
parse_comment/3True when Comment is a structured comment and Parsed is its parsed representation.Source
process_comments/3Processes comments returned by read_term/3 using the comments option.Source
predicate_summary/2Provide predicate summaries to the XPCE class prolog_predicate, used by the IDE tools.Source
doc_register.plShow source
doc_search.pl  -- Search form and replyShow source
matching_object_table/4Show a list of matching objects, similar to a result-set from search.Source
search_form/3Create a search input field.Source
search_reply/4Generate a reply searching for For.Source
doc_util.pl  -- PlDoc utilitiesShow source
atom_pi/2Translate an external predicate indicator representated as an atom into a predicate indicator term.Source
ensure_slash_end/2Ensure Dir ends with a /.Source
expand_alias/2Translate an aliased path to a native path.Source
insert_alias/2Translate a native path to an aliased path.Source
doc_wiki.pl  -- PlDoc wiki parserShow source
autolink_extension/2True if Ext is a filename extensions that create automatic links in the documentation.Source
autolink_file/2Files to which we automatically create links, regardless of the extension.Source
indented_lines/3Extract a list of lines without leading blanks or characters from Prefix from Text.Source
normalise_white_space/3Text is input after deleting leading and trailing white space and mapping all internal white space to a single space.Source
section_comment_header/3Processes /** <section> comments.Source
strip_leading_par/2Remove the leading paragraph for environments where a paragraph is not required.Source
summary_from_lines/2Produce a summary for Lines.Source
wiki_codes_to_dom/3Translate a plain text into a DOM term.Source
wiki_lines_to_dom/3Translate a Wiki text into an HTML term suitable for html//1 from the html_write library.Source
doc_wiki_face/4Hook that can be used to provide additional processing for additional inline wiki constructs.
url_expansion_hook/3This hook is called after recognising <Alias:Rest>, where Term is of the form Alias(Rest).