comments-fetch.sh 420 B

1234567891011121314
  1. #!/bin/sh
  2. cd "$(dirname "${0}")" || exit 1
  3. for dst in content/posts/*/index.md
  4. do
  5. dir="$(dirname "${dst}")"
  6. grep -F "url: " "${dir}/index.md" | cut -c 6- | while read -r url
  7. do
  8. echo "${url}"
  9. src="http://old.blog.mro.name${url}comment-page-1/feed/atom"
  10. com="${dir}/feed/index"
  11. curl --silent --output "${com}.raw" --create-dirs --location --time-cond "${com}.raw" --remote-time "${src}"
  12. done
  13. done