Skip to content

Instantly share code, notes, and snippets.

@jhpoelen
Last active September 18, 2018 16:09
Show Gist options
  • Save jhpoelen/0f531a8489c1001e92aae4c94a003ba3 to your computer and use it in GitHub Desktop.
Save jhpoelen/0f531a8489c1001e92aae4c94a003ba3 to your computer and use it in GitHub Desktop.
register preston hashes and urls with hash archive
#!/bin/bash
# Register all preston urls with hash-archive.org
#
# Please replace "deeplinker\.bio" instances below with you own escaped hostname of your Preston instance.
# see https://preston.guoda.bio on how to install preston
#
preston ls -l tsv | grep Version | cut -f1,3 | tr '\t' '\n' | grep -v "deeplinker\.bio/\.well-known/genid" | sort | uniq | sed -e 's/hash:\/\/sha256/https:\/\/deeplinker.bio/g' | sed -e 's/^/https:\/\/hash-archive.org\/api\/enqueue\//g' | xargs -L1 curl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment