From 3b5f58ddef56d7eef4e7bab05ab48a78fd91b024 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Tue, 18 May 2021 14:21:51 +0200 Subject: [PATCH] Add volume 3 FR and volume 8 EN --- .drone.yml | 17 ++++++++++++----- livres_fr.py | 10 ++++++++-- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3870329..b099144 100644 --- a/.drone.yml +++ b/.drone.yml @@ -21,60 +21,67 @@ steps: - apt-get install -y --no-install-recommends calibre - ebook-polish -fpuiU "output/L'auberge Vagabonde - Volume 1.epub" "output/L'auberge Vagabonde - Volume 1.epub" - ebook-polish -fpuiU "output/L'auberge Vagabonde - Volume 2.epub" "output/L'auberge Vagabonde - Volume 2.epub" + - ebook-polish -fpuiU "output/L'auberge Vagabonde - Volume 3.epub" "output/L'auberge Vagabonde - Volume 3.epub" - ebook-polish -fpuiU "output/The Wandering Inn - Volume 3.epub" "output/The Wandering Inn - Volume 3.epub" - ebook-polish -fpuiU "output/The Wandering Inn - Volume 4.epub" "output/The Wandering Inn - Volume 4.epub" - ebook-polish -fpuiU "output/The Wandering Inn - Volume 5.epub" "output/The Wandering Inn - Volume 5.epub" - ebook-polish -fpuiU "output/The Wandering Inn - Volume 6.epub" "output/The Wandering Inn - Volume 6.epub" - ebook-polish -fpuiU "output/The Wandering Inn - Volume 7.epub" "output/The Wandering Inn - Volume 7.epub" + - ebook-polish -fpuiU "output/The Wandering Inn - Volume 8.epub" "output/The Wandering Inn - Volume 8.epub" - ebook-convert "output/L'auberge Vagabonde - Volume 1.epub" "output/L'auberge Vagabonde - Volume 1.pdf" - ebook-convert "output/L'auberge Vagabonde - Volume 2.epub" "output/L'auberge Vagabonde - Volume 2.pdf" + - ebook-convert "output/L'auberge Vagabonde - Volume 3.epub" "output/L'auberge Vagabonde - Volume 3.pdf" - ebook-convert "output/The Wandering Inn - Volume 3.epub" "output/The Wandering Inn - Volume 3.pdf" - ebook-convert "output/The Wandering Inn - Volume 4.epub" "output/The Wandering Inn - Volume 4.pdf" - ebook-convert "output/The Wandering Inn - Volume 5.epub" "output/The Wandering Inn - Volume 5.pdf" - ebook-convert "output/The Wandering Inn - Volume 6.epub" "output/The Wandering Inn - Volume 6.pdf" - ebook-convert "output/The Wandering Inn - Volume 7.epub" "output/The Wandering Inn - Volume 7.pdf" + - ebook-convert "output/The Wandering Inn - Volume 8.epub" "output/The Wandering Inn - Volume 8.pdf" - ebook-convert "output/L'auberge Vagabonde - Volume 1.epub" "output/L'auberge Vagabonde - Volume 1.mobi" - ebook-convert "output/L'auberge Vagabonde - Volume 2.epub" "output/L'auberge Vagabonde - Volume 2.mobi" + - ebook-convert "output/L'auberge Vagabonde - Volume 3.epub" "output/L'auberge Vagabonde - Volume 3.mobi" - ebook-convert "output/The Wandering Inn - Volume 3.epub" "output/The Wandering Inn - Volume 3.mobi" - ebook-convert "output/The Wandering Inn - Volume 4.epub" "output/The Wandering Inn - Volume 4.mobi" - ebook-convert "output/The Wandering Inn - Volume 5.epub" "output/The Wandering Inn - Volume 5.mobi" - ebook-convert "output/The Wandering Inn - Volume 6.epub" "output/The Wandering Inn - Volume 6.mobi" - ebook-convert "output/The Wandering Inn - Volume 7.epub" "output/The Wandering Inn - Volume 7.mobi" + - ebook-convert "output/The Wandering Inn - Volume 8.epub" "output/The Wandering Inn - Volume 8.mobi" - name: upload image: curlimages/curl commands: - curl -Ss -u "$USER":"$PASS" -T "output/L'auberge Vagabonde - Volume 1.epub" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/L'auberge Vagabonde - Volume 1.epub" - curl -Ss -u "$USER":"$PASS" -T "output/L'auberge Vagabonde - Volume 2.epub" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/L'auberge Vagabonde - Volume 2.epub" + - curl -Ss -u "$USER":"$PASS" -T "output/L'auberge Vagabonde - Volume 3.epub" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/L'auberge Vagabonde - Volume 3.epub" - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 3.epub" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 3.epub" - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 4.epub" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 4.epub" - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 5.epub" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 5.epub" - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 6.epub" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 6.epub" - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 7.epub" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 7.epub" + - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 8.epub" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 8.epub" - curl -Ss -u "$USER":"$PASS" -T "output/L'auberge Vagabonde - Volume 1.pdf" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/L'auberge Vagabonde - Volume 1.pdf" - curl -Ss -u "$USER":"$PASS" -T "output/L'auberge Vagabonde - Volume 2.pdf" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/L'auberge Vagabonde - Volume 2.pdf" + - curl -Ss -u "$USER":"$PASS" -T "output/L'auberge Vagabonde - Volume 3.pdf" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/L'auberge Vagabonde - Volume 3.pdf" - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 3.pdf" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 3.pdf" - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 4.pdf" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 4.pdf" - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 5.pdf" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 5.pdf" - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 6.pdf" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 6.pdf" - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 7.pdf" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 7.pdf" + - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 8.pdf" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 8.pdf" - curl -Ss -u "$USER":"$PASS" -T "output/L'auberge Vagabonde - Volume 1.mobi" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/L'auberge Vagabonde - Volume 1.mobi" - curl -Ss -u "$USER":"$PASS" -T "output/L'auberge Vagabonde - Volume 2.mobi" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/L'auberge Vagabonde - Volume 2.mobi" + - curl -Ss -u "$USER":"$PASS" -T "output/L'auberge Vagabonde - Volume 3.mobi" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/L'auberge Vagabonde - Volume 3.mobi" - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 3.mobi" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 3.mobi" - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 4.mobi" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 4.mobi" - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 5.mobi" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 5.mobi" - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 6.mobi" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 6.mobi" - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 7.mobi" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 7.mobi" + - curl -Ss -u "$USER":"$PASS" -T "output/The Wandering Inn - Volume 8.mobi" "https://cloud.crystalyx.net/remote.php/dav/files/$USER/Public/TWI/The Wandering Inn - Volume 8.mobi" environment: USER: from_secret: nextcloud_user PASS: from_secret: nextcloud_password -trigger: - event: - exclude: - - cron - --- kind: pipeline name: dependabot diff --git a/livres_fr.py b/livres_fr.py index 93e73c1..7798a47 100644 --- a/livres_fr.py +++ b/livres_fr.py @@ -24,7 +24,13 @@ for page in range(12): for tag in tags: post = post + 1 - volume = 1 if post <= 69 else 2 + + if post <= 69: + volume = 1 + elif post <= 168: + volume = 2 + else: + volume = 3 if post == 1: continue @@ -44,7 +50,7 @@ for page in range(12): del text['style'] - print(title) + print(str(post) + ' - ' + title) chapter = create_chapter_from_string(str(text), title) volumes[volume].add_chapter(chapter)