--- /dev/null
+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
--- /dev/null
+#!/usr/bin/env ruby
+
+require 'cgi'
+
+cgi = CGI.new
+
+strHTML = ""
+
+strHTML += <<'Block-HTML'
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>CGIページ</title>
+ </head>
+ <body>
+ <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
+ <div id="textDiv"></div>
+ <script type="text/javascript">
+ var div = document.getElementById("textDiv");
+ div.textContent = "";
+ $.getJSON("./", {"pione-action": "list"}, function(data){
+ $.each(data, function(file) {
+ div.textContent += this.name +"\n";
+ });
+ });
+ </script>
+ <a href="Index.html">戻る</a>
+ <br>
+ <br>
+ <a href="?pione-action=finish">終了</a>
+ </body>
+</html>
+Block-HTML
+
+# Output as html
+cgi.out(type: "text/html") do
+ strHTML
+end
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>FileOperation</title>
+ </head>
+ <body>
+ <form action="./AAA.txt" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="pione-action" value="create"/>
+ <button type="submit">作成(ファイル)</button>
+ <input type="file" name="pione-content" value=""/>
+ </form>
+ <form action="./AAA.txt" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="pione-action" value="create"/>
+ <button type="submit">作成(テキスト)</button>
+ <input type="text" name="pione-content" value=""/>
+ </form>
+ <form action="./AAA.txt" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="pione-action" value="delete"/>
+ <button type="submit">削除</button>
+ </form>
+ <form action="./list.cgi" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="pione-action" value="get"/>
+ <button type="submit">ファイル一覧の取得</button>
+ </form>
+ <br>
+ <br>
+ <a href="?pione-action=finish">終了</a>
+ </body>
+</html>
\ No newline at end of file