Skip to content

Commit 63fc2f6

Browse files
authored
Update README.md
Updated README.md to be current.
1 parent 509d811 commit 63fc2f6

File tree

1 file changed

+18
-28
lines changed

1 file changed

+18
-28
lines changed

code/autocomplete/README.md

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,25 @@ chmod u+x create_load_db.sh
1212

1313
### From the frontend
1414

15+
#### HTML
1516
```
1617
...
17-
<form>
18-
<input id="autoTextInput" list="autoWordsList">
19-
<datalist id="autoWordsList">
20-
</datalist>
21-
</form>
18+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
19+
<script src="/data/quick_def.json"><script>
20+
<script src="/bootstrap.js"></script>
21+
<script src="/bootstrap3-typeahead.js"></script>
22+
<script src="/rtxcomplete.js"></script>
2223
...
23-
```
24-
25-
```
26-
...
27-
var autoInputBox = document.getElementById("autoTextInput");
28-
var text = autoTextInput.value;
29-
$.ajax({url: "auto?word="+text+"&limit="+max_suggs,
30-
cache:false,
31-
dataType:'jsonp',
32-
success: function(data){
33-
autocompleteDisplay(data);
34-
}
35-
});
36-
...
37-
...
38-
var autoWordsList = document.getElementById("autoWordsList");
39-
autoWordsList.innerHTML = "";
40-
for (i = 0; i < array.length; i++){
41-
var tmp = document.createElement("option");
42-
tmp.text = array[i];
43-
autoWordsList.appendChild(tmp);
44-
}
24+
<input type="text" class="typeInput" data-provide="typeahead">
4525
...
4626
```
27+
#### JavaScript
28+
29+
See rtxcomplete.js
4730

4831
### From the backend
4932
Example code is in ```sample.py```. The two core lines are:
33+
5034
```
5135
5236
with rtxcomplete.load():
@@ -55,6 +39,10 @@ Example code is in ```sample.py```. The two core lines are:
5539
5640
```
5741

42+
### Quick Definitions
43+
44+
create_quick_def.py has been provided, but needs the definition function implemented based on chosen data sources. It also includes the expected format of the quick definitions along with an example.
45+
5846
## Demonstration Link
5947
http://rtxcomplete.ixlab.org
6048

@@ -64,11 +52,13 @@ http://rtxcomplete.ixlab.org
6452

6553
Run the following commands to install certbot;
6654

55+
```
6756
$ sudo apt-get update
6857
$ sudo apt-get install software-properties-common
6958
$ sudo add-apt-repository ppa:certbot/certbot
7059
$ sudo apt-get update
7160
$ sudo apt-get install certbot
61+
```
7262

7363
### Create SSL Certificates
7464

@@ -87,4 +77,4 @@ https_server = tornado.httpserver.HTTPServer(https_app, ssl_options={
8777
})
8878
8979
https_server.listen(443)
90-
```
80+
```

0 commit comments

Comments
 (0)