Live data from Hacker News

Flameshot – Open-source screenshot software

flameshot.org

101–110 of 132 posts

Re: Flameshot – Open-source screenshot software

#101
post #93

I use Flameshot combined with Tesseract and zbarimg to quickly clip areas of the screen and either OCR them or decode barcodes, which I then map to hotkey combinations. For example, I have `bash -c 'flameshot gui -s -r | tesseract - - | gxmessage -title "Decoded Data" -fn "Consolas 12" -wrap -geometry 640x480 -file -'` mapped to Super+O, so I can just press the key combo, select a region of the screen, and have the O…

Great idea - I ended up experimenting to improve the ocr accuracy:

    #!/bin/bash

    screenshot=$(mktemp)
    decoded_data=$(mktemp)
    processed_data=$(mktemp)

    cleanup() {
        rm "$screenshot" "$decoded_data" "$processed_data"
    }

    trap cleanup EXIT

    flameshot gui -s -r > "$screenshot"

    convert "$screenshot" \
        -colorspace Gray \
        -scale 1191x2000 \
        -unsharp 6.8x2.69+0 \
            -resize 500% \
        "$screenshot"

    tesseract \
        --dpi 300 \
        --oem 1 "$screenshot" - > "$decoded_data"

    grep -v '^\s*$' "$decoded_data" > "$processed_data"

    cat "$processed_data" | \
        xclip -selection clipboard

    yad --text-info --title="Decoded Data" \
        --width=940 \
        --height=580 \
        --wrap \
        --fontname="Iosevka 14" \
        --editable \
        --filename="$processed_data"

Re: Flameshot – Open-source screenshot software

#103

Flameshot is great, I've been using it for years. I love being able to draw and add annotations in the moment I take the screen shot

I have wanted this for ages, didn't know Flameshot did this or I would have tried it much sooner. It's the only thing missing from any screenshot utility I use.

Re: Flameshot – Open-source screenshot software

#105

FYI, [Win + Shift + S] is quickest way in windows to copy selected area to clipboard, if that's all you need. I use it nearly everyday for something e.g. posting snap of a code snippet or anything in slack to putting these clips in docs. EDIT: Just tried Flameshot and loved that I can draw while taking a snap, instead of opening a new window and do the drawing in that. Looks like this is going to replace Win+Shift+S…

> FYI, [Win + Shift + S] is quickest way in windows to copy selected area to clipboard, if that's all you need.

Nowadays (at least for me on Win11) it's also bound to the PRNTSCRN button, which is a nice way to redeem an otherwise anachronistic key.

Re: Flameshot – Open-source screenshot software

#106

Flameshot is great, I've been using it for years. I love being able to draw and add annotations in the moment I take the screen shot

I needed a screenshot software when I moved to Linux Desktop last year.

Flameshot (despite being available on Windows) helped make that transition really pleasant! I mentally put it in the LINUX HAS BEEN GOOD column.

Re: Flameshot – Open-source screenshot software

#109

Flameshot is great, I've been using it for years. I love being able to draw and add annotations in the moment I take the screen shot

I needed a screenshot software when I moved to Linux Desktop last year. Flameshot (despite being available on Windows) helped make that transition really pleasant! I mentally put it in the LINUX HAS BEEN GOOD column.

That's actually how I found it too, the drawing and annotations were just the cherry on top
Post reply on HN