This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 8ea843a Automatically pick up files
8ea843a is described below
commit 8ea843abea6e18b67642606dbda0ab0d55b7c11b
Author: Sebb <[email protected]>
AuthorDate: Thu Feb 25 12:56:52 2021 +0000
Automatically pick up files
---
www/test/dataflow.cgi | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/www/test/dataflow.cgi b/www/test/dataflow.cgi
index d5c0e03..898486e 100755
--- a/www/test/dataflow.cgi
+++ b/www/test/dataflow.cgi
@@ -6,21 +6,24 @@ require 'json'
# Command line use: emit replacement for www/public/README.html
# Centralize maintenance of descriptions
-DATAFLOWDATA = 'dataflow.json'
+DATAFLOWDATA = File.join(File.dirname(__FILE__), 'dataflow.json')
DATAFLOWDOC = 'https://whimsy.apache.org/test/dataflow.cgi#'
deplist = JSON.parse(File.read(DATAFLOWDATA))
+README = '/srv/whimsy/www/public/README.html'
# Command line outputs to stdout raw HTML for README.html
unless ENV['SCRIPT_NAME']
- puts %Q|<h2>Public JSON files</h2><dl>|
- puts %Q|<!-- DO NOT EDIT THIS FILE - manually regenerated editing
dataflow.json and by running: ruby www/test/dataflow.cgi -->|
- deplist.each do |path, entry|
- next if path !~ /whimsy.apache.org\/public/
- puts %Q|<dt>#{File.basename(path)}</dt>|
- puts %Q| <dd>#{entry['description']} (<a
href="#{DATAFLOWDOC}#{path}">docs</a>)</dd>|
+ File.open(README,'w') do |out|
+ out.puts %Q|<h2>Public JSON files</h2><dl>|
+ out.puts %Q|<!-- DO NOT EDIT THIS FILE - manually regenerated by editing
dataflow.json and then running: ruby www/test/dataflow.cgi -->|
+ deplist.each do |path, entry|
+ next if path !~ /whimsy.apache.org\/public/
+ out.puts %Q|<dt>#{File.basename(path)}</dt>|
+ out.puts %Q| <dd>#{entry['description']} (<a
href="#{DATAFLOWDOC}#{path}">docs</a>)</dd>|
+ end
+ out.puts %Q|</dl><br/>For more information <a
href="https://whimsy.apache.org/docs/">see API docs</a>|
+ out.puts %Q|and the <a
href="https://github.com/apache/whimsy/blob/master/DEPLOYMENT.md#configuration-locations">public
JSON generator scripts</a>.|
end
- puts %Q|</dl><br/>For more information <a
href="https://whimsy.apache.org/docs/">see API docs</a>|
- puts %Q|and the <a
href="https://github.com/apache/whimsy/blob/master/DEPLOYMENT.md#configuration-locations">public
JSON generator scripts</a>.|
exit
end