-
Notifications
You must be signed in to change notification settings - Fork 118
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
Save output to ansi text file #4
Comments
@greenseeker I'm taking a guess here, but I believe the error occurs because you're redirecting I wanted to keep the flags simple for most users so I'm not sure about adding character encoding functionality, because then covering only ANSI characters set would seem inappropriate. For the time being, I believe you can change the saved text file encoding with CLI tools like Will have to think about this. Thanks for pointing out the issue though, I'm a bit busy these days but I'll try to make a fix soon. |
I suspected the same regarding the crash/failure when redirecting output. You're already encoding it in ansi to write to the screen; I was just looking for a nice way to save that to a file as well. If you were to do so, optimizing the escape codes would be nice also. At the moment, the color is being reset to defaults and then set to the new color in between every character, even if that character is the same color as the previous one. |
@greenseeker Released the patched version 1.3.4. Wrote some conditions where terminal size will be calculated through Optimizing escape codes seems like a good idea, but I don't think it'll be very effective overall. You see, I'm encoding each character with RGB values, which are not usually the same for two adjacent ascii characters. At best, for usual images, you'd find 2 or 3 characters with the same color codes adjacent to each other. I could optimize it a little bit but it seems overkill for not enough benefit. Let me know if I'm missing something here. I believe this issue is resolved now so I'm closing it :) |
Is there a way to save the output as an ansi text file? If I try to redirect output, it barfs during terminal size detection. If I also specify the output size with -d, it complains the terminal is too small.
Update: I was able to capture the output using
script
but it would certainly be nice to have a proper save-as-ansi option.The text was updated successfully, but these errors were encountered: