trilium
trilium copied to clipboard
(Feature request) A quicker way to create a bunch of new pages from a template
Describe feature
Many of my pages follow a template. For example, I have a few hundred pages for various AI and CS papers in Trilium, and have a template that endows them with inherited promoted attributes like "author", "cites this other paper", "topic", "arxiv link" etc.
Usually, I start out without the citations filled out. Then, as I read the paper, if I see it citing some paper that sounds interesting, I add a new instance of the "cites this paper" relation, paste in the paper's title, and either link an existing page (if I already have that paper in Trilium), or create a new page for it from the relation combo box.
I am now reading a paper and creating references this way. Currently I follow roughly this workflow:
- Read a bit of the paper I'm reading
- Type some notes into Trilium
- If the section I just read references something I wanna read, use the relation combo box to create or link the cited papers.
After that, I end up with a bunch of new empty pages (just with a title), for the papers I just added as those new relations. Then, I want to endow all the newly created pages with the paper template - so that they have the right promoted attributes etc.
The way I currently do that is:
- Ctrl+click every new page I created in the sidebar, opening each of them in a separate tab
- Ctrl+Tab to select tab of the first new page
- Repeat for every page:
- Alt+A to open owned attributes
- Type (or paste from keyboard):
~template=@Paper template
, Enter to confirm - Ctrl+W to close tab and go to next page
I have several ideas for how this workflow could be improved.
Bulk-adding attributes
When the user uses Shift+Click to select a bunch of pages in the tree bar, add a right-click option (and maybe keyboard shortcut) that open a dialog for adding owned attributes to all selected pages.
This way I could add the ~template=@Paper template
attribute en masse.
Select template when creating page
The flow for creating a new page (either via linking to it with Ctrl+L, or via creating a relation to it) could maybe be improved by adding a control to easily select a template for the new page.
Auto-infer correct template, or set at relation level
The ~cites
relation is only supposed to refer to pages that are either papers, or books (or other media). I have an informal, unenforced "type system" like this in my Trilium database. Other types in it are: "issue", "repeated note", "person", "location", "belonging" (as in "an object I own") etc.
Ideally I'd like Trilium to understand this type system and check for it and leverage it for better autocomplete suggestions on relations.
But, as a simpler idea, you could allow a relation definition to set that pages created in this relation's combo box should be created with a given template.
Additional Information
No response
Hi, your first 2 proposals look like good features and I have already thought in similar directions, I've split them out into #2812 and #2813.
awesome progress on both, thanks a lot!
only thing i'd request in addition would be to be able to navigate the "create page from template" dialog with keyboard only - ideally with a combo box that lets you type in part of a template name. it could be a better experience than finding the particular template i'm looking for with my eyes and clicking it.