swish/commit

New upstream files

authorJan Wielemaker
Wed Jun 21 11:54:26 2017 +0200
committerJan Wielemaker
Wed Jun 21 11:54:26 2017 +0200
commit751daf1fd2834ba25122fcdf1f21ef51155371b0
tree0f65d955326a15a6463c3dc1bc37e9b2d82f6b3b
parentedff8ebbc5b8619203b2df6493fd1e73c88f81eb
Diff style: patch stat
diff --git a/client/README.md b/client/README.md
index f666370..d811662 100644
--- a/client/README.md
+++ b/client/README.md
@@ -51,6 +51,10 @@ Check out [JavaPengines](https://github.com/Anniepoo/JavaPengine)
 
 Check out [RubyPengines](https://github.com/simularity/RubyPengine)
 
+## Extracting results using Erlang
+
+Check out [erl_pengine](https://github.com/Limmen/erl_pengine)
+
 ---
 If you write or find another client, please make a pull request for this
 page!
diff --git a/examples/swish_tutorials.swinb b/examples/swish_tutorials.swinb
index 07df164..1ca0b81 100644
--- a/examples/swish_tutorials.swinb
+++ b/examples/swish_tutorials.swinb
@@ -30,6 +30,7 @@ The notebooks below explain the basics of using R from SWISH.  You can test whet
 ### More elaborate examples
 
   - [EM Clustering of the Iris Dataset](example/iris.swinb)
+  - [SIATEC pattern discovery in polyphonic music](example/siatec.swinb)
 </div>
 
 </div>
diff --git a/lib/swish/page.pl b/lib/swish/page.pl
index c461fa0..8a18866 100644
--- a/lib/swish/page.pl
+++ b/lib/swish/page.pl
@@ -413,7 +413,7 @@ swish_content(Options) -->
 	swish_resources,
 	swish_config_hash(Options),
 	swish_options(Options),
-	html(div([id(content), class([container, swish])],
+	html(div([id(content), class([container, 'tile-top'])],
 		 [ div([class([tile, horizontal]), 'data-split'('50%')],
 		       [ div([ class([editors, tabbed])
 			     ],
@@ -640,7 +640,7 @@ load_error(E, Source) :-
 %
 %	Determine the type of document.
 %
-%	@arg Type is one of `notebook` or `prolog`
+%	@arg Type is one of `swinb` or `pl`
 
 document_type(Type, Options) :-
 	(   option(type(Type0), Options)
@@ -649,9 +649,16 @@ document_type(Type, Options) :-
 	    file_name_extension(_, Type0, Meta.name),
 	    Type0 \== ''
 	->  Type = Type0
+	;   option(st_type(external), Options),
+	    option(url(URL), Options),
+	    file_name_extension(_, Ext, URL),
+	    ext_type(Ext, Type)
+	->  true
 	;   Type = pl
 	).
 
+ext_type(swinb, swinb).
+
 
 		 /*******************************
 		 *	     RESOURCES		*
diff --git a/lib/swish/paths.pl b/lib/swish/paths.pl
index 02f262a..cda2500 100644
--- a/lib/swish/paths.pl
+++ b/lib/swish/paths.pl
@@ -46,6 +46,7 @@
     http:location/3.
 
 user:file_search_path(data,           data).
+user:file_search_path(config_enabled, 'config-enabled').
 user:file_search_path(config_enabled, swish('config-enabled')).
 user:file_search_path(config,         config_enabled(.)).
 user:file_search_path(config,         swish('config-available')).
diff --git a/lib/swish/plugin/email.pl b/lib/swish/plugin/email.pl
index a789722..da1899e 100644
--- a/lib/swish/plugin/email.pl
+++ b/lib/swish/plugin/email.pl
@@ -73,7 +73,7 @@ confirmation (of the email address) as well as for notifications.
 
 :- setting(timeout, integer, 24*3600*7,
            "Timeout for handling email reply").
-:- setting(database, callable, swish('data/confirm.db'),
+:- setting(database, callable, data('confirm.db'),
            "File specification for E-mail confirmations").
 :- setting(subject_prefix, atom, '[SWISH] ',
            "Prefix for the subject of emails sent").
diff --git a/web/help/about.html b/web/help/about.html
index db181df..6df9eb8 100644
--- a/web/help/about.html
+++ b/web/help/about.html
@@ -74,8 +74,8 @@ Master Games</a>, designed by
 </p>
 
 <div class="github">
-<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=SWI-Prolog&amp;repo=swish&amp;type=watch&amp;count=true" width="100" height="20" title="Star on GitHub"></iframe>
-<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=SWI-Prolog&amp;repo=swish&amp;type=fork&amp;count=true" width="102" height="20" title="Fork on GitHub"></iframe>
+<iframe class="github-btn" src="https://ghbtns.com/github-btn.html?user=SWI-Prolog&amp;repo=swish&amp;type=watch&amp;count=true" width="100" height="20" title="Star on GitHub"></iframe>
+<iframe class="github-btn" src="https://ghbtns.com/github-btn.html?user=SWI-Prolog&amp;repo=swish&amp;type=fork&amp;count=true" width="102" height="20" title="Fork on GitHub"></iframe>
 </div>
 
 <div class=acknowledgement>
diff --git a/web/help/help.html b/web/help/help.html
index 9bc2de1..dd16e96 100644
--- a/web/help/help.html
+++ b/web/help/help.html
@@ -208,6 +208,8 @@ providing the parameters below.  The URL accepts both `GET` and `POST` requests.
   <dl class="dl-horizontal">
   <dt>code<dd>
   Either the concrete code or a URL from which the code will be downloaded.
+  If <code>code</code> is a URL and the extension is <code>.swinb</code>,
+  the data is loaded into a SWISH notebook.
   </dd>
   <dt>background<dd>
   As <code>code</code>, but this part of the code will not be visible in
@@ -228,5 +230,11 @@ providing the parameters below.  The URL accepts both `GET` and `POST` requests.
 http://swish.swi-prolog.org/?code=https://github.com/SWI-Prolog/swipl-devel/raw/master/demo/likes.pl&amp;q=likes(sam,Food).</pre>
 <a target="_blank" href="http://swish.swi-prolog.org/?code=https://github.com/SWI-Prolog/swipl-devel/raw/master/demo/likes.pl&amp;q=likes(sam,Food).">Try it!</a> (launches a new tab)
 
+<p>The URL below opens <span style="color:darkblue">SWI</span><span style="color:maroon">SH</span> on notebook.
+
+<pre>
+http://localhost:3050/?code=https://raw.githubusercontent.com/SWI-Prolog/swish/master/examples/htmlcell.swinb</pre>
+<a target="_blank" href="http://localhost:3050/?code=https://raw.githubusercontent.com/SWI-Prolog/swish/master/examples/htmlcell.swinb">Try it!</a> (launches a new tab)
+
 </body>
 </html>