danny0838 / webscrapbook

A browser extension that captures web pages to local device or backend server for future retrieval, organization, annotation, and edit. This project inherits from legacy Firefox add-on ScrapBook X.
Mozilla Public License 2.0
901 stars 120 forks source link

Move assets to a "assets" directory #185

Open sebdiem opened 4 years ago

sebdiem commented 4 years ago

Wow this is a great project ! It really simplifies my workflow to share data science notebooks. Would it be possible to "tidy" the assets in a dedicated folder so that the index.html is more accessible when exporting to folder ? This would simplify sharing with non tech-savy users.

Thanks for the great work !

danny0838 commented 4 years ago

Adding another folder makes file deduplication and interlinking much more difficult as all relative links need to be tweaked and be really taken care. For example, to link from index.html to assets/*, from assets/frame1.html to assets/bar.png, assets/frame1.html to index.html, index.html to assets/frame1.html, assets/frame1.html to assets/frame2.html, etc.

Another issue to to keep backward compatibility with legacy ScrapBook.

We may implement it in the future if all such issues can be resolved... but not likely for now.

sebdiem commented 4 years ago

thank you for your precise answer

chrizilla commented 1 year ago

Thank you for your great extension! 👍

but not likely for now.

I understand that it may not be trivial, but please keep this request in mind for the future, because the tidy folder structure of the Firefox MAF addon is really much more advantageous.

Knocks commented 1 year ago

Separating assets is not just for aesthetics or making it easier for non-tech users. It also allows to merge identical assets if you are saving multiple pages from the same domain. That also makes find and replace much easier in the future if you need to manipulate these asset locations.

Ideally, images, CSS, scripts etc and the index file should all be separate.

If backwards compatibility is a concern, the option can simply be enabled by the user.