Last active
September 18, 2018 16:09
-
-
Save jhpoelen/0f531a8489c1001e92aae4c94a003ba3 to your computer and use it in GitHub Desktop.
register preston hashes and urls with hash 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 | |
# 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