Skip to content

Commit 7fbb561

Browse files
fix: web service instructions don't work (#40)
- moved web service into the inscriptis package. - adjusted documentation and Dockerfile accordingly.
1 parent 234a8b3 commit 7fbb561

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ RUN pip install --no-cache-dir -r requirements.txt
99
RUN pip install --no-cache-dir Flask
1010
RUN python setup.py install
1111

12-
# RUN export FLASK_APP="web-service.py"
13-
# CMD ["python3", "-m", "flask", "run"]
12+
RUN export FLASK_APP="inscriptis.service.web"
13+
CMD ["python3", "-m", "flask", "run"]
1414
EXPOSE 5000
15-
CMD ["python3", "scripts/web-service.py"]

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Statement of need - why inscriptis?
5757

5858
Conversion quality becomes a factor once you need to move beyond simple HTML snippets. Non-specialized approaches and less sophisticated libraries do not correctly interpret HTML semantics and, therefore, fail to properly convert constructs such as itemizations, enumerations, and tables.
5959

60-
Beautiful Soup's `get_text()` function, for example, converts the following HTML enumeration to the string `firstsecond`.
60+
Beautiful Soup's `get_text()` function, for example, converts the following HTML enumeration to the string ``firstsecond``.
6161

6262
.. code-block:: HTML
6363

@@ -150,7 +150,7 @@ The inscript.py command line client supports the following parameters::
150150
-l, --display-link-targets
151151
Display link targets (default:false).
152152
-a, --display-anchor-urls
153-
Display anchor urls (default:false).
153+
Display anchor URLs (default:false).
154154
-r ANNOTATION_RULES, --annotation-rules ANNOTATION_RULES
155155
Path to an optional JSON file containing rules for annotating the retrieved text.
156156
-p POSTPROCESSOR, --postprocessor POSTPROCESSOR
@@ -310,7 +310,7 @@ Startup
310310
-------
311311
Start the inscriptis Web service with the following command::
312312

313-
$ export FLASK_APP="web-service.py"
313+
$ export FLASK_APP="inscriptis.service.web"
314314
$ python3 -m flask run
315315

316316
Usage

scripts/inscript.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def get_parser():
5555
help='Display link targets (default:false).')
5656
parser.add_argument('-a', '--display-anchor-urls',
5757
action='store_true', default=False,
58-
help='Display anchor urls (default:false).')
58+
help='Display anchor URLs (default:false).')
5959
parser.add_argument('-r', '--annotation-rules', default=None,
6060
help='Path to an optional JSON file containing rules '
6161
'for annotating the retrieved text.')

src/inscriptis/service/__init__.py

Whitespace-only changes.
File renamed without changes.

0 commit comments

Comments
 (0)