Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/idris-maps/md2epub

Convert a folder with markdown files to an epub book.
https://github.com/idris-maps/md2epub

books epub md

Last synced: about 2 months ago
JSON representation

Convert a folder with markdown files to an epub book.

Awesome Lists containing this project

README

        

# md2epub

Convert a folder with markdown files to an
[epub](https://en.wikipedia.org/wiki/EPUB) book.

## Install

Requires [deno](https://deno.land/[email protected]/getting_started/installation)

```
deno install -n md2epub --allow-read --allow-write https://deno.land/x/md2epub/mod.ts
```

## Usage

```
md2epub
```

will convert all markdown files in `` to an epub. Subfolders will become
sections. Pages will be in alphabetic order, name the files accordingly.

Example folder structure:

```
book
├── 1. First part
│   ├── 01-intro.md
│   └── 02-begin.md
├── 2. Second part
│   ├── 01-some-chapter.md
│   └── 02-the-end.md
├── cover.jpg
└── meta.yaml
```

Command:

```
md2epub book
```

### Metadata

Metadata is set with a `/meta.yaml` file with the following keys:

- author (string, default `Unkown author`)
- filename (string, default a UUID)
- language (string, default `en-UK`)
- publisher (string, default `Unknown publisher`)
- source (string, default `Unkown source`)
- title (string, default `Unknown title`)
- cover (string, no default)

Example:

```yaml
author: Some author name
filename: my-book
language: en-US
publisher: Books Inc.
source: https://bo.oks
title: My book
cover: cover.jpg
```