Diff: [root] @ eca2c9e12d3 | faq | css

emul29ah

File created: scripts/emul29ah.erb [Diff]

-- /dev/null++ b/scripts/emul29ah.erb
@@ -1 +1,24 @@
<h1> Эмулях </h1>

<form action="" method="get">
<input type="text" name="sentence" style="width: 100%" /> <br />
<input type="submit" />
</form>

<% if params[:sentence]
response = Open3.popen3("hmark /home/voker57/l29ah burst") do |stdin, stdout, stderr|
stdin.write(params[:sentence])
stdin.close
err = stderr.read
Rails.logger.error "hmark fucked up: #{err}" unless err.empty?
stdout.read
end
end
%>

<h2> Ответ Эмуляха </h2>

<pre>
<%= h response %>
</pre>

By Voker57 on 2014-09-14 14:07:36 +0000