
feh
사용자 정의 텍스트를 화면에 표시하는 데 사용할 수 있는 이미지 뷰어 의 예를 찾으려고 노력 중입니다 .
나는 몇 가지 작업을 수행하는 내 응용 프로그램을 작성했으며 그 중 하나는 이미지 화면에 표시하고 이미지 위에 서버 응답에서 얻은 추가 텍스트도 표시하는 것입니다.
내가 찾은 모든 문서에는 정보가 충분하지 않습니다.
--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.
텍스트를 입력으로 표시하거나 지정된 파일에서 읽을 수도 있는 명령을 가진 사람이 있습니까?
답변1
당신이 사용할 수있는
--info "command"
그림의 왼쪽 하단에 명령의 출력이 표시됩니다. 에서man 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.
당신은 또한 사용할 수 있습니다
--caption-path captions/
그림 파일과 관련된 이름이 있는 텍스트 파일이 있고 해당 파일의 텍스트는 그림 하단 근처 중앙에 옆으로 표시됩니다.
-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".
예를 들어 텍스트의 크기를 제어하는 것도 가능합니다.
--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".
실제 텍스트를 오른쪽이나 위쪽으로 푸시하기 위해 공백과 빈 줄의 출력을 제외하고 기본 위치에서 출력을 이동하는 방법/방법을 모르겠습니다.
데모 명령,
$ 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
데모 사진,
답변2
feh --info "echo $mytext"
당신이 원하는 것을 할 것입니다 – echo
주어진 인수를 인쇄하기만 하면 됩니다.
파일에서 읽으려면 "cat $myfile"
대신 사용하십시오.