-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
146 lines (145 loc) · 6.75 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html>
<html lang="fr">
<head>
<link rel="canonical" href="https://jupitershost.hopto.org/langage-naturel-vers-python/" />
<title>Langage Naturel vers Python : Outil de traduction</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="style.css">
<!--Code mirror syntax highlighter-->
<link rel="stylesheet" href="codemirror-5.47.0/lib/codemirror.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
<meta name="viewport" content="width=500" />
<meta name="description" content="Outil traduisant le langage naturel utilsé en cours de mathématiques au lycée vers du Python">
<meta name="keywords" content="Traducteur, Python, Langage Naturel, Algorithme, Outil, Générateur, Langage Nat, Traduction">
<!--Search console google-->
<meta name="google-site-verification" content="MFyyD0CuXPtsypisaNggDKDm6JSQkbxXFrszX0k8v7g">
<meta name="msvalidate.01" content="50F3CA5022584F7B9B0EE70673CF5206" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-132846067-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-132846067-1');
</script>
</head>
<body>
<header>
<a id="menu-openner" href="#" onclick="toggleMenu()"><i class="material-icons">menu</i></a>
<h1>Langage naturel vers <a href="https://www.python.org/" target="blanc"><img alt="python" src="https://www.python.org/static/img/python-logo.png"/></a></h1>
</header>
<nav style="left: -302px;">
<h2>Menu</h2>
<ul>
<li><a href="https://github.com/jupiter2653/langage-naturel-vers-python">Page GitHub</a></li>
<li><a href="https://github.com/jupiter2653/langage-naturel-vers-python/blob/master/README.md">Readme</a></li>
<li><a href="https://github.com/jupiter2653/langage-naturel-vers-python/blob/master/README.md#aide-french">Aide</a></li>
<li><a href="https://github.com/jupiter2653/langage-naturel-vers-python/issues">Signaler un bug (anglais)</a> </li>
</ul>
</nav>
<section>
<div id="inputArea">
<h2>Langage Naturel</h2>
<div id="inputForm">
<h3>Variables :</h3>
<div id="var" class="element">
<div id="var1" class="line item">
<span class="line_handle">drag_indicator</span>
<input onchange="setVariableLists(); writeCode();" type="text" name="variables" class="oneChar form-control" maxlength="1">
<span>est un(e)</span>
<select class="form-control" onchange="writeCode()">
<option value="int">Entier</option>
<option value="float">Flottant</option>
<option value="str">Chaine de charactère</option>
</select>
<button onclick="delLine($(this))" class="button-control remove-button">×</button>
</div>
</div>
<button onclick="addLine('var')" class="button-control line-adder item">+</button>
<h3>Entrée :</h3>
<div id="input" class="element">
<div id="input1" class="line item">
<span class="line_handle">drag_indicator</span>
<span>Demander </span>
<select class="form-control var-list" onchange="writeCode()">
</select>
<button onclick="delLine($(this))" class="button-control remove-button">×</button>
</div>
</div>
<button onclick="addLine('input')" class="button-control line-adder item">+</button>
<h3>Traitement :</h3>
<div class="element" id="process">
<div id="process1" class="line item">
<span class="line_handle">drag_indicator</span>
<select class="form-control var-list" id="process1Var" onchange="writeCode()"></select>
<span>Prend la valeur</span>
<input type="text" name="calculus" class="form-control short process-element" onchange="writeCode(); checkVariable($(this))">
<select class="form-control process-element" onchange="writeCode(); deleteIfNull($(this))">
<option value=""></option>
<option value="+">+</option>
<option value="-">-</option>
<option value="*">×</option>
<option value="/">÷</option>
<option value="**">^</option>
</select>
<input type="text" name="calculus" class="form-control short process-element" onchange="writeCode(); checkVariable($(this))">
<button onclick="addProcessElement($(this).parent()); writeCode();" class="button-control element-adder">+</button>
<button onclick="delLine($(this))" class="button-control remove-button">×</button>
</div>
</div>
<button onclick="addLine('process')" class="button-control line-adder item">+</button>
<h3>Sortie :</h3>
<div class="element lastElement" id="output">
<div id="output1" class="line item">
<span class="line_handle">drag_indicator</span>
<span>Afficher </span>
<input type="text" class="form-control" onchange="writeCode()">
<select class="form-control swicher" onchange="swichOutputMode($(this).parent())">
<option value="text">Texte</option>
<option value="var">Variable</option>
</select>
<button onclick="delLine($(this))" class="button-control remove-button">×</button>
</div>
</div>
<button onclick="addLine('output')" class="button-control line-adder item">+</button>
</div>
</div>
<div id="outputArea">
<h2>Python</h2>
<textarea class="form-control" readonly id="outputTextArea"></textarea>
</div>
</section>
<!--Errors section-->
<div id="jquery-error" class="error" style="display: none;">
<h2>Erreur</h2>
Jquery n'est pas activé. Il se peut que la librairie ne soit pas chargée, au quel cas essayez de <a href="./">recharger</a> la page.
</div>
<noscript class="error">
<h2>Erreur</h2>
Javascript est désactivé alors que celui-ci est obligatoire pour le fonctionnement de cet outil.
Voici les <a href="https://www.enable-javascript.com/fr/">instructions pour activer JavaScript dans votre navigateur Web</a>.
</noscript>
<!--Code mirror syntax highlighter-->
<script src="codemirror-5.47.0/lib/codemirror.js"></script>
<script src="codemirror-5.47.0/mode/python/python.js"></script>
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
<script
src="https://code.jquery.com/ui/1.12.0/jquery-ui.min.js"
integrity="sha256-eGE6blurk5sHj+rmkfsGYeKyZx3M4bG+ZlFyA7Kns7E="
crossorigin="anonymous"></script>
<script type="text/javascript">
//----- JQuery error -----
//we display the error with js (so that it doesn't appear if js doesn't work)
var error = document.getElementById("jquery-error");
error.style.display="block";
//Then we hide it with jquery
$("#jquery-error").hide()
</script>
<script src="jquery.ui.touch-punch.min.js"></script>
<script src="scripts.js"></script>
</body>
</html>