BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.03k stars 1.88k forks source link

Markdown export with Media/file export #3809

Open pitastrudl opened 1 year ago

pitastrudl commented 1 year ago

Describe the feature you'd like

I've noticed that when you export a markdown file of a page, it includes URLs where the images are hosted, in some instances that can be Bookstack. I've searched for any existing issues but all I found was this: https://github.com/BookStackApp/BookStack/pull/2115

The markdown export would be exported as a zip/tar archive which could then be extracted into a folder or .md file + folder containing all the images.

Describe the benefits this would bring to existing BookStack users

Being able to export markdown files with images for offline use or sharing to other parties.

Can the goal of this request already be achieved via other means?

I have not tried it yet but my guess is that one could make it work with API:

  1. Download markdown file
  2. Download all files mentioned in the markdown file from bookstack into a folder
  3. Replace links in markdown file with the respective files

Have you searched for an existing open/closed issue?

How long have you been using BookStack?

0 to 6 months

Additional context

No response

ssddanbrown commented 1 year ago

Somewhat related to #3182, different fundamental requests but a possible solution may look to meet both requests.

pitastrudl commented 1 year ago

Thanks @ssddanbrown. I was looking at the API docs but could not seem to find a way to list or get images of a page, I thought that was what the API for attachments was but that's a different function of bookstack?

towerplease commented 1 year ago

An overall export-scheme would be nice, to export pages, chapters or shelves in a consistent file, with all media and hyperlinks. This could be imported to a Independent bookstack instance aswell.

florian-obradovic commented 1 year ago

Would love to see this!

tenekev commented 1 year ago

I would love this. As someone who preps notes, diagrams, images in Bookstack, this would be the missing link between Bookstack and my SSG blog.

pchang388 commented 1 year ago

+1 on this feature, would like to have it as well. Awesome work on this regardless!

lazynooblet commented 11 months ago

An overall export-scheme would be nice, to export pages, chapters or shelves in a consistent file, with all media and hyperlinks. This could be imported to a Independent bookstack instance aswell.

This would be great. I'm doing some contract work on the side for similar tasks and am maintaining multiple instances of bookstack, one for each customer. At the moment I'm using copy/paste for text and images individually and its tedious at times.

pchang388 commented 10 months ago

I've been working on something to do this for my own personal use but thought I would share - could be useful for some.

bookstack-file-exporter

So far I added the ability to:

pchang388 commented 7 months ago

I've been working on something to do this for my own personal use but thought I would share - could be useful for some.

bookstack-file-exporter

So far I added the ability to:

  • Export pages in a parent-child layout (shelf/book/chapter/page)

  • Export images

  • For markdown files, replace image links/refs with exported image path. This allows you to render images in markdown previews with the exported local images.

  • Upload to Minio

I've added a newer version with some bug fixes and ability to handle/export attachments as well.

Hope it helps!

sibitu commented 4 months ago

+1 for feature

patsch9 commented 2 months ago

+1