From 6c63d2b73d5558b05e889ed87ad5a1c64369ae20 Mon Sep 17 00:00:00 2001 From: David Young Date: Tue, 26 May 2020 22:14:09 +1200 Subject: [PATCH] Replace mailchimp subscribe form (#95) --- scripts/markdown-to-markua.sh | 26 +++----------------------- scripts/recipe-footer.md | 30 +++++++----------------------- 2 files changed, 10 insertions(+), 46 deletions(-) diff --git a/scripts/markdown-to-markua.sh b/scripts/markdown-to-markua.sh index 63755f3..9be69fa 100755 --- a/scripts/markdown-to-markua.sh +++ b/scripts/markdown-to-markua.sh @@ -3,29 +3,9 @@ # Markua doesn't know what to do with 4 backticks (````), so convert to 3: find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/\`\`\`\`/\`\`\`/g" -# Markua doesn't like emojis, so remove them: -find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/👏//g" -find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/💬//g" -find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/👍//g" -find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/💰//g" -find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🍷//g" -find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🏢//g" -find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/❤️//g" -find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🐢//g" -find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/👋//g" -find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🐦//g" -find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/📖//g" -find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/✉️//g" -find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/📺//g" -find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🎥//g" -find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/🎵//g" -find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/😁//g" - # Can't use relative paths in a book, so make all paths static find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/(\//(https:\/\/geek-cookbook.funkypenguin.co.nz\/)/g" - - - - -# Do nothing, yet. This is where the sed magic will go +# strip emojis +$pattern = "[\x{1f300}-\x{1f5ff}\x{1f900}-\x{1f9ff}\x{1f600}-\x{1f64f}\x{1f680}-\x{1f6ff}\x{2600}-\x{26ff}\x{2700}-\x{27bf}\x{1f1e6}-\x{1f1ff}\x{1f191}-\x{1f251}\x{1f004}\x{1f0cf}\x{1f170}-\x{1f171}\x{1f17e}-\x{1f17f}\x{1f18e}\x{3030}\x{2b50}\x{2b55}\x{2934}-\x{2935}\x{2b05}-\x{2b07}\x{2b1b}-\x{2b1c}\x{3297}\x{3299}\x{303d}\x{00a9}\x{00ae}\x{2122}\x{23f3}\x{24c2}\x{23e9}-\x{23ef}\x{25b6}\x{23f8}-\x{23fa}]"; +find manuscript -type f -name "*.md" -print0 | xargs -0 sed -i "s/${pattern}//g" \ No newline at end of file diff --git a/scripts/recipe-footer.md b/scripts/recipe-footer.md index d385784..8afb830 100644 --- a/scripts/recipe-footer.md +++ b/scripts/recipe-footer.md @@ -1,30 +1,14 @@ -## Tip your waiter (support me) 👏 +## Tip your waiter (sponsor me) 👏 -Did you receive excellent service? Want to make your waiter happy? (_..and support development of current and future recipes!_) See the [support](/support/) page for (_free or paid)_ ways to say thank you! 👏 +Did you receive excellent service? Want to make your waiter happy? (_..and support development of current and future recipes!_) Sponsor me on [Github][github_sponsor] / [Patreon][patreon], or see the [support](/support/) page for more (_free or paid)_ ways to say thank you! 👏 ## Flirt with waiter (subscribe) 💌 -Want to know now when this recipe gets updated, or when future recipes are added? Subscribe to the [RSS feed](https://mastodon.social/@geekcookbook_changes.atom), or leave your email address below, and we'll keep you updated. (*double-opt-in, no monkey business, no spam either - check the [archive](https://us16.campaign-archive.com/home/?u=a1d9cee4402be76497a2baf49&id=10e284530a) for proof!*) +Want to know now when this recipe gets updated, or when future recipes are added? Subscribe to the [RSS feed](https://mastodon.social/@geekcookbook_changes.atom), or leave your email address below, and we'll keep you updated. (*double-opt-in, no monkey business, no spam) -
- - -
-
-
- -
- -
-
- - -
- - -
-
-
- +
## Your comments? 💬 + +[patreon]: https://www.patreon.com/bePatron?u=6982506 +[github_sponsor]: https://github.com/sponsors/funkypenguin \ No newline at end of file