The goal is just to select a screen area, to perform OCR (Optical Character Recognition) on its content and to put the resulting text into the system clipboard.
On a Linux system, this tricks requires:
#!/bin/sh | |
# Unknown license as this work is heavily based on @ants' own work | |
# See https://gist.github.com/ants/8f46ce7dd1fb7ef41e88ae87064de988 | |
if [ -z "$1" ]; then | |
(>&2 echo "Usage: $0 \"host=.. user=.. dbname=..\"") | |
exit 1 | |
fi | |
CONNSTRING=$* |
#!/bin/bash | |
# | |
# ytd -- yt-dlp simple wrapper. See https://github.com/yt-dlp/yt-dlp | |
# | |
# SPDX-License-Identifier: fair | |
# SPDX-FileCopyrightText: Copyright (c) B. Bailleux, 2022 - 2024 | |
# | |
# --- license --- | |
# Copyright B. Bailleux, 2022 - 2024 | |
# |
alias ansi='for x in `seq 0 15`; do for y in `seq 0 15` ; do printf "\e[38;5;$(( x*16+y ))m%-4s" $(( x*16+y )); done ; printf "\n" ; done' |
/* Utilisation des couleurs ANSI */ | |
/* Voir https://stackoverflow.com/questions/4842424/list-of-ansi-color-escape-sequences */ | |
void display(char* contenu, int piece, int fond) { | |
// Probablement sous optimal... | |
// Idéalement, jouer sur les contrastes... | |
int coulPiece = 33; // caractère jaune | |
int coulFond = 40; // fond noir | |
if (piece == 1) { | |
coulPiece = 30; // caractère noir | |
} |