Guest User

Untitled

a guest
Feb 25th, 2020
105
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. set -e
  3.  
  4. # helper script for running ebook-convert, available from Calibre (calibre-ebook.com)
  5. #   sudo apt install calibre
  6.  
  7. title="the Ethics of Anarcho-Capitalism"
  8. author="Kristopher A. Borer"
  9. cover="--cover=cover_front.png"
  10. language="--language=English"
  11. tags="--tags=anarcho-capitalism,ethics,libertarianism,freedom,liberty,capitalism,anarchism"
  12. heuristics="--enable-heuristics"
  13.  
  14. options="$cover $language $tags $heuristics"
  15.  
  16. # consolidate parts into book body
  17. book_body=$(mktemp).html
  18. cp front_matter.html $book_body
  19. cat chapters.html >> $book_body
  20. cat back_matter.html >> $book_body
  21.  
  22. # generate digital book formats
  23. filename="the_ethics_of_anarcho-capitalism"
  24. output_directory="ebooks"
  25. mkdir -p $output_directory
  26. ebook-convert "$book_body" "$output_directory/$filename.epub" $options --authors="$author" --title="$title" --output-profile="tablet"
  27. ebook-convert "$output_directory/$filename.epub" "$output_directory/$filename.mobi" --output-profile="kindle"
  28. ebook-convert "$output_directory/$filename.epub" "$output_directory/$filename.docx"
  29.  
  30. rm $book_body
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×