Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aarroyoc/doclog
DocLog builds documentation from source code in Prolog
https://github.com/aarroyoc/doclog
Last synced: 2 months ago
JSON representation
DocLog builds documentation from source code in Prolog
- Host: GitHub
- URL: https://github.com/aarroyoc/doclog
- Owner: aarroyoc
- License: bsd-3-clause
- Created: 2022-09-18T12:30:42.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-29T21:53:11.000Z (3 months ago)
- Last Synced: 2024-10-29T23:49:12.559Z (3 months ago)
- Language: Prolog
- Size: 31.3 KB
- Stars: 22
- Watchers: 3
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - aarroyoc/doclog - DocLog builds documentation from source code in Prolog (Prolog)
README
# DocLog
Create documentation from your Prolog code
Example, Scryer Prolog documentation: https://www.scryer.pl
## How to document your code?
There are two kind of comments in DocLog: module and predicate.
Each file/module has the option to write a module comment. It will be displayed at the beginning of the page. You can use [Djot](https://djot.net/) inside the comment. The syntax is:
```
/**
COMMENT
MORE COMMENT
*/
```Predicate comments start with %% and they're followed by N % comments. Of those lines, the first line comment should be empty. You should indicate in the first line, the name of the predicate, var names and modes. Then you can use [Djot](https://djot.net/) to explain the rest of the predicate.
```
%% append(L0, L1, L)
%
% L is L0 and L1 appended together
```## Using Doclog
First, clone the repo:
```
$ git clone https://github.com/aarroyoc/doclog
$ cd doclog
```Then, install the dependencies:
```
$ make setup
```After that, you must create a configuration file called `doclog.config.pl`. This file will contain several options required to document your project, and must be in your source directory. Take a look at `scryer.config.pl` for an example file.
With your config file, you can execute Doclog:
```
bash doclog.sh SOURCE_FOLDER OUTPUT_FOLDER
```And wait for the docs to be generated!