mirror of
https://github.com/bcye/structured-wikivoyage-exports.git
synced 2025-07-17 12:04:05 +00:00
add dockerfile and document
This commit is contained in:
parent
804ffeb82b
commit
e606e45bf6
@ -1,8 +1,8 @@
|
|||||||
.env
|
.env
|
||||||
|
|
||||||
# NODE
|
|
||||||
node_modules
|
|
||||||
|
|
||||||
# PYTHON
|
|
||||||
__pycache__
|
__pycache__
|
||||||
.venv
|
.venv
|
||||||
|
.pytest_cache
|
||||||
|
docs
|
||||||
|
node_modules
|
||||||
|
output
|
||||||
|
sketching
|
||||||
|
12
Dockerfile
12
Dockerfile
@ -1,12 +1,10 @@
|
|||||||
FROM node:22
|
FROM ghcr.io/astral-sh/uv:debian
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package.json .
|
COPY pyproject.toml uv.lock ./
|
||||||
COPY package-lock.json .
|
RUN uv sync --frozen
|
||||||
|
|
||||||
RUN npm install
|
COPY . .
|
||||||
|
|
||||||
COPY index.ts .
|
CMD ["uv", "run", "transform-documents.py"]
|
||||||
|
|
||||||
CMD [ "node", "--max-old-space-size=4096", "--experimental-strip-types", "index.ts" ]
|
|
10
README.md
10
README.md
@ -2,8 +2,16 @@
|
|||||||
|
|
||||||
Small utility to convert the wikitext data from the Wikivoyage dumps into a structured format. The goal is to make it easier to work with the data and extract useful information programmatically.
|
Small utility to convert the wikitext data from the Wikivoyage dumps into a structured format. The goal is to make it easier to work with the data and extract useful information programmatically.
|
||||||
|
|
||||||
## Installation
|
## Usage
|
||||||
|
|
||||||
|
### Docker
|
||||||
|
|
||||||
|
This script is intended to be run with docker. A docker image is [available from the GitHub registry](). For example, you may run it using the filesystem handler with `docker run -e HANDLER=filesystem -e HANDLER_FILESYSTEM_OUTPUT_DIR=/output -v ./output:/output ghcr.io/bcye/structured-wikivoyage-exports`. For all the different options, refer to [the docs](docs).
|
||||||
|
|
||||||
|
### Types
|
||||||
|
|
||||||
|
TypeScript types for consuming the json output are available, you may install them from the [@bcye/structured-wikivoyage-types]() npm package. Refer to the included docstrings in [types/index.d.ts](types/index.d.ts) for reference.
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
See [docs](docs) for more information on how to use this utility.
|
See [docs](docs) for more information on how to use this utility.
|
Loading…
x
Reference in New Issue
Block a user