From 8f18aee362c4538c55ad8727eb5e406f0d9ae493 Mon Sep 17 00:00:00 2001 From: kinoshita-eos Date: Tue, 16 Dec 2014 14:54:03 +0900 Subject: [PATCH] Add: tutorial for PIONE about Interaction API. new file: SampleCode/PIONE/Basic9/Annotation.pione new file: SampleCode/PIONE/Basic9/Interaction.pione new file: SampleCode/PIONE/Basic9/Main.pione new file: SampleCode/PIONE/Basic9/bin/list.cgi new file: SampleCode/PIONE/Basic9/etc/Index.html --- SampleCode/PIONE/Basic9/Annotation.pione | 3 +++ SampleCode/PIONE/Basic9/Interaction.pione | 13 +++++++++++ SampleCode/PIONE/Basic9/Main.pione | 5 ++++ SampleCode/PIONE/Basic9/bin/list.cgi | 39 +++++++++++++++++++++++++++++++ SampleCode/PIONE/Basic9/etc/Index.html | 30 ++++++++++++++++++++++++ 5 files changed, 90 insertions(+) create mode 100644 SampleCode/PIONE/Basic9/Annotation.pione create mode 100644 SampleCode/PIONE/Basic9/Interaction.pione create mode 100644 SampleCode/PIONE/Basic9/Main.pione create mode 100644 SampleCode/PIONE/Basic9/bin/list.cgi create mode 100644 SampleCode/PIONE/Basic9/etc/Index.html diff --git a/SampleCode/PIONE/Basic9/Annotation.pione b/SampleCode/PIONE/Basic9/Annotation.pione new file mode 100644 index 0000000..a42d720 --- /dev/null +++ b/SampleCode/PIONE/Basic9/Annotation.pione @@ -0,0 +1,3 @@ +.@ PackageName :: "FileOperation" +.@ Editor :: "Kinoshita" +.@ Tag :: "v0.1.0" diff --git a/SampleCode/PIONE/Basic9/Interaction.pione b/SampleCode/PIONE/Basic9/Interaction.pione new file mode 100644 index 0000000..965793b --- /dev/null +++ b/SampleCode/PIONE/Basic9/Interaction.pione @@ -0,0 +1,13 @@ +Rule Interaction + output '*.*'.all +Action + # build public directory for pione-interactive + mkdir public + cp etc/* public + cp bin/* public + + # start interactive operation + pione-interactive browser --public public + + cp public/* . +End diff --git a/SampleCode/PIONE/Basic9/Main.pione b/SampleCode/PIONE/Basic9/Main.pione new file mode 100644 index 0000000..aceb04f --- /dev/null +++ b/SampleCode/PIONE/Basic9/Main.pione @@ -0,0 +1,5 @@ +Rule Main + output '*.txt'.all +Flow + rule Interaction +End diff --git a/SampleCode/PIONE/Basic9/bin/list.cgi b/SampleCode/PIONE/Basic9/bin/list.cgi new file mode 100644 index 0000000..69b7a3a --- /dev/null +++ b/SampleCode/PIONE/Basic9/bin/list.cgi @@ -0,0 +1,39 @@ +#!/usr/bin/env ruby + +require 'cgi' + +cgi = CGI.new + +strHTML = "" + +strHTML += <<'Block-HTML' + + + + + CGIページ + + + +
+ + 戻る +
+
+ 終了 + + +Block-HTML + +# Output as html +cgi.out(type: "text/html") do + strHTML +end \ No newline at end of file diff --git a/SampleCode/PIONE/Basic9/etc/Index.html b/SampleCode/PIONE/Basic9/etc/Index.html new file mode 100644 index 0000000..d780e80 --- /dev/null +++ b/SampleCode/PIONE/Basic9/etc/Index.html @@ -0,0 +1,30 @@ + + + + + FileOperation + + +
+ + + +
+
+ + + +
+
+ + +
+
+ + +
+
+
+ 終了 + + \ No newline at end of file -- 2.11.0