Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# Build: podman build -t xword-dl .
# podman tag xword-dl:latest xword-dl:$(git describe --tags)
#
# Run: podman run --rm --tz local -v $HOME/my-xwords:/xw:Z xword-dl [...]
#
FROM docker.io/library/alpine:latest
WORKDIR /xw
COPY . /xword-dl
RUN apk update && \
apk add python3 py3-setuptools py3-pip gcc python3-dev musl-dev libxml2 libxslt libxml2-dev libxslt-dev && \
python3 -m pip install /xword-dl && \
apk del gcc python3-dev musl-dev libxslt-dev libxml2-dev
ENTRYPOINT ["/usr/bin/xword-dl"]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ in the downloaded directory may be enough.

But in either case, you probably want to install `xword-dl` and its dependencies in a dedicated virtual environment. I use `virtualenv` and `virtualenvwrapper` personally, but that's a matter of preference. If you're already feeling overwhelmed by the thought of managing Python packages, know you're not alone. The [official documentation is pretty good](https://packaging.python.org/tutorials/installing-packages/), but it's a hard problem, and it's not just you. If it's any consolation, learning how to use virtual environments today on something sort of frivolous like a crossword puzzle downloader will probably save you from serious headaches in the future when the stakes are higher.

Alternatively, if you have the [podman](https://podman.io/) container engine installed, you can build and run `xword-dl` in a container image:

```
podman build -t xword-dl . [slow; only needs to be run once per release]
podman tag xword-dl:latest xword-dl:$(git describe --tags) [optional]
...
podman run --rm --tz local -v $HOME/my-xwords:/xw:Z xword-dl [...]
```

## Usage

Once installed, you can invoke `xword-dl`, providing the short code of the site from which to download. If you run `xword-dl` without providing a site keyword, it will print some usage instructions and then exit.
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ Unidecode==1.3.6
pyyaml==6.0.1
xmltodict==0.13.0
lxml==4.9.2
tzlocal==2.1