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
#!/usr/bin/env bash | |
TMPDIR=$(mktemp -d -t ocr-XXXXXXXXXX) | |
trap "rm -rf $TMPDIR" EXIT | |
cd "$TMPDIR" | |
flameshot gui -r > img.png | |
tesseract img.png text | |
cat text.txt | xsel --clipboard --input |
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
logging.info("INCOMING XCOM MESSAGE: %s"%message) | |
logging.info("INCOMING XCOM HEADERS: %s"%str(request.META)) | |
logging.info("INCOMING XCOM REQUEST: %s"%request.POST.copy().__dict__) | |
logging.info("INCOMING XCOM REQUEST params: %s"%request.POST.copy()) | |
authorization = request.META.get('HTTP_AUTHORIZATION') | |
if authorization != settings.XCOM_RECEIVER_FABRIC_CREDENTIALS: | |
return HttpResponse("Incorrect authorization!",status=403) | |
params = dict(request.POST.copy()) |