
Estoy tratando de encontrar un ejemplo de feh
visor de imágenes que puedas usar para mostrar en pantalla tu texto personalizado.
Escribí mi propia aplicación que está realizando alguna acción y una de ellas es mostrar en la pantalla de la imagen y sobre la imagen también se muestra un texto adicional, que obtengo de una respuesta del servidor.
Toda la documentación que encontré no tiene suficiente información.
--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.
¿Alguien tiene un comando para mostrar texto como entrada o también puede leerse desde un archivo específico?
Respuesta1
Puedes usar
--info "command"
que muestra el resultado del comando en la esquina inferior izquierda de la imagen. 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.
También puedes usar
--caption-path captions/
donde tiene archivos de texto con nombres asociados para los archivos de imagen y el texto de esos archivos se mostrará de lado, centrado cerca de la parte inferior de la imagen.
-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".
También es posible controlar el tamaño del texto, por ejemplo con
--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".
No sé si ni cómo mover la salida desde las ubicaciones predeterminadas, excepto mediante la salida de espacios y líneas vacías para empujar el texto real hacia la derecha o hacia arriba.
Comandos de demostración,
$ 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
Imagen de demostración,
Respuesta2
feh --info "echo $mytext"
Haría lo que quisiera: echo
simplemente imprime los argumentos que se le dieron.
Para leer desde un archivo, utilice "cat $myfile"
en su lugar.