27 lines
676 B
Markdown
27 lines
676 B
Markdown
# wiktlarp-tf2
|
|
|
|
larp as en.wiktionary.org.
|
|
|
|

|
|
|
|
this is a really stupid script to gloss `[[wikilinked]]` words sent in
|
|
tf2 chat. it works by reading TF2's console log file for events, and
|
|
responding over RCON.
|
|
|
|
```
|
|
con_logfile console.log
|
|
ip 0.0.0.0
|
|
rcon_password monitor
|
|
net_start
|
|
```
|
|
|
|
wiktionary entries are discovered via a wiktextract jsonl dump
|
|
converted to sqlite via the rust program in `db`. it is also desirable
|
|
to create an index for the words:
|
|
|
|
```clj
|
|
(let [ds (sql/get-datasource {:dbtype "sqlite" :dbname "db/words.db"})]
|
|
(with-open [conn (sql/get-connection ds)]
|
|
(sql/execute! conn ["create index idx on words(word)"])))
|
|
```
|