1
0
mirror of https://github.com/funkypenguin/geek-cookbook/ synced 2025-12-17 11:41:45 +00:00

Improve pre-leanpub parsing

This commit is contained in:
David Young
2020-06-03 15:00:08 +12:00
parent 324d9c1540
commit 961075afd2

View File

@@ -10,6 +10,12 @@ do
# Can't use relative paths in a book, so make all paths static
sed -i 's/](\//\](https:\/\/geek-cookbook.funkypenguin.co.nz\//g' $file
# GitHub emojis look beautiful but don't render nicely
sed -i 's/:[a-z\ ]://g' $file
# Animated gifs make leanpub fail, so strip 'em out by deleting the entire line
sed -i '/.gif/d' $file
# strip emojis
tr -cd '\11\12\15\40-\176' < $file > $file-clean
mv $file-clean $file