+
+ return $this->download()->directly($textContent, $bookSlug . '.txt');
+ }
+
+ /**
+ * Export a book as a markdown file.
+ */
+ public function markdown(string $bookSlug)
+ {
+ $book = $this->bookRepo->getBySlug($bookSlug);
+ $textContent = $this->exportFormatter->bookToMarkdown($book);
+
+ return $this->download()->directly($textContent, $bookSlug . '.md');