Skip to content

API: Add endpoints for import/export #5592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

LM-Nishant
Copy link

While working on my project, I extensively utilized BookStack as a central platform for organizing and managing content. During development, I identified the need for additional functionality to export and import books, along with their pages and chapters, as ZIP files. This would streamline data portability and enable seamless integration of BookStack content into other workflows.
To address this requirement, I implemented the following features:

  • Export functionality: Allows users to package a book, its pages, and chapters into a single ZIP file for download.
  • Import functionality: Provides the ability to upload ZIP files, automatically processing the directory structure to recreate books, pages, and chapters within BookStack.

This contribution aims to enhance BookStack’s usability by improving content sharing and migration capabilities.
Let me know if you'd like adjustments or additional details!

…nd define a route entry for handling the import process. Implement logic to read the list of files within the ZIP, process the directory structure, and automatically create associated pages, chapters, and books based on the ZIP file's contents.
@ssddanbrown ssddanbrown changed the title Implement functionality to export a book, along with its pages and chapters, as a ZIP file Description: While working on my project, I extensively utilized BookStack as a central platform for organizing and managing content. During development, I identified the need for additional functionality to export and import books, along with their pages and chapters, as ZIP files. This would streamline data portability and enable seamless integration of BookStack content into other workflows. To address this requirement, I implemented the following features: - Export functionality: Allows users to package a book, its pages, and chapters into a single ZIP file for download. - Import functionality: Provides the ability to upload ZIP files, automatically processing the directory structure to recreate books, pages, and chapters within BookStack. This contribution aims to enhance BookStack’s usability by improving content sharing and migration capabilities. Let me know if you'd like adjustments or additional details! API: Add endpoints for import/export Apr 25, 2025
@ssddanbrown
Copy link
Member

Thanks for offering this @LM-Nishant.
I had planned to add ZIP import/export endpoints soon but was ideally waiting for a little more feedback regarding the use of the recently added import/export ZIP system before adding API endpoints, in case we decided to change the flow. I'd want to avoid adding any APIs which might change.

I noticed your description made no mention of the API though, do you specifically need API use?
Have you been using the existing in-app ZIP imports and exports? If so, how has your experience been so far? Has everything worked okay?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants