Skip to content

DjVu support would be very desirable... #20

@tigran123

Description

@tigran123

My current workaround for viewing djvu files on the fb console looks like this:

#!/bin/bash

#
# fbdjview --- View DjVu files on Linux framebuffer console
# By Tigran Aivazian, v1.0, 29 December 2017
# License: GPLv3
#
# Pre-requisites:  fbi and ddjvu (Run "sudo apt install fbi djvulibre-bin" to install on Ubuntu)
#

if [ $# -ne 1 ] ; then
    echo "Usage: fbdjview file.djvu"
    exit 1
fi

if [ ! -f "$1" ] ; then
    echo "fbdjview: No such file \"$1\""
    exit 2
fi

md5=$(md5sum "$1" | cut -d' ' -f1)

cachedir=~/.cache/fbdjview/$md5

function cleanup() {
   echo "Cleaning up $cachedir"
   rm -rf $cachedir
   exit
}

trap cleanup SIGINT

if [ ! -d $cachedir ] ; then
    mkdir -p $cachedir
    echo -n "Please wait, generating cache in $cachedir ..."
    ddjvu -eachpage -scale=150 -format=tiff "$1" $cachedir/page%04d.tif || cleanup
fi

fbi -a $cachedir/page*.tif

The obvious drawback is that it needs to generate the cache for the first viewing of any file and that it uses up disk space for this cache. So, it would be very nice if jfbview supported djvu format natively.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions