Replies: 2 comments 10 replies
-
@maphew how are you performing "Web pages saved with Chrome or Firefox"? Is this using the web-clipper or something else? This is most likely an artifact of when Trilium didn't hide pictures or related media to the user (when pictures were their own note). Would you also be able to just quickly document the steps needed to reproduce what you're seeing? Would help the sanity quite a bit 🤣 |
Beta Was this translation helpful? Give feedback.
-
This works, but raises challenges for notes that will be shared: if the Assets/Media branch is not shared then the referenced media files will not display. So for this method to work there needs to be 2 Media notes: 1 for private, the default, and one for public. The operator needs to be aware and move media from one to the other -- and back if un-sharing. So while it's possible I wouldn't recommend. Over the course of time a person will forget to manage the media files and make files unreachable, or worse, public when they're meant to be private. The better solution is to change html import so it embeds assets as if they were pasted in instead of referencing them. |
Beta Was this translation helpful? Give feedback.
-
Web pages saved with Chrome or Firefox are as
Foobar.html
and any referenced images, css, js, ... are saved inFoobar_files
sub-folder. When such a page is wrapped in a zip and imported into Trilium the result is a Note, a Note-folder, and the contents of the _files sub-folder as attachments to Note-folder:If the same note is created interactively in Trilium and using the Insert Image or attachment features the images and attachments are hidden from the Table of Contents view, only the Note is shown.
From a navigation and node management point of view the interactive result is much preferred -- we only have one item to see and manipulate. It's much less cluttered.
Is there a reason import does not create the same result? Speculation: yes, because any files in the
..._files
folder that are not referred to in the text will be deleted when the automatic database cleanup routines run, we don't want to risk information loss.Initially this post was going to be a feature request to change import so it replicates the interactive result: a single note with images and attachments hidden from view until you go to Note >> 3-dot >> Attachments menu. However I realised the current Import result has a side effect that is potentially very useful: Since the parent Note-folder owns and references the assets, the clean-up janitor leaves them alone, which allows re-use of images and other attachments without duplication.
So is there a way to have the best of both worlds: a clean and unclutted Table of Contents, and a folder of assets that can be re-used in multiple notes without duplication?
I think so: after import automatically move
*_files
note-folders into a root levelAssets
orMedia
branch (name configurable), perhaps in the 'Hidden Notes' subtree.Maybe there are other, smarter approaches though? What do others think?
Beta Was this translation helpful? Give feedback.
All reactions