Created
          February 10, 2018 23:09 
        
      - 
      
 - 
        
Save EldonMcGuinness/c602e910754ed4d5fdb97a3494834eae to your computer and use it in GitHub Desktop.  
    Convert epub to mobi using calibre, see included note for bulk converting
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| FILE=$(basename "$1" .epub) | |
| if [ -e "${FILE}.mobi" ]; then | |
| echo nothing to do | |
| else | |
| echo converting | |
| ebook-convert "${FILE}.epub" "${FILE}.mobi" | |
| fi | |
| # NOTE: | |
| # To bulk convert use a function like GNU find as follows | |
| # find /some/director/here -mindepth 1 -type f -iname "*.epub" -execdir epub2mobi "{}" \; | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment