GithubHelp home page GithubHelp logo

Comments (11)

AnonymouX47 avatar AnonymouX47 commented on August 25, 2024 2

Honestly, not a good idea in my opinion (i.e using allmytoes specifically)...

  1. It can only be used as either a command-line tool or a rust crate. Neither options is reliable or easily workable.
  2. Let's assume I found a way to make it work reliably with good performance, it has just too many dependencies.
  3. Thumbnails will only work for the grid view.

Anyways, I appreciate the idea.

I'll look into similar python libraries or simply implement the functionality myself using temp files.

Thank so much. ๐Ÿ‘


As regards the actual issue at hand, I've managed to fix the bug. I'll clean things up and push the changes as soon as I can.

Thanks for your patience.

from termvisage.

AnonymouX47 avatar AnonymouX47 commented on August 25, 2024 1

Thanks so much for the report.

I've started investigating the issue and it seems to be due to some fairly recent upstream changes in urwid (the TUI framework currently in use). The issue occurs starting from version 2.4.2.

In the mean time, you can downgrade urwid (within the same environment as termvisage) to version 2.1.2 using pipx inject termvisage urwid==2.1.2. Some newer versions should also work but I can't be sure other things aren't broken.

I'll continue to investigate till I get to the root of the issue and get back to you once I have something concrete.

Thanks once again. ๐Ÿ™

from termvisage.

qrockz avatar qrockz commented on August 25, 2024 1

@AnonymouX47
pipx inject termvisage urwid==2.1.2

Kinda works so far ๐Ÿ‘ .

The only issue I have now is that one particular picture is not drawn in the preview. If I select it and termvisage goes fullscreen mode it is also not drawn. When I force it to render it is finally drawn.

grid view

not drawn in fullscreen view

This particular picture is very large.

t@t-MS-7C90:~/Pictures$ ll big-sur-mountains-night-dark-macos-big-sur-stock-california-6016x6016-1493.jpg 
-rw-rw-r-- 1 t t 4,7M Mรคr 10 13:11 big-sur-mountains-night-dark-macos-big-sur-stock-california-6016x6016-1493.jpg
t@t-MS-7C90:~/Pictures$ exif big-sur-mountains-night-dark-macos-big-sur-stock-california-6016x6016-1493.jpg 
EXIF tags in 'big-sur-mountains-night-dark-macos-big-sur-stock-california-6016x6016-1493.jpg' ('Motorola' byte order):
--------------------+----------------------------------------------------------
Tag                 |Value
--------------------+----------------------------------------------------------
Orientation         |Top-left
X-Resolution        |72
Y-Resolution        |72
Resolution Unit     |Inch
Software            |Pixelmator 3.9
Date and Time       |2020:06:22 22:06:64
Pixel X Dimension   |6016
Pixel Y Dimension   |6016
Exif Version        |Exif Version 2.1
FlashPixVersion     |FlashPix Version 1.0
Color Space         |Uncalibrated
--------------------+----------------------------------------------------------

big-sur-mountains-night-dark-macos-big-sur-stock-california-6016x6016-1493.jpg

EDIT: Allow large images to be loaded on demand instead of automatically.

from termvisage.

AnonymouX47 avatar AnonymouX47 commented on August 25, 2024 1

The only issue I have now is that one particular picture is not drawn in the preview. If I select it and termvisage goes fullscreen mode it is also not drawn. When I force it to render it is finally drawn.

That's by design, for performance reasons. See --max-pixels (ensure you read the footnote, please).

from termvisage.

AnonymouX47 avatar AnonymouX47 commented on August 25, 2024 1

You can now follow #12 for updates on image grid thumbnail caching.

Thank you ๐Ÿ˜ƒ.

from termvisage.

qrockz avatar qrockz commented on August 25, 2024 1

@AnonymouX47

Sorry for bothering you furthermore ๐Ÿ‘€ but when I'm installing termvisage with pipx install termvisage now it still installs the "old" version where I get the error Session not ended successfully: (urwid.widget.widget.WidgetError) Widget <LineSquare selectable box widget <Image selectable box widget>> rendered (30 x 15) canvas when passed size (30, 1)!

  • downgrading urwid as you previously suggested pipx inject termvisage urwid==2.1.2 would work to fix that
  • or instead of downgrading urwid I compile your code with your latest changes and can youse one modern urwid version

I'm really, really sorry if I get something fundamentally wrong here.
But after you have made code changes (latest commit)I was wondering how I can get the updated version of termvisage (the release date and version of termivsiage on the release page on github hasn't changed). pipx still installs the older version of termvisage. What other options do I have to get the latest termvisage other than clone and compile the repo by myself?

Please help me out and tell me what I'm missing. If you get me to understand this I buy you a big cup of โ˜•
I have no deep knowledge of git or python package installers. Just Basic knowledge.

from termvisage.

qrockz avatar qrockz commented on August 25, 2024

Maybe it is worth to look into allmytoes. It can create smaller sized thumbnails and cache them.

from termvisage.

qrockz avatar qrockz commented on August 25, 2024

@AnonymouX47 I've cloned the repo and successfully compiled it but get an error when starting termvisage:

termvisage --tui --verbose-log
Session not ended successfully: (builtins.ValueError) too many values to unpack (expected 1)

log.txt

EDIT: I've used the old urwid version when compiling. Editing in the requierements.txt urwid to 2.6.10 and recompiling it solved the problem. Works now. ๐Ÿฅฒ

from termvisage.

AnonymouX47 avatar AnonymouX47 commented on August 25, 2024

@qrockz Thanks for the feedback.

I looked into the issue and found out it was due to an incompatibility with urwid versions older than 2.4.2, which was introduced by the earlier changes to fix the original issue. I've corrected this now and all urwid versions down to 2.1.2 (never tested anything less) should work fine.

Also, I'll bump the requirements very soon... they're long overdue for an update.

For what it's worth, next time, when installing from source (except its for the purpose of contribution), I'd advice installing with:

# `pip` also works but `pipx` is preferable.
pipx install .

as the requirements.txt file doesn't always (in fact, rarely does) specify the latest versions of dependencies and it also specifies other packages required only for development such as linters, etc.

Thank you ๐Ÿ˜ƒ.

from termvisage.

AnonymouX47 avatar AnonymouX47 commented on August 25, 2024

Sorry for bothering you furthermore ๐Ÿ‘€

Not at all ๐Ÿ˜†... It's totally okay to ask for help.

when I'm installing termvisage with pipx install termvisage now it still installs the "old" version where I get the error Session not ended successfully: (urwid.widget.widget.WidgetError) Widget <LineSquare selectable box widget <Image selectable box widget>> rendered (30 x 15) canvas when passed size (30, 1)!

  • downgrading urwid as you previously suggested pipx inject termvisage urwid==2.1.2 would work to fix that

  • or instead of downgrading urwid I compile your code with your latest changes and can youse one modern urwid version

That's because I'm yet to make a new release (to either GitHub or PyPI) since I fixed this issue. Only installing from the repository can get the properly working "version" at the moment. As soon as the next release (which will include this fix) is up, I'll make sure to inform you.

What other options do I have to get the latest termvisage other than clone and compile the repo by myself?

In the mean time, you can install directly from GitHub using:

# The same also applies to `pip`
pipx install git+https://github.com/AnonymouX47/termvisage.git

For more info, see this pipx docs section.

Please help me out and tell me what I'm missing. If you get me to understand this I buy you a big cup of โ˜• I have no deep knowledge of git or python package installers. Just Basic knowledge.

Once again, it's totally okay... we all learn everyday ๐Ÿค—. If you have any other feedback or questions, feel free to give or ask them.

Thank you ๐Ÿ˜ƒ.

from termvisage.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.