/webapp/main.py |
---|
1,6 → 1,26 |
#!/usr/bin/python |
# -*- coding: utf-8 -*- |
# This file is part of Tsim Apiak. |
# |
# Tsim Apiak is free software: you can redistribute it and/or modify |
# it under the terms of the GNU General Public Licence as published by |
# the Free Software Foundation, either version 3 of the Licence, or |
# (at your option) any later version. |
# |
# In addition to this, you must also comply with clause 4 of the |
# Apache Licence, version 2.0, concerning attribution. Where there |
# is a contradiction between the two licences, the GPL |
# takes preference. |
# |
# Foobar is distributed in the hope that it will be useful, |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# GNU General Public License for more details. |
# |
# You should have received a copy of the GNU General Public License |
# along with Tsim Apiak. If not, see <http://www.gnu.org/licenses/>. |
import tornado.httpserver |
import tornado.ioloop |
import tornado.web |
88,4 → 108,4 |
http_server = tornado.httpserver.HTTPServer(application) |
http_server.listen(1337) |
#tornado.autoreload.start() |
tornado.ioloop.IOLoop.instance().start() |
tornado.ioloop.IOLoop.instance().start() |
/webapp/templates/translate.html |
---|
3,6 → 3,28 |
{% block title %}Translator{% end %} |
{% block body %} |
<!-- |
# This file is part of Tsim Apiak. |
# |
# Tsim Apiak is free software: you can redistribute it and/or modify |
# it under the terms of the GNU General Public Licence as published by |
# the Free Software Foundation, either version 3 of the Licence, or |
# (at your option) any later version. |
# |
# In addition to this, you must also comply with clause 4 of the |
# Apache Licence, version 2.0, concerning attribution. Where there |
# is a contradiction between the two licences, the GPL |
# takes preference. |
# |
# Foobar is distributed in the hope that it will be useful, |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# GNU General Public License for more details. |
# |
# You should have received a copy of the GNU General Public License |
# along with Tsim Apiak. If not, see <http://www.gnu.org/licenses/>. |
--> |
<b>Na'vi sentence:</b><br /> |
<form action="/translate" method="post"> |
<input id="word" name="word" type="text" value="{{last}}" style="width: 100%;" /> |
/webapp/templates/index.html |
---|
3,6 → 3,29 |
{% block title %}Home{% end %} |
{% block body %} |
<!-- |
# This file is part of Tsim Apiak. |
# |
# Tsim Apiak is free software: you can redistribute it and/or modify |
# it under the terms of the GNU General Public Licence as published by |
# the Free Software Foundation, either version 3 of the Licence, or |
# (at your option) any later version. |
# |
# In addition to this, you must also comply with clause 4 of the |
# Apache Licence, version 2.0, concerning attribution. Where there |
# is a contradiction between the two licences, the GPL |
# takes preference. |
# |
# Foobar is distributed in the hope that it will be useful, |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# GNU General Public License for more details. |
# |
# You should have received a copy of the GNU General Public License |
# along with Tsim Apiak. If not, see <http://www.gnu.org/licenses/>. |
--> |
<a href="/number"><b>Number translator</b></a> - this webapp allows you to translate written-out Na'vi numbers into decimal and octal.<br /> |
<a href="/parse"><b>Parser</b></a> - this webapp can parse Na'vi sentences into the base words, prefixes, infixes and suffixes. It does not currently translate the words, but that will come. |
<a href="/parse"><b>Parser</b></a> - this webapp can parse Na'vi sentences into the base words, prefixes, infixes and suffixes. It does not translate the words. |
<a href="/translate"><b>Translator</b></a> - this webapp translates full Na'vi sentences into human languages, as well as any affixes into the technical abbreviations. |
{% end %} |
/webapp/templates/number.html |
---|
3,6 → 3,28 |
{% block title %}Number translator{% end %} |
{% block body %} |
<!-- |
# This file is part of Tsim Apiak. |
# |
# Tsim Apiak is free software: you can redistribute it and/or modify |
# it under the terms of the GNU General Public Licence as published by |
# the Free Software Foundation, either version 3 of the Licence, or |
# (at your option) any later version. |
# |
# In addition to this, you must also comply with clause 4 of the |
# Apache Licence, version 2.0, concerning attribution. Where there |
# is a contradiction between the two licences, the GPL |
# takes preference. |
# |
# Foobar is distributed in the hope that it will be useful, |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# GNU General Public License for more details. |
# |
# You should have received a copy of the GNU General Public License |
# along with Tsim Apiak. If not, see <http://www.gnu.org/licenses/>. |
--> |
<b>Na'vi number:</b><br /> |
<form action="/number" method="post"> |
<input id="num" name="num" type="text" value="{{last}}" style="width: 100%;" /> |
17,4 → 39,4 |
<script type="text/javascript"> |
document.getElementById("num").focus(); |
</script> |
{% end %} |
{% end %} |
/webapp/templates/base.html |
---|
1,4 → 1,25 |
<html> |
<!-- |
# This file is part of Tsim Apiak. |
# |
# Tsim Apiak is free software: you can redistribute it and/or modify |
# it under the terms of the GNU General Public Licence as published by |
# the Free Software Foundation, either version 3 of the Licence, or |
# (at your option) any later version. |
# |
# In addition to this, you must also comply with clause 4 of the |
# Apache Licence, version 2.0, concerning attribution. Where there |
# is a contradiction between the two licences, the GPL |
# takes preference. |
# |
# Foobar is distributed in the hope that it will be useful, |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# GNU General Public License for more details. |
# |
# You should have received a copy of the GNU General Public License |
# along with Tsim Apiak. If not, see <http://www.gnu.org/licenses/>. |
--> |
<head> |
<title>Tsim Apiak - {% block title %}Title{% end %}</title> |
<link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico" /> |
31,6 → 52,7 |
<body> |
<div id="center"> |
<h1>Tsim Apiak</h1> |
<h2>By Muzer and szabot</h2> |
<h2>{% block title %}Title{% end %}</h2> |
{% block body %}Body{% end %} |
</div> |
/webapp/templates/parse.html |
---|
3,6 → 3,28 |
{% block title %}Sentence parser{% end %} |
{% block body %} |
<!-- |
# This file is part of Tsim Apiak. |
# |
# Tsim Apiak is free software: you can redistribute it and/or modify |
# it under the terms of the GNU General Public Licence as published by |
# the Free Software Foundation, either version 3 of the Licence, or |
# (at your option) any later version. |
# |
# In addition to this, you must also comply with clause 4 of the |
# Apache Licence, version 2.0, concerning attribution. Where there |
# is a contradiction between the two licences, the GPL |
# takes preference. |
# |
# Foobar is distributed in the hope that it will be useful, |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# GNU General Public License for more details. |
# |
# You should have received a copy of the GNU General Public License |
# along with Tsim Apiak. If not, see <http://www.gnu.org/licenses/>. |
--> |
<b>Na'vi sentence:</b><br /> |
<form action="/parse" method="post"> |
<input id="word" name="word" type="text" value="{{last}}" style="width: 100%;" /> |