Overview
| Comment: | [server] change server port in HOMEPAGE |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk | server |
| Files: | files | file ages | folders |
| SHA3-256: |
25ce36dcf299eb12e7ddea462d5bfb65 |
| User & Date: | olr on 2019-02-15 13:46:19 |
| Other Links: | manifest | tags |
Context
|
2019-02-15
| ||
| 15:21 | [fr] faux positifs avec les parenthèses dans les mots commençant par (re)xxx check-in: 932315d71e user: olr tags: trunk, fr | |
| 13:46 | [server] change server port in HOMEPAGE check-in: 25ce36dcf2 user: olr tags: trunk, server | |
| 13:05 | [fr] faux positifs check-in: 90ea671ef3 user: olr tags: trunk, fr | |
Changes
Modified grammalecte-server.py from [71d652b27c] to [4958939df5].
| ︙ | ︙ | |||
22 23 24 25 26 27 28 |
<body class="panel">
<h1>Grammalecte · Serveur</h1>
<h2>INFORMATIONS</h1>
<h3>Analyser du texte</h3>
| | | | | | 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 |
<body class="panel">
<h1>Grammalecte · Serveur</h1>
<h2>INFORMATIONS</h1>
<h3>Analyser du texte</h3>
<p>[adresse_serveur]:{SERVER_PORT}/gc_text/fr (POST)</p>
<p>Paramètres :</p>
<ul>
<li>"text" (text) : texte à analyser.</li>
<li>"tf" (checkbox) : passer le formateur de texte avant l’analyse.</li>
<li>"options" (text) : une chaîne au format JSON avec le nom des options comme attributs et un booléen comme valeur. Exemple : {"gv": true, "html": true}</li>
</ul>
<h3>Lister les options</h3>
<p>[adresse_serveur]:{SERVER_PORT}/get_options/fr (GET)</p>
<h3>Définir ses options</h3>
<p>[adresse_serveur]:{SERVER_PORT}/set_options/fr (POST)</p>
<p>Les options seront enregistrées et réutilisées pour toute requête envoyée avec le cookie comportant l’identifiant attribué.</p>
<p>Paramètres :</p>
<ul>
<li>"options" (text) : une chaîne au format JSON avec le nom des options comme attributs et un booléen comme valeur. Exemple : {"gv": true, "html": true}</li>
</ul>
<h3>Remise à zéro de ses options</h3>
<p>[adresse_serveur]:{SERVER_PORT}/reset_options/fr (POST)</p>
<h2>TEST</h2>
<h3>Analyse</h3>
<form method="post" action="/gc_text/fr" accept-charset="UTF-8">
<p>Texte à analyser :</p>
<textarea name="text" cols="120" rows="20" required></textarea>
|
| ︙ | ︙ | |||
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
userGenerator = genUserId()
def main (sHost="localhost", nPort=8080, dOptions=None, bTestPage=False):
# start server
global dGCOptions
global TESTPAGE
if bTestPage:
TESTPAGE = True
if dOptions:
oGrammarChecker.gce.setOptions(dOptions)
dGCOptions = gce.getOptions()
print("Python: " + sys.version)
echo("Grammalecte v{}".format(gce.version))
echo("Grammar options:\n" + " | ".join([ k + ": " + str(v) for k, v in sorted(dGCOptions.items()) ]))
run(app, host=sHost, port=nPort)
| > > < | 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
userGenerator = genUserId()
def main (sHost="localhost", nPort=8080, dOptions=None, bTestPage=False):
# start server
global dGCOptions
global TESTPAGE
global HOMEPAGE
if bTestPage:
TESTPAGE = True
HOMEPAGE = HOMEPAGE.replace("{SERVER_PORT}", str(nPort))
if dOptions:
oGrammarChecker.gce.setOptions(dOptions)
dGCOptions = gce.getOptions()
print("Python: " + sys.version)
echo("Grammalecte v{}".format(gce.version))
echo("Grammar options:\n" + " | ".join([ k + ": " + str(v) for k, v in sorted(dGCOptions.items()) ]))
run(app, host=sHost, port=nPort)
if __name__ == '__main__':
xParser = argparse.ArgumentParser()
#xParser.add_argument("lang", type=str, nargs='+', help="lang project to generate (name of folder in /lang)")
xParser.add_argument("-ht", "--host", help="host (default: localhost)", type=str)
xParser.add_argument("-p", "--port", help="port (default: 8080)", type=int)
|
| ︙ | ︙ |