
examples.pl -- Serve example filesLocate and serve files for the Examples menu as well as examples included from overview notebooks. The examples come from two sources:
examples. Such files are
distributed with SWISH.example. Such files can be created by the
users.This module also makes the known examples available through swish_provides/1 for supporting conditional statements on example overview notebooks.
list_examples(+Request)[private]swish_examples('index.json').
examples(JSON:list, +Options) is det[private]example.
index_json(+BaseHREF, +Directory, -JSON)[private]index.json is
provided, use this file and add the not-described files as
examples that are not included in the menu. If no index.json
is present, all files are added as example files.
add_examples_href(+HREF, +JSON0, -JSON) is det[private]href key pointing at the example. Also removes all items
that are not dicts or have no file key.
ex_file_json(+ExampleBase, +Path, -JSON) is det[private]
md_eval:provides(?Term) is nondet[multifile]
:- if(swish_provides(example('chat80.pl',_,_))).
...
:- endif.
community_examples(-Dict) is det[private]