From 787a189b5773928bfcb09173c4407475ea6b0219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Wed, 6 Dec 2023 20:09:53 +0100 Subject: DN06 etc --- skripti/IntsToBytes.java | 14 ++++++++++++++ skripti/prowlarr_enable_all_indexers.sh | 6 ++++++ 2 files changed, 20 insertions(+) create mode 100644 skripti/IntsToBytes.java create mode 100755 skripti/prowlarr_enable_all_indexers.sh (limited to 'skripti') diff --git a/skripti/IntsToBytes.java b/skripti/IntsToBytes.java new file mode 100644 index 0000000..bd701e0 --- /dev/null +++ b/skripti/IntsToBytes.java @@ -0,0 +1,14 @@ +import java.util.*; +public class IntsToBytes { + public static void main (String[] args) { + Scanner sc = new Scanner(System.in); + while (true) { + try { + System.out.write(sc.nextInt()); + } catch (NoSuchElementException e) { + System.out.flush(); + System.exit(0); + } + } + } +} diff --git a/skripti/prowlarr_enable_all_indexers.sh b/skripti/prowlarr_enable_all_indexers.sh new file mode 100755 index 0000000..1c6718e --- /dev/null +++ b/skripti/prowlarr_enable_all_indexers.sh @@ -0,0 +1,6 @@ +#!/bin/sh +set -xeuo pipefail +curl "$1/api/v1/indexer/schema" -H "X-Api-Key: $2" | jq -c '.[]|select(.privacy=="public")' | while read -r l +do + sed 's/"appProfileId":0,/"appProfileId":1,/' <<<$l | curl -i "$1/api/v1/indexer?" -X POST -H "Content-Type: application/json" -H "X-Api-Key: $2" --data-binary @- +done -- cgit v1.2.3