Created
February 15, 2022 19:23
-
-
Save vicenteherrera/a4b9d9790199c3d66878f8a377fdd215 to your computer and use it in GitHub Desktop.
Script to generate epub publication with latest Bonilista articles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Parsing articles" | |
URL="https://us2.campaign-archive.com/home/?u=374c664073e1a1fa3deca53b4&id=e67967d43f" | |
POSTS=$(curl -Lk "$URL" | tr '"' '\n' | tr "'" '\n' | grep -e '^http://eepurl.com/' | sed 1d | awk '{ printf("%s ", $0) }') | |
echo "Building epub" | |
docker run --rm \ | |
--volume "$(pwd):/data" \ | |
--user $(id -u):$(id -g) \ | |
pandoc/core -o libro.epub $POSTS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment