Skip to content
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

Fixes and improvements for the CLI and TUI #56

Merged
merged 10 commits into from
Jun 23, 2022
Merged

Conversation

AnonymouX47
Copy link
Owner

@AnonymouX47 AnonymouX47 commented Jun 20, 2022

  • Improves source processing.
  • Reduces startup time when multiprocessing is enabled.
    • Startup of getter, opener and checker threads/subprocesses is delayed until a related source is encountered.
  • Fixes handling of interruption while processing sources.
    • Eliminates deadblocks that used to occur sometimes.
    • Corrects order of logs.
    • .cli.check_dir() now returns immediately, upon interruption, when running in any non-main thread of the main process.
  • Moves clear_queue() from .tui.render to .utils.
  • Fixes support detection in subprocesses.
  • Corrects stack level of warning logs.
  • Improves config error handling.
  • CLI mode is now forced when output is not a TTY.
  • Fixed redrawing of images with 'kitty' and 'iterm2' styles after resize, on Konsole.

- Fix: Directory checking in non-multiprocessing mode now ends immediately, upon interruption.
- Fix: Queues used by getter, opener and checker threads/subprocesses are now purged upon interruption.
  - Eliminates deadblocks that used to occur sometimes.
- Fix: Upon interruption while processing sources, getter, opener and checker threads are always joined to ensure logs are in the correct order.
- Fix: Corrected typos in comments.
- Change: `.cli.check_dir()` now returns immediately, upon interruption, when running in any non-main thread of the main process.
- Change: Delayed startup of getter, opener and checker threads/subprocesses.
  - Each group is not started until a related source is encountered.
  - Significantly reduces startup time when multiprocessing is enabled.
- Change: Moved `.tui.render.clear_queue()` to `.utils.clear_queue()`.
- Fix: Eliminated style support detection queries in subprocess.
  - Support is now always enabled and required class attributes are exported.
  - Support detection used to fail at times.
- Fix: Corrected typo.
- Add: Added `.logging_multi.exported_style_attrs`.
- Add: Added `_style_attrs` instance attribute to `.logging_multi.Process`.
- Change: Removed `_force_style` instance attribute of `.logging_multi.Process`.
@AnonymouX47 AnonymouX47 added enhancement New feature / Improvement suggestion or request cli Related to the image viewer's CLI (Not to be used anymore) tui Related to the image viewer's TUI (Not to be used anymore) fix Fixes a bug labels Jun 20, 2022
@AnonymouX47 AnonymouX47 added this to the 0.4.0 milestone Jun 20, 2022
- Change: Changed module-scope variables in `.keys` to widget instance attributes.
  - `key_bar_is_collapsed` -> `key_bar._ti_collapsed`.
  - `expand_key_is_shown` -> `expand._ti_shown`.
  - Eliminates use of the `global` keyword.
- Fix: Handled all errors when loading and storing user config.
- Fix: Handled errors when backing up previous user config during update.
  - The config file is not overwritten when backup fails.
- Fix: Fixed string interpolation in fatal message.
- Change: No longer writing config file immediately after updating since it'll still be stored later.
- Change: Changed color of error and fatal messages.
- Change: Updated docstrings and comments.
Conflicts:
	term_image/cli.py
	term_image/logging_multi.py
- Fix: 'kitty' and 'iterm2' images no longer disappear when vertically resizing Konsole.
  - Was due to the fact that SIGWINCH is rapidly and consistently sent to the process, trigerring rapid redraws.
- Fix: Corrected the names of some "private" `GridListbox` instance attributes.
@AnonymouX47 AnonymouX47 merged commit a36801c into main Jun 23, 2022
@AnonymouX47 AnonymouX47 deleted the cli-tui-updates branch June 23, 2022 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the image viewer's CLI (Not to be used anymore) enhancement New feature / Improvement suggestion or request fix Fixes a bug tui Related to the image viewer's TUI (Not to be used anymore)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant