• R/O
  • HTTP
  • SSH
  • HTTPS

tutorial: Commit

This repository is for tutorials of Eos.


Commit MetaInfo

Revisionf3dbaf63854ba7800f036fbd0640b7fc8061d015 (tree)
Time2014-12-16 17:44:53
Authorkinoshita-eos <kinoshita@yasu...>
Commiterkinoshita-eos

Log Message

Add: For PIONE tutorial Advanced2, support for delete a needless file.
modified: SampleCode/PIONE/Advanced2/Annotation.pione
new file: SampleCode/PIONE/Advanced2/bin/FileDelete.cgi
new file: SampleCode/PIONE/Advanced2/etc/FileDelete.html
modified: SampleCode/PIONE/Advanced2/etc/index.html
modified: SampleCode/PIONE/Advanced2/etc/mrcImageLowPassFilter.html

Change Summary

Incremental Difference

--- a/SampleCode/PIONE/Advanced2/Annotation.pione
+++ b/SampleCode/PIONE/Advanced2/Annotation.pione
@@ -1,3 +1,3 @@
11 .@ PackageName :: "LowPassFilter"
22 .@ Editor :: "Kinoshita"
3-.@ Tag :: "v0.1.0"
3+.@ Tag :: "v0.2.0"
--- /dev/null
+++ b/SampleCode/PIONE/Advanced2/bin/FileDelete.cgi
@@ -0,0 +1,26 @@
1+#!/usr/bin/env ruby
2+
3+require 'cgi'
4+
5+cgi = CGI.new
6+
7+### Header
8+HTMLstr = ""
9+HTMLstr += "<!DOCTYPE html>"
10+HTMLstr += "<html>"
11+HTMLstr += "<head>"
12+HTMLstr += "<title>FileDelete</title>"
13+
14+## Query to Parameters
15+strDeleteFile = cgi['DeleteFile']
16+
17+## View as HTML Statement
18+HTMLstr += '<meta http-equiv="refresh" content="0;URL=./' + strDeleteFile + '?pione-action=delete">'
19+
20+HTMLstr += "</head>"
21+HTMLstr += "</html>"
22+
23+# Output as html
24+cgi.out(type: "text/html") do
25+ HTMLstr
26+end
--- /dev/null
+++ b/SampleCode/PIONE/Advanced2/etc/FileDelete.html
@@ -0,0 +1,32 @@
1+<!DOCTYPE html>
2+<html>
3+ <head>
4+ <meta charset="utf-8">
5+ <title>InteractiveCommand Index Page</title>
6+ </head>
7+ <body>
8+ <a href="index.html">戻る</a><br>
9+ <a href="?pione-action=finish">終了</a><br>
10+ <br>
11+ <form action="FileDelete.cgi" method="post" enctype="multipart/form-data">
12+ 削除ファイル名<br>
13+ <input type="text" name="DeleteFile" value=""/>
14+ <button type="submit">削除</button>
15+ </form>
16+ ファイルリスト<br>
17+ <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
18+ <div id="textDiv"></div>
19+ <script type="text/javascript">
20+ var div = document.getElementById("textDiv");
21+ div.textContent = "";
22+ $.getJSON("./", {"pione-action": "list"}, function(data){
23+ $.each(data, function() {
24+ strOut = ".lpf"
25+ if( this.name.indexOf(strOut) + strOut.length == this.name.length ){
26+ div.textContent += this.name +"\n";
27+ }
28+ });
29+ });
30+ </script>
31+ </body>
32+</html>
\ No newline at end of file
--- a/SampleCode/PIONE/Advanced2/etc/index.html
+++ b/SampleCode/PIONE/Advanced2/etc/index.html
@@ -5,8 +5,8 @@
55 <title>InteractiveCommand Index Page</title>
66 </head>
77 <body>
8- <a href="mrcImageLowPassFilter.html">mrcImageLowPassFilter</a>
9- <br>
8+ <a href="mrcImageLowPassFilter.html">mrcImageLowPassFilter</a><br>
9+ <a href="FileDelete.html">FileDelete</a><br>
1010 <br>
1111 <a href="?pione-action=finish">終了</a>
1212 </body>
--- a/SampleCode/PIONE/Advanced2/etc/mrcImageLowPassFilter.html
+++ b/SampleCode/PIONE/Advanced2/etc/mrcImageLowPassFilter.html
@@ -59,6 +59,7 @@
5959 </form>
6060 <br>
6161 <br>
62- <a href="?pione-action=finish">終了</a>
62+ <a href="index.html">戻る</a><br>
63+ <a href="?pione-action=finish">終了</a><br>
6364 </body>
6465 </html>
\ No newline at end of file
Show on old repository browser