-
Notifications
You must be signed in to change notification settings - Fork 2
/
Karfile
38 lines (32 loc) · 784 Bytes
/
Karfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
PROJECT="lexis-nexis-uni-downloader"
#@setup
#+Setup initial system dependencies and build docker image.
task-setup() {
brew bundle
task-build
}
#@build
#+Build docker image.
task-build() {
docker build . -t $PROJECT
}
#@run
#+Run docker container.
task-run() {
docker run -it \
-e LN_URL="$LN_URL" \
-e EZPROXY="$EZPROXY" \
-e MACHINE_ID="$MACHINE_ID" \
-e SESSION_ID="$SESSION_ID" \
-v $(pwd):/app \
$PROJECT "$@"
}
#@get-cookies
#+Extract necessary cookies from Google Chrome.
task-get-cookies() {
python3 -m venv .local-venv &&
.local-venv/bin/pip install -q --upgrade pip &&
.local-venv/bin/pip install -q browser_cookie3 &&
.local-venv/bin/python scripts/get-cookies.py
}