From daf07d01ec748e471a77a5ea487b215d00e68790 Mon Sep 17 00:00:00 2001 From: paoda Date: Tue, 1 Aug 2023 22:26:22 -0500 Subject: [PATCH] chore: remove unnecessary screenshot scripts --- .local/bin/jptesseract | 28 ---------------------------- .local/bin/screenshot-full | 3 --- .local/bin/screenshot-gui | 7 ------- 3 files changed, 38 deletions(-) delete mode 100755 .local/bin/jptesseract delete mode 100755 .local/bin/screenshot-full delete mode 100755 .local/bin/screenshot-gui diff --git a/.local/bin/jptesseract b/.local/bin/jptesseract deleted file mode 100755 index b4e880d..0000000 --- a/.local/bin/jptesseract +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/bash - -# Delay between running the command and flameshot launching -DELAY=$1 - -# Make the temp directory if it doesn't already exist -mkdir -p /tmp/jptesseract; - -# flameshot is currently unable to only send output to stdout -# If we use flameshot gui --raw, we will send output to stdout and -# attempt to write a .png file. We **do not** want this .png file, since we can't -# easily predict the file name. Omitting --path causes a file explorer dialog to appear -# upon save. Writing to /dev/null is not allowed either, so our only option is to write them -# to somewhere we don't care about. - -mkdir -p /tmp/jptesseract/.useless; - -# Make sure we're in the right $PWD -cd /tmp/jptesseract || exit; - -# Screenshot with flameshot, save to /tmp directory -if flameshot gui -d "$DELAY" -r --path /tmp/jptesseract/.useless > /tmp/jptesseract/jp_text_image.png; then - # Read from /tmp directory with Tesseract - tesseract -l jpn -c preserve_interword_spaces=1 /tmp/jptesseract/jp_text_image.png /tmp/jptesseract/jp_output - - # Remove \f which will be present at the end of jp_output - tr -d '\f' < /tmp/jptesseract/jp_output.txt | xclip -selection clipboard; -fi diff --git a/.local/bin/screenshot-full b/.local/bin/screenshot-full deleted file mode 100755 index ff926b4..0000000 --- a/.local/bin/screenshot-full +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/sh - -flameshot full -c --path ~/Pictures/Screenshots; diff --git a/.local/bin/screenshot-gui b/.local/bin/screenshot-gui deleted file mode 100755 index 94de3f4..0000000 --- a/.local/bin/screenshot-gui +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/sh - -# Take screenshot w/ selection tools, save to ~/Pictures/Screenshots, and also -# write the image to a temp file (so we can put the image in the clipboard also) -if flameshot gui -r --path ~/Pictures/Screenshots > /tmp/flameshot_screenshot.png; then - xclip -selection clipboard -t image/png < /tmp/flameshot_screenshot.png; -fi