
Estou tentando encontrar um exemplo de feh
visualizador de imagens que você possa usar para mostrar na tela seu texto personalizado.
Eu escrevi meu próprio aplicativo que está realizando algumas ações e uma delas é mostrar na tela da imagem e na imagem também é exibido algum texto adicional, que recebo de uma resposta do servidor.
Toda a documentação que encontrei não contém informações suficientes.
--info [flag]command_line
Execute command_line and display its output in the bottom left
corner of the image. Can be used to display e.g. image dimensions or
EXIF information. Supports FORMAT SPECIFIERS. If flag is set to “;”,
the output will not be displayed by default, but has to be enabled
by the toggle_info key.
Alguém tem um comando para mostrar texto como entrada ou também pode ser lido de um arquivo especificado.
Responder1
Você pode usar
--info "command"
que mostra a saída do comando no canto inferior esquerdo da imagem. Deman feh
--info [flag]commandline
Execute commandline and display its output in the bottom left corner of
the image. Can be used to display e.g. image dimensions or EXIF informa‐
tion. Supports FORMAT SPECIFIERS. If flag is set to ";", the output will
not be displayed by default, but has to be enabled by the toggle_info key.
Você também pode usar
--caption-path captions/
onde você tem arquivos de texto com nomes associados aos arquivos de imagem e o texto nesses arquivos será mostrado lateralmente centralizado próximo à parte inferior da imagem.
-K, --caption-path path
Path to directory containing image captions. This turns on caption view‐
ing, and if captions are found in path, which is relative to the directory
of each image, they are overlayed on the displayed image. E.g. with cap‐
tion path "captions/", and viewing image "images/foo.jpg", the caption
will be looked for in "images/captions/foo.jpg.txt".
Também é possível controlar o tamanho do texto, por exemplo com
--font "yudit/24"
-e, --font font
Set global font. Should be a truetype font, resident in the current
directory or the font directory, and should be defined in the form font‐
name/points, like "myfont/12".
Não sei se/como mover a saída dos locais padrão, exceto pela saída de espaços e linhas vazias para empurrar o texto real para a direita ou para cima.
Comandos de demonstração,
$ find
./captions
./captions/sudodus-background.png.txt
./sudodus-background.png
S feh --caption-path captions/ --font "yudit/24" \
--info "echo ' This is output from an echo command\n\n'" \
sudodus-background.png
Imagem de demonstração,
Responder2
feh --info "echo $mytext"
faria o que você quisesse – echo
apenas imprimiria os argumentos que foram dados.
Para ler de um arquivo, use "cat $myfile"
.