-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
34 lines (31 loc) · 1011 Bytes
/
.drone.yml
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
---
kind: pipeline
name: bookhunter
steps:
- name: build
image: debian
volumes:
- name: config
path: /app/config
- name: data
path: /data/book
environment:
BASE_DIR: /data/book/calibre/down-book
BOOKHUNTER_BIN: /data/book/bookhunter
CALIBRE_LIBRARY:
from_secret: calibre_library
commands:
- apt update & apt install rename
- mkdir books
- $BOOKHUNTER_BIN --config /app/config tianlang -e -f epub -f zip -r --source lanzou -t 4 -d ./books -t 2 --ratelimit 120
- rename 's/.*\.epub$/ebook-$N.epub/' ./books/*.epub
- /data/book/booktool-linux-x64 rename -j -p ./books
- calibredb --with-library="$CALIBRE_LIBRARY" add -r --add=epub --automerge=ignore ./books
- rm -rf ./books
volumes:
- name: config
host:
path: /data/vdb1/docker/config/bookhunter
- name: data
host:
path: /data/book