summaryrefslogtreecommitdiffstats
path: root/extra/bootstrap_bots.sh
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-22 15:15:29 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-22 15:17:00 -0800
commitc6444a6ebee4a541735705e10885067e6d012df1 (patch)
treefc348ead42a193be09ef23a561cedf91da908fcd /extra/bootstrap_bots.sh
parent72f446f20bb9c3ec498323a692a5b813c3cdd1a9 (diff)
downloadfatcat-c6444a6ebee4a541735705e10885067e6d012df1.tar.gz
fatcat-c6444a6ebee4a541735705e10885067e6d012df1.zip
add helper/hack script to generate bots
Diffstat (limited to 'extra/bootstrap_bots.sh')
-rwxr-xr-xextra/bootstrap_bots.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/extra/bootstrap_bots.sh b/extra/bootstrap_bots.sh
new file mode 100755
index 00000000..7be148b2
--- /dev/null
+++ b/extra/bootstrap_bots.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Run this script from the ../rust/ directory, only once.
+
+CMD_PATH="./target/debug"
+
+$CMD_PATH/fatcat-auth create-editor --admin --bot crossref-bot > /dev/null
+$CMD_PATH/fatcat-auth create-editor --admin --bot pubmed-bot > /dev/null
+$CMD_PATH/fatcat-auth create-editor --admin --bot datacite-bot > /dev/null
+$CMD_PATH/fatcat-auth create-editor --admin --bot orcid-bot > /dev/null
+$CMD_PATH/fatcat-auth create-editor --admin --bot journal-metadata-bot > /dev/null
+$CMD_PATH/fatcat-auth create-editor --admin --bot sandcrawler-bot > /dev/null
+
+echo -n "FATCAT_AUTH_WORKER_CROSSREF="
+$CMD_PATH/fatcat-auth create-token `$CMD_PATH/fatcat-auth list-editors | grep crossref-bot | cut -f1`
+echo -n "FATCAT_AUTH_WORKER_PUBMED="
+$CMD_PATH/fatcat-auth create-token `$CMD_PATH/fatcat-auth list-editors | grep pubmed-bot | cut -f1`
+echo -n "FATCAT_AUTH_WORKER_DATACITE="
+$CMD_PATH/fatcat-auth create-token `$CMD_PATH/fatcat-auth list-editors | grep datacite-bot | cut -f1`
+echo -n "FATCAT_AUTH_WORKER_ORCID="
+$CMD_PATH/fatcat-auth create-token `$CMD_PATH/fatcat-auth list-editors | grep orcid-bot | cut -f1`
+echo -n "FATCAT_AUTH_WORKER_JOURNAL_METADATA="
+$CMD_PATH/fatcat-auth create-token `$CMD_PATH/fatcat-auth list-editors | grep journal-metadata-bot | cut -f1`
+echo -n "FATCAT_AUTH_SANDCRAWLER="
+$CMD_PATH/fatcat-auth create-token `$CMD_PATH/fatcat-auth list-editors | grep sandcrawler-bot | cut -f1`