BookStack
BookStack copied to clipboard
Add System Import/Export
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.
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)
Markdown export would be great if it's possible for that to be incorporated at some point?
Currently I am using md text files and I am testing bookstack, it would be awsome to import all files from directory as pages.
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.
.md import would be great as a starting point for migration. PDF export of shelves would also be great.
+1 for importing .md
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.
Good day guys. Is it possible to import data from confluence? If so, how to do it
Is it possible to get an update on if an import is on the roadmap?
@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.
@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?
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:
- add shelves, books, chapters, pages, e.g.:
INSERT INTO `pages` VALUES (NULL,1,0,'title here','slug-here','<p id=\"bkmrk-text-here\">text here</p>','text here',5,'2019-06-04 15:55:55','2019-06-04 15:55:55',1,1,0,0,'text here',1)
- rebuild the search index - see docs and issue #974
What else is needed?
@bitinerant Try running php artisan bookstack:regenerate-permissions
. Think the permission index just needs to be updated.
Thank you, sir! That did it. :-)
Given the markdown, how can I generate the html and plain text to insert into the pages
table, 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.
@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.
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.
@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 :)
@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.
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?
@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.
Import from Mindtouch DekiWiki would be awsome.
any updates on the rest api or the possibility to export a whole shelf? :)
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.
Atlassian drops support of self-hosted Confluence, any chances to create a painless migration scenario to bookstack?
@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.
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.
+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?
+1 as request for import
Thanks for export ;)