rename buscribe-api to buscribe_api

to match other services that use _ instead of -
pull/414/head
Mike Lang 1 month ago
parent 834d27c17d
commit b16ceef96a

@ -14,7 +14,7 @@ cd "$(dirname "$(realpath "$0")")"
COMPONENTS=(
backfiller
buscribe
buscribe-api
buscribe_api
chat_archiver
cutter
downloader

@ -27,7 +27,7 @@ function query(text, start_time, end_time) {
const channel = document.getElementById("channel_select").value;
fetch(`/buscribe-api/${channel}/json?${query_string}`)
fetch(`/buscribe_api/${channel}/json?${query_string}`)
.then(response => response.json())
.then(fillResults)

@ -12,8 +12,8 @@ RUN pip install /tmp/common && rm -r /tmp/common
# Install actual application
RUN apk add postgresql-dev postgresql-libs
COPY buscribe-api /tmp/buscribe-api
RUN pip install /tmp/buscribe-api && cp -r /tmp/buscribe-api/templates /templates \
&& rm -r /tmp/buscribe-api
COPY buscribe_api /tmp/buscribe_api
RUN pip install /tmp/buscribe_api && cp -r /tmp/buscribe_api/templates /templates \
&& rm -r /tmp/buscribe_api
ENTRYPOINT ["python3", "-m", "buscribeapi", "--base-dir", "/mnt"]
ENTRYPOINT ["python3", "-m", "buscribeapi"]

@ -7,8 +7,9 @@ from flask import request, jsonify
app = flask.Flask('buscribe')
@app.route('/buscribe-api/json')
def get_json():
# WARNING: Channel is currently ignored. Multi-channel support will come later.
@app.route('/buscribe_api/<channel>/json')
def get_json(channel):
"""Searches the line database for *query*, with optional start_time and end_time boundaries.
Search is done using PostgreSQL websearch_to_tsquery()

@ -59,7 +59,7 @@ def main(database="", host='0.0.0.0', port=8010, bustime_start=None):
logging.error("Invalid --bustime-start!")
exit(1)
app.db_manager = DBManager(dsn=database)
app.db_manager = DBManager(dsn=database, register_types=False)
stopping = gevent.event.Event()
Loading…
Cancel
Save