Skip to content

PromptExecution/ebook-convert

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ebook-convert

A docker image that converts ebook formats using Calibre ebook-convert.

Just run the sample script: (available in the git repo)

#!/usr/bin/env bash
set -e

if [ -f "$1" ]; then
  DIR=$(dirname "${1}")
  if [ "$DIR" == "." ]; then
    DIR=$(pwd)
  fi
  FN=${1##*/}
  EXT=${1##*\.}
  CVT_EXT=${2:-mobi}
  BOOK_NAME=${FN%.*}; docker run --rm -it -v "$DIR:/target" rappdw/ebook-convert "$BOOK_NAME.$EXT" "$BOOK_NAME.$CVT_EXT"
else
  echo "$1 does not exist. Please specify a valid file"
fi

Example:

convert-ebook ~/my-ebook.epub mobi
convert-ebook ~/my-ebook.epub pdf

About

Docker Image for using Calibre ebook-convert

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Dockerfile 81.7%
  • Shell 15.6%
  • Just 2.7%