Skip to content

jonathanpoelen/manga-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

129 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

htmlviewer is a cli tool that generates a web page to view images from directories. htmlviewer-gui is simple wrapper which uses zenity as GUI.

A fully online version that lets you open a directory is available here.

It's main advantage of the viewer is that it uses one and the same key to scroll and go to the next image (space or left click by default), the behavior of which changes according to 5 reading modes:

  • Normal (k key): Display one image at a time.
  • Double page (j key): The first time the scroll is at the bottom, it goes up. The second time goes to the next image.
  • Normal Or Double page (l key): Uses the behavior of double page mode when the width of the image is greater than the height. Otherwise uses the behavior of normal mode.
  • Webtoon (h key): Displays all images in a chapter one below the other.
  • All: Displays all images one below the other.

Basic principle

The interface is uncluttered and button-free, with only images displayed. Nevertheless, there are numerous keyboard and mouse shortcuts that trigger "commands". For example, going to the next page is a command.

Shortcuts are configured when htmlviewer is launched via a config file or/and directory on the command line. For more details, see htmlviwer -h or the online man version.

Once the file has been generated, it is no longer possible to modify the shortcuts. You'll need to generate a new file.

Basic usage

htmlviewer ${directories} > view.html

Or a version which asks for the directory to load when opening the html file:

htmlviewer -a > view.html

view.html can be used here or downloaded with a right click on the link then "save link as...".

Note that using it directory from the web server is less efficient and takes more memory. For security reasons, a website does not access local disks and opening images stores them in memory in a format that takes up more space than the image itself. This is why it is best to download the file and open it from your machine.

The keyboard and mouse shortcuts are available here, with htmlviewer -p or keyboard shortcuts F1 or F2.

Read htmlviewer -h or the online version for more options.

HTTP(S) version limitation

Since a remote site doesn't have access to the machine's local files, and getting the file list from a page requires a user action, the online version has certain limitations unlike the locally opened version (file:// protocol).

  • The load command (F7) cannot save the image list, only the current position. You need to re-open the image folder before using it.
  • The command newtab (y, Y) will open a base64 encoded file. The file name will not be visible through the url.
  • Opening search links (F8) in a new tab does not work.

Default input.conf

# default input.conf
space pgdown_or_next
shift+space pgup_or_prev

space restrict webtoon pgdown_or_next 98
space restrict all pgdown_or_next 98
shift+space restrict webtoon pgup_or_prev 98
shift+space restrict all pgup_or_prev 98

z next -5
x next 5
a next -12
s next 12
q next -30
w next 30
e next -100
r next 100

left prev
right next

ctrl+left  next -5
ctrl+right next 5
ctrl+up    next 12
ctrl+down  next -12

< next_chap -1
> next_chap 1

| prev
\ next
c pgup_or_prev
v prev
b pgup_or_prev 50
n pgdown_or_next 50
. prev
/ pgdown_or_next

m rotate -90
, rotate 90

g goto
^ goto 0
$ goto -1

h mode webtoon
j mode double
k mode normal
l mode normal_or_double

d info
o info

t toggle_auto_scroll
u add_interval -25
i add_interval 25

y newtab
Y newtab foreground

# Mouse shortcuts

left_click mouse left pgup_or_prev
left_click mouse right pgdown_or_next

left_click restrict all mouse left pgup_or_prev 98
left_click restrict all mouse right pgdown_or_next 98
left_click restrict webtoon mouse left pgup_or_prev 98
left_click restrict webtoon mouse right pgdown_or_next 98

left_click+shift mouse left next_chap -1
left_click+shift mouse right next_chap

left_click+ctrl newtab

@ mouse_assistance

# extra

F1 shortcuts
F2 shortcuts
F8 search
F10 open

F6 save
F7 load

About

Image viewer specialized for comic/manga and webtoon reading. Its particularity is to use the same key to scroll and change page.

Topics

Resources

License

Stars

Watchers

Forks

Contributors