1:- module(cliopatria_binding, []).    2
    3:- throw('dont call cliopatria_binding!').    4
    5/* * module * Separate module so setting ends up in right place
    6
    7% [Optionaly 1st run] tell where ClioPatria is located and restart
    8
    9:-set_setting(cliopatria_binding:path, '../externals/ClioPatria'), save_settings('moo_settings.db').
   10*/
   11
   12:- use_module(library(settings)).   13:- use_module(library(http/thread_httpd)).   14:- use_module(library(http/http_dispatch)).   15:- use_module(library(http/html_head)).   16:- use_module(swi(library/http/html_write)).   17:- use_module(library(http/html_head)).   18:- use_module(library(http/http_path),[]).   19
   20:- multifile http:location/3.   21:- dynamic   http:location/3.   22
   23% doesn't descend from root because that's being moved for cliopatria
   24http:location(cliopatria, root(cliopatria), [priority(100)]).
   25
   26
   27:- setting(path, atom, '../externals/ClioPatria', 'Path to root of cliopatria install').   28
   29% :- load_settings('moo_settings.db').
   30
   31add_cliopatria_to_search_path :-
   32	setting(path, invalid),
   33	!,
   34	writeln('set the cliopatria path by querying set_setting(cliopatria_binding:path, \'c:/path/to/cliopatria\'), save_settings(\'moo_settings.db\').'),
   35	fail.
   36add_cliopatria_to_search_path :-
   37	setting(path, Path),
   38	asserta(user:file_search_path(cliopatria, Path)).
   39
   40
   41:- add_cliopatria_to_search_path.   42
   43:- ensure_loaded(logicmoo(dbase/dbase_rdf_entailment)).