wiki_file_to_dom(+File, +DOM) is det- DOM is the HTML dom representation for the content of File.
- wiki_codes_to_dom(+Codes, +File, -DOM)[private]
- DOM is the HTML dom representation for Codes that originate from
File.
safe_dom(+DOM0, -DOM) is det- Make a DOM from wiki text safe for rendering. PlDoc wiki text
escapes HTML, but turns e.g. `javascript:...` into a link.
This predicate replaces URL attributes that use a scheme other
than
http, https, ftp or mailto by #. Relative URLs
are kept. Embedded \Goal terms are not touched.
include(+Object, +Type, +Options)//
safe_include_file(+File, -Path) is semidet[private]- Path is the absolute path for the wiki file File included using
[[File]]. File is resolved relative to the file being rendered
and must be inside the document root. PlDoc itself resolves it
relative to the working directory, which allowed user content
such as comments to include arbitrary .txt and .md files.
file(+Path, Options)//- Trap translation of \
file(+Path, Options)
wiki_page_title(?Location, ?Title) is nondet- True when Title is the title of the wiki page at Location.
update_wiki_page_title(Location) is det- Update the cached information about a wiki file.
dom_title(+DOM, -Title) is semidet[private]- Get the title as an atom from a parsed wiki page.
- To be done
- - Currently assumes no markup in the title.
index_wiki_pages- Create a (title) index of the available wiki pages. This is
started from server/1 in a background thread.
wiki_locations(-Locations) is det[private]- True when Files is a list of all .txt files on the site.
extract_title(+DOM0, -Title, -DOM) is det- Extract the title from a wiki page. The title is considered
to be the first h<N> element.
title_text(+Title, -Text:atom) is det- Turn the title, represented as an argument to html//1 into a
plain string. Turns it into HTML, then parses the HTML and
finally extracts the string. First clause avoids this for the
common normal case.
safe_file_name(+Name)- True when Name is a file without references to parent
directories.
Re-exported predicates
The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.
doc_for_file(+File, +Options) is det- HTTP handler that writes documentation for File as HTML.
Options:
- public_only(+Bool)
- If
true (default), only emit documentation for
exported predicates.
- edit(Bool)
- If
true, provide edit buttons. Default, these buttons
are suppressed.
- title(+Title)
- Specify the page title. Default is the base name of the
file.
- Arguments:
-
| File | - Prolog file specification or xref source id. |
doc_file_objects(+FileSpec, -File, -Objects, -FileOptions, +Options) is det- Extracts relevant information for FileSpec from the PlDoc
database. FileOptions contains:
file(Title:string, Comment:string)
module(Module:atom)
- public(Public:
list(predicate_indicator)
Objects contains
doc(PI:predicate_indicator, File:Line, Comment)
We distinguish three different states for FileSpec:
- File was cross-referenced with collection enabled. All
information is in the xref database.
- File was loaded. If comments are not loaded,
cross-reference the file, while storing the comments
as the compiler would do.
- Neither of the above. In this case we cross-reference the
file.
- Arguments:
-
| FileSpec | - File specification as used for load_files/2. |
| File | - Prolog canonical filename |
ensure_doc_objects(+File) is det- Ensure we have documentation about File. If we have no comments
for the file because it was loaded before comment collection was
enabled, run the cross-referencer on it to collect the comments
and meta-information.
- Arguments:
-
| File | - is a canonical filename that is loaded. |
module_info(+File, -ModuleOptions, +OtherOptions) is det- Add options
module(Name), public(Exports) to OtherOptions if
File is a module file.
doc_hide_private(+Objs, +Public, +Options)- Remove the private objects from Objs according to Options.
private(+Obj, +Options) is semidet- True if Obj is not exported from Options. This means Options
defined a module and Obj is not member of the exports of the
module.
multifile(+Obj, +Options) is semidet- True if Obj is a multifile predicate.
is_pi(@Term) is semidet- True if Term is a predicate indicator.
unquote_filespec(+Spec, -Unquoted) is det- Translate e.g. library('semweb/rdf_db') into
library(semweb/rdf_db).
doc_write_html(+Out:stream, +Title:atomic, +DOM) is det- Write HTML for the documentation page DOM using Title to Out.
doc_page_dom(+Title, +Body, -DOM) is det- Create the complete HTML DOM from the Title and Body. It adds
links to the style-sheet and javaScript files.
print_html_head(+Out:stream) is det- Print the
DOCTYPE line.
doc_tag_title(+Tag, -Title) is det- Title is the name to use for Tag in the generated documentation.
is_op_type(+Atom, ?Type)- True if Atom is an operator of Type. Type is one of
prefix,
infix or postfix.
object_href(+Object, -HREF) is det
object_href(+Object, -HREF, +Options) is det- HREF is the URL to access Object.
localise_object(+ObjIn, -ObjOut) is det- Abstract path-details to make references more stable over
versions.
existing_linked_file(+File, -Path) is semidet- True if File is a path to an existing file relative to the
current file. Path is the absolute location of File.
doc_for_wiki_file(+File, +Options) is det- Write HTML for the File containing wiki data.
mode_anchor_name(+Mode, -Anchor:atom) is det- Get the anchor name for a mode.
pred_anchor_name(+Head, -PI:atom/integer, -Anchor:atom) is det- Create an HTML anchor name from Head.
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
object_footer(Arg1, Arg2, Arg3, Arg4)
cite(Arg1, Arg2, Arg3)
object_page_header(Arg1, Arg2, Arg3, Arg4)
nopredref(Arg1, Arg2, Arg3)
pred_edit_button(Arg1, Arg2, Arg3, Arg4)
source_button(Arg1, Arg2, Arg3, Arg4)
object_source_button(Arg1, Arg2, Arg3, Arg4)
file_header(Arg1, Arg2, Arg3, Arg4)
object_name(Arg1, Arg2, Arg3, Arg4)
objects(Arg1, Arg2, Arg3, Arg4)
object_page(Arg1, Arg2, Arg3, Arg4)
file(Arg1, Arg2, Arg3)
object_page_footer(Arg1, Arg2, Arg3, Arg4)
wiki_file_codes_to_dom(Arg1, Arg2, Arg3)
predref(Arg1, Arg2, Arg3, Arg4)
object_synopsis(Arg1, Arg2, Arg3, Arg4)
zoom_button(Arg1, Arg2, Arg3, Arg4)
edit_button(Arg1, Arg2, Arg3, Arg4)
object_edit_button(Arg1, Arg2, Arg3, Arg4)
wiki_extension(Arg1)
tags(Arg1, Arg2, Arg3)
doc_resources(Arg1, Arg2, Arg3)
term(Arg1, Arg2, Arg3, Arg4, Arg5)
object_ref(Arg1, Arg2, Arg3, Arg4)
predref(Arg1, Arg2, Arg3)
flagref(Arg1, Arg2, Arg3)
object_tree(Arg1, Arg2, Arg3, Arg4, Arg5)