Skip to content

Instantly share code, notes, and snippets.

@vicenteherrera
Created February 15, 2022 19:23
Show Gist options
  • Save vicenteherrera/a4b9d9790199c3d66878f8a377fdd215 to your computer and use it in GitHub Desktop.
Save vicenteherrera/a4b9d9790199c3d66878f8a377fdd215 to your computer and use it in GitHub Desktop.
Script to generate epub publication with latest Bonilista articles
#!/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