zadam / trilium Goto Github PK
View Code? Open in Web Editor NEWBuild your personal knowledge base with Trilium Notes
License: GNU Affero General Public License v3.0
Build your personal knowledge base with Trilium Notes
License: GNU Affero General Public License v3.0
When creating new subnote into unexpanded (not yet loaded) note, then note is created but it looks like it's the only note in its parent without any siblings. This is because we don't lazy load siblings before creating the note.
The idea is to provide quick way to share text and images from your phone to Trilium. For example you take a picture with phone camera and share it to the Trilium app which uploads it to the Trilium server. Content will be uploaded to either fixed location or e.g. to "date" note.
App won't allow reading notes/content, it's essentially "write-only".
Trilium v0.3.3/0.4.0
How do I copy what used to be document.db from one PC to another?
https://github.com/zadam/trilium/wiki/Document
https://github.com/zadam/trilium/wiki/Synchronization
"Note attributes" dialog appears again this time with single empty attribute.
The idea is that you should be able to just press enter to return to previous note. Now you need to press down key to select first item and then enter.
It's not possible to delete attribute in 0.5.5 (or I haven't figured out how).
Trilium now supports "substring" full text, nothing more advanced like tokenization.
Will use probably FTS4 which is part of the standard node js SQLite build (FTS5 isn't AFAIK).
UPDATE: looks like FTS5 is enabled: https://github.com/mapbox/node-sqlite3/blob/master/deps/sqlite3.gyp
It might be good idea to show attributes/values for selected note in status bar (either below actual note or at the bottom of the app, which may be more consistent as it would be always the same position).
Scripts can include protected notes (work with protected data), but if user doesn't have protected session, then scripts don't detect it and just fails in unpredictable way.
When encrypted note is used outside of protected session, we should fail the operation and inform the user.
Ultimately we need better sync protocol, but in the mean time fix would be to wait for the sync to finish and only then start consistency checks.
Code is executed on frontend (but of course can call backend as well). Marking is done through some custom attributes. Multiple notes can be marked as such, but order of execution is not defined. Note execution is the same as usual - all JS subnotes will be included etc.
Example would be custom keyboard shortcut registration on app startup.
Allow e.g. @dateModified, @dateCreated, @isProtected to be used for filtering in similar way to the "real" attributes.
Applies only to protected leaf-notes. Unprotected leaf note can be kept even if it's under protected note.
Currently backup is configured to create snapshots daily. This can eat up significant storage quickly so it would be good to clean up old backups automatically.
It would be nice to do it in some structured manner though - e.g. keep daily backup for past week, then one for every week until one month, then one per month etc. But maybe that's an overengineering ...
This is useful for hypotetical "what links here" feature and I guess could be used for some interesting data mining/visualisations etc.
At first no encryption for links.
Source text example of multiple lines beginning with a dash:
- Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Donec imperdiet orci eu arcu tincidunt varius.
- Fusce semper mi at sem interdum posuere.
- Pellentesque viverra erat et erat fringilla, condimentum feugiat dolor scelerisque.
- Vestibulum faucibus eros a nulla bibendum, at dignissim augue placerat.
- Praesent congue sem tristique convallis tempus.
When pasted into trilium, instead of a bulleted list:
it's converted to a single paragraph:
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. - Donec imperdiet orci eu arcu tincidunt varius. - Fusce semper mi at sem interdum posuere. - Pellentesque viverra erat et erat fringilla, condimentum feugiat dolor scelerisque. - Vestibulum faucibus eros a nulla bibendum, at dignissim augue placerat. - Praesent congue sem tristique convallis tempus.
I sometimes have multiple values for attribute e.g. Supplier can be Supplier_A and Supplier_B for certain nodes.
Might work to have "+" button to add additional value or allow duplicated attributes, not sure what you think about this in general?
Otherwise it can hangup pretty bad with a large number of results.
Same as in browser:
This is probably because we're rebuilding whole autocomplete data for each auto complete search. We should probably cache it somehow / build on the fly in the background
Currently "Show note source" and "Note attributes" are available only from keyboard shortcut which is not really discoverable and intuitive.
Current "Show history" button will be converted into "Note actions" button (maybe hamburger icon or "...") which will contain (for now):
Create dialog which will go to the selected date (date picker). If the day note doesn't exist yet, create it.
This will allow to easily create e.g. tasks for tomorrow / future.
Since Trilium now lazy loads all tree nodes, filtering existing branches doesn't work. Backend returns correct noteIds, but since nodes with these notes are not lazy loaded yet, they won't be filtered.
One way to fix this is to walk through "some path" of every returned note before running the tree.filterBranches.
Add ability to add simple alarms into notes, ideally by just inserting text into note, e.g. something like
@notify tomorrow at five
We don't need to provide any text since that's what the surrounding note is supposed to be.
This has a problem of being relative to present time, but when this is evaluated in the future, value will be different. It would be easier to always specify full date/time like "2018-02-01 17:00:00" but that's way more cumbersome.
At specified date/time, user is notified - with electron we can trigger native notification, in webapp we need to provide some fallback. Once the user "acknowledges" the notification, this is saved and synced across instances. There should be also some way to see all past and upcoming alarms/notifications.
We'll use existing search input. I'm thinking about syntax like this:
@abc - matches notes with attribute abc
@!abc - matches notes without abc attribute (maybe not the best syntax)
@abc=true - matches notes with attribute abc having value true
@abc!=true
@"weird attribute"="weird value" - works also with whitespace inside names values
@abc and @def - matches notes with both abc and def
@abc @def - AND relation is implicit when specifying multiple attributes
@abc or @def - OR relation
@abc<=5 - numerical comparison (also >, >=, <).
some search string @abc @def - combination of fulltext and attribute search - both of them need to match (OR not supported)
@abc @def some search string - same combination
Implementation-wise I'm thinking about just LEFT JOINining all mentioned attributes and then constructing WHERE according to the actual conditions.
Benefit is that it's searchable which is nice for a long list of recent notes.
with 0.5.5
Attributes dialog invoked
Nothing happens.
Repro with entirely fresh DB created in 0.5.5 as well.
e.g. if the shortcut is already registered.
The idea is that you are e.g. in your browser, select some text and press CTRL-SHIFT-C and the selected text is sent to Trilium and created new note with this text under day note.
Could work only in Electron. Not sure if it's even possible or if I need to copy it to the clipboard first (i.e. CTRL-C copies into clipboard and then I can trigger Trilium to read the clipboard contents and save it).
So far they are named with underscores - e.g. note_history_id. Since we're now entities exposing script API, there's a weird distinction between entity attributes (underscores) and other values (camelCase). This also caused some bugs in regular trilium code in the past.
Also rename note_text to content and note_title to just title.
Complains about creating cycle ...
so e.g. 05 - May and 15 - Monday
Use standard jQuery UI autocomplete. The idea is to aid in discovery of existing / built-in attributes and of course easier to type.
For attribute name the autocomplete will list all existing attributes + built in ones - (run_on_startup etc. are present even if not used yet).
Attribute value has autocomplete for values which are used for this specific attribute.
These items might be e.g. archives - the old stuff which we want to keep around, but we don't really need quick access to.
This would have a transitive effect on all note paths going through this note.
Simple way to do this is to create a special boolean attribute which would control this.
Maybe add an "About..." button or link?
Scenario - note Parent and note X of which there's clone X1 and X2.
X1 is moved to Parent and then deleted - but still exists there (notes_tree are soft-deleted).
We then want to move X2 to parent, but that's not possible since X1 is still there (albeit soft-deleted). This is not possible since we keep invariant of unique parentNoteId <-> childNoteId relationship.
Simplest solution seems to be to hard-delete note tree rows instead of soft-deleting them. This will affect sync.
It's saved as empty attribute name, not sure this is correct.
Code which retrieves the startup scripts should order results by the attribute value - this can then be used for enforcing script execution order, which is important for e.g. keeping consistent toolbar button layout (which depends on the order scripts run).
Value for run_on_startup should be optional though.
Similar to this demo: https://jqueryui.com/autocomplete/#multiple
Probably https://codemirror.net/
Notes will now have "type" either "html/text" or "code". If code, then note will also have attribute detailing type of code (e.g. javascript) based on which the code editor will be configured.
Note type is chosen when creating a note. It might be inherited when using CTRL-O/CTRL-P from the parent.
Use cases for this feature:
When pressing CTRL-ALT-P if there's no day note, then it is created and then sub-note should be created.
In such case it looks like only day-note is created and not subnote. After reload the subnote appears so it's probably something with reloading note tree.
Trillium 0.5.4 beta
Expected:
Word "ipsum" is selected (this is kind of standard shortcut).
Observed:
Moved in the tree node up.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.