This BASH script automatically converts a Markdown file into PDF, EPUB, and ODT files.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RileyDuffield b8ec64fbe5 Change "MAT" to "mat2" 2 years ago Migrate to mat2 2 years ago Transition to mat2 2 years ago
LICENSE Initial commit 2 years ago Change "MAT" to "mat2" 2 years ago


This BASH script is designed to quickly create an ebook from a Markdown file. It exports the file to PDF, EPUB, and ODT.

When it runs, it will ask for the following:

  1. The path to a markdown file
  2. The book's title
  3. The author's name
  4. Copyright information (eg. Creative Commons Attribution 4.0)
  5. A language code (eg. en for English, es for Spanish, fr for French)
  6. Whether you want a cover image.
    1. If you answer "no", no cover image is added.
    2. If you answer "yes", you will be prompted for the path to the image.

After all input is gathered, a new folder will be created with your new files inside it. The information entered by the user is used to add metadata and names to the files.

The folder and ebook files will follow the naming scheme of AuthorName-BookTitle with all the spaces stripped away.

Required Software


Before running the script for the first time, give or executable privileges by typing chmod +x or chmod +x in your terminal.

Type ./ to run the script and answer all of the prompts.

Privacy Caution

PDFs created with this script contain metadata that includes your time-zone. If you need to keep your geographic region a secret, find a way to strip off the metadata or set your computer's time to UTC (Coordinated Universal Time).

mat2 automatically strips metadata from ODT files created using this script.