dexr 0.4.3

A directory indexer with thumbnails, previews, and slideshow functionality.
dexr-0.4.3 is not a library.

dexr

A directory indexer with thumbnails, previews, and slideshow functionality.

It's meant to be a faster and more lightweight version of Lars Jung's H5AI.

Features

* = requires JS

  • Basic page fully server-side rendered
  • Minimal interface without excessive styling
    • Effort made to be as accessible as possible (please email me if you see anything that can be improved!)
  • Thumbnails for most images and videos
    • Cached in a configurable temporary directory
  • Sorting
  • *In-page previews for images and videos
    • Supports keyboard-based usage: left and right arrows, Home, End
  • *Slideshow
    • Activated via keyboard (s) or mouse
    • Custom interval

Configuration

Configuration is placed in a file called dexr.toml in the working directory of the executable, and can also be specified with environment variables.

The environment variables are named DEXR_<SCREAMING_SNAKE_CASE_KEY>, so for example the address field would be DEXR_ADDRESS. If a key is specified in both locations, the environment variable takes precedence.

The following keys can be used for configuration:

Key Type Default Meaning Example/Possible Values
address See below None The address for the server to listen on "tcp://127.0.0.1:3000"
index_root Path None The directory that will be indexed "/srv/my-public-files"
thumbnail_tmp Path None The location of the thumbnail cache* "/var/tmp/dexr-thumbnails"
exclude_dotfiles Boolean true Whether to hide dotfiles in indexes and return 404 if accessed false

address format

The address can be a TCP address or a Unix socket path. A TCP address is in the format tcp://<host>:<port>, like tcp://127.0.0.1:3000. A Unix socket is in the format unix://<path to socket>, like unix:///tmp/indexer/socket.sock. If no protocol prefix (<protocol>://) is specified, as in localhost:3000, it defaults to a TCP address.

thumbnail_tmp note

You should probably use a non-volatile temporary directory (/var/tmp rather than /tmp) to avoid regenerating thumbnails unnecessarily.

GStreamer

We use gstreamer for thumbnail generation. We suggest the following gstreamer plugins to support the most possible media:

  • gst-libav
  • gst-plugins-bad
  • gst-plugins-base
  • gst-plugins-good
  • gst-plugins-openh264
  • gst-plugins-ugly

The package names may differ on your distribution; the above names are from Arch Linux. For example, on Debian the package names are prefixed with gstreamer1.0 rather than gst.

Rewrite

This is a rewrite of https://git.matt.felle.nz/matt/indexer, using axum instead of actix, as well as a couple other differences:

  • We use gstreamer exclusively for thumbnail generation, rather than a combination of vid2img (which used gstreamer under the hood) and image. Gstreamer is a lot faster for some reason.
  • Sorting is done on the server.
  • Some configuration options have been removed (thumbnail size, directory size format)