kibi-core 0.7.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/schema/entities.pl +16 -0
- package/schema/relationships.pl +2 -0
- package/schema/validation.pl +59 -31
- package/src/checks.pl +419 -6
- package/src/kb.pl +22 -1
- package/src/logic_ir.pl +629 -0
- package/src/sparql_client.pl +23 -1
- package/src/status.pl +9 -0
package/src/status.pl
CHANGED
|
@@ -117,6 +117,7 @@ documentation_markdown_untracked(WorkspaceRoot) :-
|
|
|
117
117
|
documentation_markdown_file(Path, Path) :-
|
|
118
118
|
exists_file(Path),
|
|
119
119
|
file_name_extension(_, md, Path),
|
|
120
|
+
entity_documentation_file(Path),
|
|
120
121
|
\+ ignored_documentation_file(Path),
|
|
121
122
|
!.
|
|
122
123
|
documentation_markdown_file(Path, FilePath) :-
|
|
@@ -140,6 +141,7 @@ known_source_path(RelativePath) :-
|
|
|
140
141
|
|
|
141
142
|
directory_tree_newer(Path, SnapshotTime) :-
|
|
142
143
|
exists_file(Path),
|
|
144
|
+
entity_documentation_file(Path),
|
|
143
145
|
\+ ignored_documentation_file(Path),
|
|
144
146
|
time_file(Path, EntryTime),
|
|
145
147
|
EntryTime > SnapshotTime,
|
|
@@ -218,5 +220,12 @@ source_value_atom(Val, Atom) :-
|
|
|
218
220
|
ignored_documentation_file(Path) :-
|
|
219
221
|
file_base_name(Path, 'README.md').
|
|
220
222
|
|
|
223
|
+
entity_documentation_file(Path) :-
|
|
224
|
+
read_file_to_string(Path, Content, []),
|
|
225
|
+
sub_string(Content, 0, 3, _, "---"),
|
|
226
|
+
sub_string(Content, _, _, _, "id:"),
|
|
227
|
+
sub_string(Content, _, _, _, "title:"),
|
|
228
|
+
sub_string(Content, _, _, _, "status:").
|
|
229
|
+
|
|
221
230
|
dict_json_string(Dict, JsonString) :-
|
|
222
231
|
with_output_to(string(JsonString), json_write_dict(current_output, Dict, [])).
|