This shows you the differences between two versions of the page.
|
docs:plwiki1ex [2017/09/19 14:31] |
docs:plwiki1ex [2022/03/23 16:59] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ~~NOCACHE~~ | ||
| + | ====== PlWiki 1.0 - Plugin API examples ====== | ||
| + | |||
| + | ===== Simple use case ===== | ||
| + | |||
| + | <pl cache=" | ||
| + | woman(kate). | ||
| + | man(john). | ||
| + | </pl> | ||
| + | |||
| + | IMPORTANT: This knowledge is not saved in cache !! | ||
| + | |||
| + | ===== Adding knowledge to the page ===== | ||
| + | |||
| + | <pl cache=" | ||
| + | man(jack). | ||
| + | man(jim). | ||
| + | </pl> | ||
| + | |||
| + | |||
| + | IMPORTANT: cache=" | ||
| + | |||
| + | |||
| + | ===== Goal and scope ==== | ||
| + | |||
| + | <pl goal=" | ||
| + | |||
| + | </pl> | ||
| + | |||
| + | ===== Prolog interface ===== | ||
| + | |||
| + | * list all predicates in selected scope: | ||
| + | |||
| + | <pl goal=" | ||
| + | % | ||
| + | </pl> | ||
| + | |||
| + | * list info about selected predicate: | ||
| + | <pl goal=" | ||
| + | % | ||
| + | </pl> | ||
| + | |||
| + | ====== Additional functionality ====== | ||
| + | |||
| + | |||
| + | Plugin automatically saves information about page structure. In each scope several predicates are available: | ||
| + | * header(Name, | ||
| + | * internallink(Scope, | ||
| + | * externallink(Name, | ||
| + | |||