diff options
Diffstat (limited to '')
-rw-r--r-- | devourer/Dockerfile | 2 | ||||
-rw-r--r-- | devourer/devourer.py | 3 | ||||
-rwxr-xr-x | devourer/tests.sh | 3 |
3 files changed, 4 insertions, 4 deletions
diff --git a/devourer/Dockerfile b/devourer/Dockerfile index 3b4bc94..06807ef 100644 --- a/devourer/Dockerfile +++ b/devourer/Dockerfile @@ -25,7 +25,7 @@ WORKDIR /certs RUN openssl req -nodes -new -x509 -subj="/C=US/ST=Denial/L=springfield/O=Dis/CN=mila.terminaldweller.com" -keyout server.key -out server.cert FROM python-base as production -RUN apt update && apt install --no-install-recommends -y poppler-utils +RUN apt update && apt install --no-install-recommends -y poppler-utils python3-magic COPY --from=certbuilder /certs/ /certs ENV FASTAPI_ENV=production COPY --from=builder-base $VENV_PATH $VENV_PATH diff --git a/devourer/devourer.py b/devourer/devourer.py index 31ab87f..f6b0520 100644 --- a/devourer/devourer.py +++ b/devourer/devourer.py @@ -12,6 +12,7 @@ import os import random import re import readability +import refextract import requests import string import tempfile @@ -147,8 +148,6 @@ def extractRequirements(textBody: str) -> list: def extractRefs(url: str) -> list: - import refextract - refs = list() try: refs = refextract.extract_references_from_url(url) diff --git a/devourer/tests.sh b/devourer/tests.sh index 0960127..caee417 100755 --- a/devourer/tests.sh +++ b/devourer/tests.sh @@ -3,4 +3,5 @@ curl -k -X GET "https://localhost:19019/mila/summ?url=https://dilipkumar.medium.com/standalone-mongodb-on-kubernetes-cluster-19e7b5896b27&summary=newspaper&audio=true" curl -k -X GET "https://localhost:19019/mila/wiki?term=iommu&summary=none&audio=false" curl -k -X GET "https://localhost:19019/mila/reqs?url=https://www.ietf.org/rfc/rfc2865.txt&sourcetype=text" -curl -k -X GET "https://localhost:19019/mila/pdf?feat=gaga&url=https://www.rroij.com/open-access/mutation-testing-a-review-33-36.pdf" +curl -k -X GET "https://localhost:19019/mila/pdf?feat=&url=https://www.rroij.com/open-access/mutation-testing-a-review-33-36.pdf" +curl -k -X GET "https://localhost:19019/mila/pdf?feat=refs&url=https://www.rroij.com/open-access/mutation-testing-a-review-33-36.pdf" |