Created
September 17, 2023 15:33
-
-
Save rey/c261c6afbd2775504eef27103d2122ff to your computer and use it in GitHub Desktop.
Dirty POC script to send Jekyll link posts to the internet archive
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 | |
# yq: | |
# snap install yq | |
# waybackpy: | |
# pip3 install waybackpy | |
file="${1}" | |
post_layout=$(yq --front-matter=extract '.layout' ${file}) | |
if [[ "${post_layout}" == "link" ]]; then | |
echo "This looks link a link post!" | |
post_link=$(yq --front-matter=extract '.link' ${file}) | |
waybackpy --url "${post_link}" --save | |
else | |
echo "This post is not a link post!" | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment