webscrapbook icon indicating copy to clipboard operation
webscrapbook copied to clipboard

Move assets to a "assets" directory

Open sebdiem opened this issue 4 years ago • 4 comments

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 !

sebdiem avatar Oct 24 '20 06:10 sebdiem

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.

danny0838 avatar Oct 24 '20 08:10 danny0838

thank you for your precise answer

sebdiem avatar Oct 24 '20 10:10 sebdiem

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.

chrizilla avatar Jun 20 '23 21:06 chrizilla

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.

Knocks avatar Aug 24 '23 14:08 Knocks