Skip to content
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

Add System Import/Export #43

Open
ssddanbrown opened this issue Jan 13, 2016 · 42 comments
Open

Add System Import/Export #43

ssddanbrown opened this issue Jan 13, 2016 · 42 comments

Comments

@ssddanbrown
Copy link
Member

No description provided.

@davidtorcivia
Copy link

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
Copy link

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
Copy link

viewty commented Jul 13, 2017

Markdown export would be great if it's possible for that to be incorporated at some point?

@terxw
Copy link

terxw commented 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
Copy link

Leon99 commented 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.

@brutecode
Copy link

.md import would be great as a starting point for migration. PDF export of shelves would also be great.

@edenpc
Copy link

edenpc commented Jan 11, 2019

+1 for importing .md

@Abijeet Abijeet mentioned this issue Jan 27, 2019
@Nebucatnetzer
Copy link

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
Copy link

Kazakhstanec94 commented Feb 19, 2019

Good day guys.
Is it possible to import data from confluence? If so, how to do it

@oden08
Copy link

oden08 commented Mar 28, 2019

Is it possible to get an update on if an import is on the roadmap?

@ssddanbrown
Copy link
Member Author

@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
Copy link

Leon99 commented 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
Copy link

bitinerant commented 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:

  • 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)

What else is needed?

@ssddanbrown
Copy link
Member Author

@bitinerant Try running php artisan bookstack:regenerate-permissions. Think the permission index just needs to be updated.

@bitinerant
Copy link

Thank you, sir! That did it. :-)

@bitinerant
Copy link

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.

@ssddanbrown
Copy link
Member Author

@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
Copy link

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
Copy link

wizofe commented 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
Copy link

@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
Copy link

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?

@idx3d
Copy link

idx3d commented Aug 16, 2022

MD Import could be really great feature.
Thanks!

@ssddanbrown
Copy link
Member Author

@idx3d Our API does already accept markdown input, otherwise you could just paste stuff into the markdown page editor.

@dimisjim
Copy link

@Kazakhstanec94 did you find a way to import from Confluence Server?

@GanizaniSitara
Copy link

GanizaniSitara commented Jan 16, 2024 via email

@ErikW-Farrow
Copy link

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.

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

No branches or pull requests