mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-02-05 00:29:48 +03:00
Add System Import/Export #45
Closed
opened 2026-02-04 16:20:39 +03:00 by OVERLORD
·
43 comments
No Branch/Tag Specified
development
l10n_development
further_theme_development
release
llm_only
vectors
v25-11
docker_env
drawio_rendering
user_permissions
ldap_host_failover
svg_image
prosemirror
captcha_example
fix/video-export
v25.12.3
v25.12.2
v25.12.1
v25.12
v25.11.6
v25.11.5
v25.11.4
v24.11.4
v25.11.3
v25.11.2
v25.11.1
v25.11
v25.07.3
v25.07.2
v25.07.1
v25.07
v25.05.2
v25.05.1
v25.05
v25.02.5
v25.02.4
v25.02.3
v25.02.2
v25.02.1
v25.02
v24.12.1
v24.12
v24.10.3
v24.10.2
v24.10.1
v24.10
v24.05.4
v24.05.3
v24.05.2
v24.05.1
v24.05
v24.02.3
v24.02.2
v24.02.1
v24.02
v23.12.3
v23.12.2
v23.12.1
v23.12
v23.10.4
v23.10.3
v23.10.2
v23.10.1
v23.10
v23.08.3
v23.08.2
v23.08.1
v23.08
v23.06.2
v23.06.1
v23.06
v23.05.2
v23.05.1
v23.05
v23.02.3
v23.02.2
v23.02.1
v23.02
v23.01.1
v23.01
v22.11.1
v22.11
v22.10.2
v22.10.1
v22.10
v22.09.1
v22.09
v22.07.3
v22.07.2
v22.07.1
v22.07
v22.06.2
v22.06.1
v22.06
v22.04.2
v22.04.1
v22.04
v22.03.1
v22.03
v22.02.3
v22.02.2
v22.02.1
v22.02
v21.12.5
v21.12.4
v21.12.3
v21.12.2
v21.12.1
v21.12
v21.11.3
v21.11.2
v21.11.1
v21.11
v21.10.3
v21.10.2
v21.10.1
v21.10
v21.08.6
v21.08.5
v21.08.4
v21.08.3
v21.08.2
v21.08.1
v21.08
v21.05.4
v21.05.3
v21.05.2
v21.05.1
v21.05
v21.04.6
v21.04.5
v21.04.4
v21.04.3
v21.04.2
v21.04.1
v21.04
v0.31.8
v0.31.7
v0.31.6
v0.31.5
v0.31.4
v0.31.3
v0.31.2
v0.31.1
v0.31.0
v0.30.7
v0.30.6
v0.30.5
v0.30.4
v0.30.3
v0.30.2
v0.30.1
v0.30.0
v0.29.3
v0.29.2
v0.29.1
v0.29.0
v0.28.3
v0.28.2
v0.28.1
v0.28.0
v0.27.5
v0.27.4
v0.27.3
v0.27.2
v0.27.1
v0.27
v0.26.4
v0.26.3
v0.26.2
v0.26.1
v0.26.0
v0.25.5
v0.25.4
v0.25.3
v0.25.2
v0.25.1
v0.25.0
v0.24.3
v0.24.2
v0.24.1
v0.24.0
v0.23.2
v0.23.1
v0.23.0
v0.22.0
v0.21.0
v0.20.3
v0.20.2
v0.20.1
v0.20.0
v0.19.0
v0.18.5
v0.18.4
v0.18.3
v0.18.2
v0.18.1
v0.18.0
v0.17.4
v0.17.3
v0.17.2
v0.17.1
v0.17.0
v0.16.3
v0.16.2
v0.16.1
v0.16.0
v0.15.3
v0.15.2
v0.15.1
v0.15.0
v0.14.3
v0.14.2
v0.14.1
v0.14.0
v0.13.1
v0.13.0
v0.12.2
v0.12.1
v0.12.0
v0.11.2
v0.11.1
v0.11.0
v0.10.0
v0.9.3
v0.9.2
v0.9.1
v0.9.0
v0.8.2
v0.8.1
v0.8.0
v0.7.6
v0.7.5
v0.7.4
v0.7.3
0.7.2
v.0.7.1
v0.7.0
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.0
Labels
Clear labels
🎨 Design
📖 Docs Update
🐛 Bug
🐛 Bug
:cat2:🐈 Possible duplicate
💿 Database
☕ Open to discussion
💻 Front-End
🐕 Support
🚪 Authentication
🌍 Translations
🔌 API Task
🏭 Back-End
⛲ Upstream
🔨 Feature Request
🛠️ Enhancement
🛠️ Enhancement
🛠️ Enhancement
❤️ Happy feedback
🔒 Security
🔍 Pending Validation
💆 UX
📝 WYSIWYG Editor
🌔 Out of scope
🔩 API Request
:octocat: Admin/Meta
🖌️ View Customization
❓ Question
🚀 Priority
🛡️ Blocked
🚚 Export System
♿ A11y
🔧 Maintenance
> Markdown Editor
No Label
🛠️ Enhancement
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/BookStack#45
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ssddanbrown on GitHub (Jan 14, 2016).
@davidtorcivia commented on GitHub (May 7, 2016):
Adding support for this feature. The export ability for single pages is great, but being able to export an entire book or chapter to PDF/HTML/TXT (or even EPUB directly) would be fantastic and could really expand the usecases of the software.
@patoroco commented on GitHub (Dec 27, 2016):
Related with #177 for export whole book.
Anyway, I would like a feature to bulk-import pages from... (in our case) github wiki pages (a bunch of markdown files)
@viewty commented on GitHub (Jul 13, 2017):
Markdown export would be great if it's possible for that to be incorporated at some point?
@terxw commented on GitHub (May 13, 2018):
Currently I am using md text files and I am testing bookstack, it would be awsome to import all files from directory as pages.
@Leon99 commented on GitHub (Oct 23, 2018):
Any chances for this to get done? Migration scenarios are currently not possible, which means that BookStack missing out on all those businesses around with existing wikis.
@schuepp commented on GitHub (Oct 25, 2018):
.md import would be great as a starting point for migration. PDF export of shelves would also be great.
@edenpc commented on GitHub (Jan 11, 2019):
+1 for importing .md
@Nebucatnetzer commented on GitHub (Feb 5, 2019):
I agree, importing would be great. I'm currently importing a lot of notes by hand.
It's sort of a good thing since I have to go through all them but honestly if given the choice I would've just uploaded them. I converted them from org-mode to html with pandoc.
Works quite well when I paste the code directly into the source editor.
@Kazakhstanec94 commented on GitHub (Feb 19, 2019):
Good day guys.
Is it possible to import data from confluence? If so, how to do it
@oden08 commented on GitHub (Mar 28, 2019):
Is it possible to get an update on if an import is on the roadmap?
@ssddanbrown commented on GitHub (Mar 28, 2019):
@oden08 Import is correctly not on the roadmap itself.
To be honest, "Import" as a feature request on its own is way too generic. The are many different formats or systems people will be looking to import from that we can't really just have a generic "Import" option. I initially opened this issue envisioning this to be a way to backup/restore a BookStack instance although I've had trouble seeing how we could achieve this as reliably as the current MySQL dump option.
On the roadmap is a REST API. For importing from other formats or systems, I imagine the best way forward will be for people to write scripts or applications to import into BookStack using the API. That way the BookStack project itself does not have to maintain a whole bunch of import logic.
That's how I see things moving forward.
@Leon99 commented on GitHub (Mar 29, 2019):
@ssddanbrown any chances for markdown import, being the most requested approach (which kind of makes sense, given that most wiki systems support it one way or another), implemented by you?
@bitinerant commented on GitHub (Jun 4, 2019):
In the mean time, I'd be content hacking together my own import solution, but I get "Page not found" when I do the following:
What else is needed?
@ssddanbrown commented on GitHub (Jun 4, 2019):
@bitinerant Try running
php artisan bookstack:regenerate-permissions. Think the permission index just needs to be updated.@bitinerant commented on GitHub (Jun 4, 2019):
Thank you, sir! That did it. :-)
@bitinerant commented on GitHub (Jun 5, 2019):
Given the markdown, how can I generate the html and plain text to insert into the
pagestable, preferably from the command-line? Or, how can I refresh these 2 fields in the entire table? I've been searching all over for what should be really simple, but I don't know PHP or JavaScript.@ssddanbrown commented on GitHub (Jun 6, 2019):
@bitinerant Currently the markdown conversion to HTML is performed client side so there's no back-end systems to do this. You'd have to convert before sending in manually.
The conversion to plaintext is done at the following location:
https://github.com/BookStackApp/BookStack/blob/v0.26.2/app/Entities/Repos/PageRepo.php#L213-L217
The plaintext generation is not available via command-line or anything at this time.
@bitinerant commented on GitHub (Jun 6, 2019):
Thanks a lot, Dan. I'll either write a script to do a null edit on every page from the client, or use something like Pandoc.
@wizofe commented on GitHub (Jul 4, 2019):
@bitinerant Pandoc sounds like a great idea! How far are you with your mitigation/convertion script? As I am writing something similar and don't want to duplicate efforts :)
@bitinerant commented on GitHub (Jul 4, 2019):
@wizofe - other projects preempted this, so I'm not too far yet. What wiki are you converting from and what language are you writing the conversion in? For me this is DokuWiki and Python.
So far I have several regular expressions to 'fix' Pandoc's incomplete DokuWiki support, the Pandoc conversion (
markdown = pypandoc.convert(dokuwiki, format="dokuwiki", to="commonmark+pipe_tables+backtick_code_blocks", extra_args=["--atx-headers", "--wrap=none"])), and then several regular expressions to personalize the markdown. In the near future I hope to finish my regular expressions, generate html with Pandoc (should be trivial), and convert old revisions (history).I'd be happy to coordinate on parts of the development if it makes sense.
@openmoto commented on GitHub (Jul 10, 2019):
Hi guys,
I have a bookstack setup with one shelf per group I'm helping, after I complete the initial documentation for them and get a go ahead, I create their own bookstack server and manually copy their content page by page.
Is there no chance of having an export/import or migrate shelf to another bookstack instance feature?
@ssddanbrown commented on GitHub (Jul 10, 2019):
@openmoto Not right now. Could probably do some creating scripting to achieve what you're doing. Uploaded images could make things tricky though.
As per this comment above, An API is upcoming on the roadmap which will make scripting this kind of thing easier.
@OlofBailey commented on GitHub (Feb 15, 2020):
Import from Mindtouch DekiWiki would be awsome.
@Smoin1 commented on GitHub (May 2, 2020):
any updates on the rest api or the possibility to export a whole shelf? :)
@ssddanbrown commented on GitHub (May 5, 2020):
Hi @Smoin1,
The API has been started, you can find documentation at
<your_bookstack_url>/api/docs, You'll need the "Access system API" permission for this. API endpoints are being expanded on each release.No updates on shelf exports.
@b0r1sp commented on GitHub (Nov 25, 2020):
Atlassian drops support of self-hosted Confluence, any chances to create a painless migration scenario to bookstack?
@ssddanbrown commented on GitHub (Nov 26, 2020):
@b0r1sp I'm not looking to include any platform specific (Including confluence) migration/import/export logic within the core project itself. I'm just finishing up the core parts of the API though so things will become easier for others to make such a process. Depending on availability I may contribute to that myself but I'm not familiar with the specific workings of confluence so I'd rather someone with confluence experience led such a task.
@ashleycawley commented on GitHub (Feb 19, 2021):
I would also love to see exporting and importing functionality added to BookStack in a format of which BookStack can easily interpret on the import. For example, lets say I have a instance with various shelves and books in. It would be desirable to be able to export a whole book (images and all) in a BookStack friendly format and then that export dump could be used in conjunction with a clean BookStack instance, and on the import process if it is in a nice forma it could understand it would be great if it had a import wizard which actually asked you interactively what data you wished to import, giving you the choice of the whole book, or select specific chapters or pages only etc.
I know its very easy to request such features but potentially a nightmare to try and build them (I'm incapable of doing such things myself) so I want to thank you for what we do have! And thank any contributors that work towards this feature.
@lieszkol commented on GitHub (Feb 22, 2021):
+1 for this feature exactly as @ashleycawley described it. Much thanks to ssddabrown for this awesome project! Perhaps a bounty for such features to keep the developer(s) motivated?
@dawidmachon commented on GitHub (Oct 26, 2021):
+1 as request for import
Thanks for export ;)
@robertoschwald commented on GitHub (Jan 12, 2022):
Tbh to get Confluence users into BookStackApp, importer is a must, otherwise this product looses lots of potential users.
I would generally say this should be maintained / developed as plugins for different systems, so 3rd parties can develop the implementations, but as #127 is not on the roadmap, this is currently not possible. Sad.
@ssddanbrown commented on GitHub (Jan 12, 2022):
@robertoschwald as per my last comment on #217 there are now a range of extension/integration options. Think the API would be the most useful in this case. Nothing is stopping you, or a third party from using the API to ease import/migration. If the API is lacking that can be raised as a new issue (If not already open). Even before that some have automated such tasks direct via the database (Although this is not ideal).
@robertoschwald commented on GitHub (Jan 28, 2022):
I fear without a plugin ecosystem (plugin registry etc.) this project is loosing traction and a lot of opportunities.
@ssddanbrown commented on GitHub (Jan 28, 2022):
@robertoschwald If you want to discuss a plugin system please do that in #127 but, if you proceed, please do so constructively with my last two comments of #127 in mind, instead of providing unfounded comments such as "this project is loosing traction".
@eckad158 commented on GitHub (Feb 1, 2022):
Thank you @ssddanbrown for all the work you have already done. I think some kind of transfer software from confluence to bookstack would be really usefull.
I respect your choice not to implement this feature since bookstack already offers a generic API.
Today i started building a python script that transfers data from confluence to bookstack (C2BS).
@jonathon2nd commented on GitHub (May 13, 2022):
We have started testing BookStack due to Tettra raising their prices.
Is there a way to import the HTML export from Tettra into BookStack?
EDIT: OK I have something working.
So for our Tettra export, files are separate form the html, so fix that with https://gist.github.com/pansapiens/110431456e8a4ba4f2eb
python standalone_html.py Thing.html Thing-new.htmlThen, post with
curl -X POST http://wiki.example.com/api/pages -H 'Authorization: Token E:E' -F "book_id=1" -F "name=Thing" -F "html=<Thing-new.html"EDIT: The
<in"html=<Thing-new.html"is very important and not a typo. See man curl for more info. Important except at the bottom.This creates an almost identical page to what we had in Tettra. Including the images, yay!
Two things left to iron out.
The urls in on the page are not highlighted/clickable on import,This is actually Tettra's fault. Their export of urls is nonsensical and not consistent. Requires manual fixing.
and the double spacing all all newlines is aggravating. I see how to change that here: https://github.com/BookStackApp/BookStack/issues/1043#issuecomment-426748324, but going to see if there is some way to automate this on import. Will update when I have that.
Getting it to upload the actual file contents was a massive pain. Summary of what I tried so that it can help others.
First tried this: https://stackoverflow.com/questions/47662895/how-to-send-json-file-as-part-of-request-body-in-curl-post-command/47662945#47662945
But Curl is not happy with that
Tried a bunch of other stuff, modifying the file or the form did not help.
I dug into man for curl and found this
And with that modification, I am able to upload an html file into the html field on the curl post. Hope this helps someone else.
man curlexcept@ssddanbrown commented on GitHub (May 13, 2022):
@jonathon2nd Fair play for getting that going with bash/curl.
If you haven't seen we have a bunch of examples in our api scripts repo here, might help, otherwise feel free to question any API details on our discord.
@idx3d commented on GitHub (Aug 16, 2022):
MD Import could be really great feature.
Thanks!
@ssddanbrown commented on GitHub (Aug 17, 2022):
@idx3d Our API does already accept markdown input, otherwise you could just paste stuff into the markdown page editor.
@dimisjim commented on GitHub (Jan 16, 2024):
@Kazakhstanec94 did you find a way to import from Confluence Server?
@GanizaniSitara commented on GitHub (Jan 16, 2024):
Alas, no, and have pretty much given up on this. I think if we ever do migrate it will be to MediaWiki.
On 16 Jan 2024, at 17:31, Dimitris Moraitidis @.***> wrote:
@Kazakhstanec94https://github.com/Kazakhstanec94 did you find a way to import from Confluence Server?
—
Reply to this email directly, view it on GitHubhttps://github.com/BookStackApp/BookStack/issues/43#issuecomment-1894197811, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB4RHWSUBGKEBQHJYGRBZPLYO22PDAVCNFSM4BYRXNCKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBZGQYTSNZYGEYQ.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
@ErikW-Farrow commented on GitHub (May 22, 2024):
I would love to be able to have the ability to import documents. I am in the process of changing out our current standard (word documents) and want to get this into a proper KB, If we could mass import documents instead of having to Copy/Paste into the MD Editor that would make implementation of this a lot easier for me to bring to my team onboard.
@ssddanbrown commented on GitHub (Dec 20, 2024):
I'm going to go ahead and close this off, since this scope/needs of this issue has never been super clear, some of the requests here have already been met, and since I've now built out and included some form of export/import format for the next feature release.
Here's a sneak preview if interested:
https://github.com/user-attachments/assets/cfa9de0e-a5cd-41fb-94a6-d33a4e63a6da
And here's a full reference of the underlying format I've used for this:
https://github.com/BookStackApp/BookStack/blob/development/dev/docs/portable-zip-file-format.md
Other than that we have the API which provides a lot of access for custom import/export operations.
For any other requests/needs, more specific issues can be opened (if not already existing).
I will state up-front though that I wouldn't consider the import/export of other platforms within scope, but the API and new import/export format can help with that, and I'm happy to hear where improvements could be made to make that easier for developers where needed.