BookStack-Python-exporter icon indicating copy to clipboard operation
BookStack-Python-exporter copied to clipboard

Export Attachments

Open hqsone opened this issue 1 year ago • 6 comments

Is it possible to export attachments?

hqsone avatar Dec 29 '23 00:12 hqsone

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.

Szwendacz99 avatar Dec 29 '23 16:12 Szwendacz99

Attachments are now exported by default. If any suggestions/problems arise, feel free to reopen the issue.

Szwendacz99 avatar Dec 31 '23 15:12 Szwendacz99

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. :)

dirks avatar Jan 02 '24 10:01 dirks

Thank you for your work! Can links attachments be exported to a text file, maybe something like CSV. For example: Link name; link value

hqsone avatar Jan 04 '24 12:01 hqsone

They could be, and probably this would be good in case of protected resources, so I might look into that.

Szwendacz99 avatar Jan 04 '24 12:01 Szwendacz99