-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stuck on large text file #68
Comments
Correction: the file does not have to be large. Even this takes quite long:
Apparently it sometimes scrolls text as ASCII art and other times creates an image out of them, hm... |
Using kitty btw |
I suspect that graphicsmagic is configured in a way to render a text as image. I couldn't reproduce this on my machine yet, so maybe there is a configuration which can be adapted ? |
So apparently passing |
No special configuration afaik, using Kitty in Arch. What does the command I gave above do for you? |
I could reproduce this now; I was compiling timg under nixos with a limited set of Graphicsmagic filters, so it just returned and didn't show the image as it usually just skips images it can't decode. Now on regular debian, I can see that it renders the text as image, which probably can take a while. |
For me these files are essentially empty though: <?xml version="1.0"?>
<!--
Color definition file. Definitions in this file extend or replace the
compiled in color definitions. Use 'gm convert -list color' to list
the currently available colors. This file is optional and the
software will still function if it is removed.
For example:
<colormap>
<color name="mycolor1" red="228" green="118" blue="33" compliance="None" />
<color name="mycolor2" red="228" green="123" blue="66" compliance="X11" />
</colormap>
-->
<colormap>
</colormap>
<?xml version="1.0"?>
<!--
GraphicsMagick Logging Configuration File
The following options are available:
o events [comma separated list]
annotate Text annotation events.
blob File opening/closing/loading events.
cache Pixel cache events.
coder File format coder events.
configure Configuration events (searching for .mgk files, etc.).
deprecate Identify use of deprecated functions.
error Error exception report events.
exception Exception report events (warning and error).
locale Locale events.
none Reporting disabled.
render Rendering (drawing) events.
resource Resource allocation events (memory, disk, etc.)
temporaryFile Temporary file events (allocate, deallocate, etc.)
transform Image processing events.
user User events (not emitted by GraphicsMagick).
warning Warning exception report events.
X11 X11 server events.
o output
none Reporting disabled.
disabled Reporting disabled.
stdout Log to stdout in "human readable" format
stderr Log to stderr in "human readable" format
xmlfile Log to a file in an XML format
txtfile Log to a file in a text format
win32debug Windows, Output events to the application/system debugger.
win32eventlog Windows, Output events to the Application event log.
o Filename - Use specified filename if output to a file is selected.
Place a %d in the file name in order to support multiple log generations.
o Generations - Number of log files to maintain before circulating back to
the first name.
o Limit - Maximum number of logging events before creating a new log file.
o Format - Format of logging output
You can display the following components by embedding
special format characters:
%d domain
%e event
%f function
%l line
%m module
%p process ID
%r real CPU time
%t wall clock time
%u user CPU time
%% percent sign
\n newline
\r carriage return
-->
<magicklog>
<log events="None" />
<log output="stderr" />
<log filename="Magick-%d.log" />
<log generations="3" />
<log limit="2000" />
<log format="%t %r %u %p %m/%f/%l/%d:\n %e" />
</magicklog>
<?xml version="1.0"?>
<!--
Magick Module Alias Map (modules.mgk)
Provides a mapping from a magick format identifier string to the
name of the loadable module which supports it. This allows a module
to support formats other than its own name. This file is optional
and the software will still function if it is removed.
Entries are of the form:
<module magick="MYMAGICK" name="MYMODULE" />
-->
<modulemap>
</modulemap> |
Yeah so the workaround is not okay as it disables EXIF rotation, this needs a proper fix |
So if we had an option that would exclude certain suffixes, would that help ? Say |
Not sure what you mean by that, but that probably won't help. Can't you force the scrolling on text rather than conversion to an image? |
What I mean is essentially disallow certain file suffixes that are then not shown (and maybe an environment variable to store that in so that it doesn't have to be typed every time). The idea of detecting text and show it in a different way also sounds good, but it would take a bit longer (as it essentially still has to obey the frame-width constraint) |
Files with file-ending of "txt" are now considered multi-frame images not displayed as animation. That allows all of them to be shown and not get stuck in a forever-animation if this is the only file given on the command line Issues #68
As a first step, I've now added that files ending with |
Unfortunately most text-files don't end in |
Alright, new release: https://github.com/hzeller/timg/releases/tag/v1.4.3 |
If I now run on version 1.4.4:
I get a picture, probably from imagemagick, rather than scrolled ASCII, which I would have preferred, is that intended? |
Yes, there is currently no attempt to interpret files anything other than images. So indeed, imagemagick will convert it into multiple images that then scroll. |
But what about the ASCII-art scrolling, I thought you could handle it like that as I already saw in some other text files? |
When providing
timg
with a large text file, even when providing-t
or--frames
, it uses excessive CPU and calculates seemingly forever. Since I often use it for general file inspection, this is quite annoying.The text was updated successfully, but these errors were encountered: