BookStack-Python-exporter
BookStack-Python-exporter copied to clipboard
Export Attachments
Is it possible to export attachments?
Currently script does not export attachments. BookStack API gives such possibility, so I think I might make that working as soon as I find time. Currently my idea is to create folder named like __attachments__
next to page to which it was attached, and put them there. But then handling export at multiple levels (pages,chapters,books) could be tricky. I could just make separate folder for only attachments and put all of them there, at their proper paths. If you have suggestions on how that should be handled, you can present them.
Attachments are now exported by default. If any suggestions/problems arise, feel free to reopen the issue.
Just in case someone else hits the same problem. In our bookstack we have an attachment linked to a protected resource. The change to export attachments by default thus resulted in a urllib.error.HTTPError: HTTP Error 401: Unauthorized
. For me the new flag --dont-export-external-attachments
is sufficient to resolve the problem. Thanks for the update. :)
Thank you for your work! Can links attachments be exported to a text file, maybe something like CSV. For example: Link name; link value
They could be, and probably this would be good in case of protected resources, so I might look into that.