Skip to main content

Simple (archived) image viewer

Project description

SaltViewer

Very simple image viewer on tkinter.

Why

I use mcomix on Linux for a long time. However, default mcomix do not support

  • GIF animation
  • Trash command

Thus I need mcomix alternative. I want to treat

  • Many image type
  • Archive files, like zip, rar, 7z
  • Animation image like GIF
  • Trash image or archive

Feature

  • Single script
  • Support archive
    • Zip, Rar, 7z, Pdf
  • Support many image types
    • pillow
    • svg
  • Support dual page mode
  • Support animation
    • duration auto adjustment
    • GIF, PNG
  • Repetition key
    • For example 100h means go to next 100 page.
  • Delete image
  • Configure file

How to install

pip install salt-viewer

or

yay -S salt-viewer

I use python3.9.3. However it will work on old version greater than python3.5.

This scripts use these pip modules.

  • cairosvg
  • natsort
  • pdf2python
  • pillow
  • py7zr
  • pypdf3
  • rarfile
  • send2trash

And use these packages.

  • unrar(preferred), unar or bsdtar
    • For rarfile
  • poppler
    • For pdf2python

How to Use

Now you can use salt-viewer command.

salt-viewer <image file | archive file>

If you use linux, you should use alias for time saving.

alias sv=salt-viewer

Keymap

You can change these keymaps via configuration file.

[Keymap]

DoublePage  = d
TrashFile   = Delete

# You can use repetition for NextPage and PrevPage.
# For example, 2h means goto next 2 page, type 100h go to next 100 page.
# If you want to reset number, type <Esc>, <Ctrl+[> or simply <[>
NextPage    = h
PrevPage    = l

NextArchive = j
PrevArchive = k

FitNone     = N
FitWidth    = W
FitHeight   = H
FitBoth     = B

PageOrder   = o

Head        = g
Tail        = G

Quit        = q
FullScreen  = f
Reload      = r

Setting

You can change these settings via configuration file.

[Setting]

# None, Width, Height or Both
DefaultFitMode = Both
DefaultFullScreen = True

# true or false.
DoublePage = False

# right2left or left2right
PageOrder  = right2left

# Resize algorithms
# | Filter   | Downscaling quality | Upscaling quality | Performance |
# | Nearest  | -                   | -                 | *****       |
# | Box      | *                   | -                 | ****        |
# | Bilinear | *                   | *                 | ***         |
# | Hamming  | **                  | -                 | ***         |
# | Bicubic  | ***                 | ***               | **          |
# | Lanczos  | ****                | ****              | *           |

UpScale     = Lanczos
DownScale   = Lanczos

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

salt-viewer-0.1.3.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

salt_viewer-0.1.3-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file salt-viewer-0.1.3.tar.gz.

File metadata

  • Download URL: salt-viewer-0.1.3.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for salt-viewer-0.1.3.tar.gz
Algorithm Hash digest
SHA256 65a1652ebb5d31a252ade1f73e0c6f2da652827efec25f19f5b42ce86522dc89
MD5 bef661bca1f7e0764625236d7113e1db
BLAKE2b-256 47102ad85088d9169d7f622de92d6e1506b99283f934e87fb0c9d67b8b58b7f9

See more details on using hashes here.

File details

Details for the file salt_viewer-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: salt_viewer-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for salt_viewer-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 db653fbde908fc2f3a173bd1afe626bc71d92d4035bb67fc5347bb08e335db1c
MD5 926c2b6cfcb03b4c2db2f28f82335632
BLAKE2b-256 4f5956a232c9a085b6b75d31f26cd7afe0d5949677b240499b0193ead1e3b33f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page