This script creates a relational notes system in DT3 in a way that is similar to Roam Research. Another way to describe this script is a complex script that creates the wikilinks of a special type of views in which each view is a page that merges the text content of all notes under a tag. The view can be refreshed to reflect the change in files and their contents in a tag, and the files can be edited directly from within the view.
I have re-written this post to reflect all latest changes up to version v1b16.
There are three nonexclusive approaches to relate notes and documents by brute-force: by links and by groups and tags. For example, wikilink and DTâs item-link connect notes by backlinks; the Hook app creates a hidden group for each document and files are hooked when they are being placed into the same hidden groups. The Roam Research mainly uses tags to connect its text entries.
My Stack V5, Stacklink, scripts create and manage notes somewhat similar to the Hook app and strengthen the article-notes connections by DT-links. I use Tagger V5 extensively to maintain the lateral relationship among the notes.
I develop MergeView and MVoutline scripts to access info within each tag and the connection among tags. MergeView script merges the content of files under a tag and MVOutline consolidates the merge views of tags into an outline. But the workflows are too linear to be effective in exploring the connection of info. Journal script takes a different approach.
What the script does:
What a journal view does: A journal view keeps track of notes or random thoughts or tasks in chronological order.
New text entries in a journal view are converted into timestamped notes. When the user enters specially formatted links (view links) in a note, Journal will convert those view links into tags assignment. The links point to pages (tag views) that merge the text content of notes within the same tags. For entry of new view link, the script will create a new tag and a new tag view. User can surf among the links of journal views and tag views effortlessly.
What a tag view does: A tag view is a page that keeps track of the components and contents of files under a tag, and allows user to edit each file [almost]directly within the view. Existing tags in a database are integrated into the system of Journal automatically.
While writing a note, the user can type the view link of an existing tag to review their previous notes instantly. The user can also type a new view link to start collecting notes under a new tag. By integrating writing, review, and tagging into a single process, less time is spent on searching for keywords or setting up smart rules. Furthermore, the user can begin the review from a tag view of interests and surf among other view links in the tag view to explore the connections of their previous knowledge.
To really understand what Journal can achieve, you will need to: (1) be comfortable with the markdown editing environment of DT; (2) know briefly about Roam Research (a rather good overview series here); (3) know briefly about what Mergeview and MVOutline scripts do.
DEMO 1: Setting up a journal of personal investment in a new database**
During the first time set up, the script will ask the user for a few preferences and will create two folders in the database: âJournal resourcesâ and âJournal Notesâ.
The main elements of a journal view (the tag view has the same elements)
- Journal view: There are three journal views: Month Journal, Year Journal, and Full Journal. Month Journal shows the notes for the current month. Year Journal shows the view link of twelve calendar months. Full Journal shows the view links of all calendar years and months. For example, clicking on [[tt2020]] in a Full Journal (the lower-right window in the image below) will bring the user to a tag view that shows all notes in 2020. I will explain about what is [[ttSomeName]] later.
- Text Commands: Text command is like a menu system. Journal will perform a specific action when the user selects a text command and invoke the script. There are now seven text commands in journal view and tag view in version v1b16.
- Text entry area: Any texts that are entered within the delimiters [[]] are converted into a single journal note after the script is invoked. The user can create multiple notes using multiple sets of [[]]. Notes that are created in Journal use timestamp as the name. But any files in the database can be added to the journal view.
- Info bar: A info bar that shows the refresh time of the view, number of notes in the view, and which database is Journal running upon. Each database has its own Journal.
First note entry in the investment and personal diary
My first note to create is the earnings reporting of Apple. In this example, I enter four view links in the text: [[ttAAPL]], [[ttEarnings Reports]], [[tt2020-07-28]], and [[tt2020-10-29]]. There are no existing tags and tag views in the database at the time of entry, but the script will take care of it.
What is view link? Typing a new view link [[ttAAPL]] means that I want to create and assign a tag of âAAPLâ to the note, and create a tag view âttAAPLâ to merge the text context of all notes under the tag âAAPLâ now and in future.
Journal will create tag views for existing tags in a database at the time of set up. For example, if âEarnings Reportâ is an existing tag, typing the view link of [[ttEarnings Report]] means that I want the assign the existing tag of âEarnings Reportâ to the note, and use [[ttEarnings Report]] to link to the tag view of âEarnings Reportâ.
Four things happened after the note is typed within [[[ ]]] and the script is invoked.
- The text entry becomes a note, is saved under âJournal Notesâ, and has a timestamp of 20200701.1931.4555 as the name. The user can click on the name in the view to edit the note directly (see how MergeView works).
- and 3. View links are converted into tags. New tags are created under âNew Tagsâ. The date tags are converted into hierarchical date-tags. E.g. The script creates the tags of 2020, 2020-07, and 2020-07-28 for [[tt2020-07-28]].
- Tag views are created corresponding to the newly created tags under âTag viewsâ.
Note: An existing note or file can be added to the journal view by adding a hierarchical date-tag. The user can assign a date-tag to a note/file by invoking the script while it is in the active window, or type a view link of date in the note.
What is tag view: Tag view is almost the same as journal view except for two differences: First, notes are automatically in a tag view when they have the same tag, but notes are in journal view only when they have a date tag. Second, a new note created in journal view will be given a today date tag as default, a new note created in tag view will be given the tag of the tag view.
The user can create multiple notes at once in journal view and tag view. In this example below, two new notes are created at the same time.
For user who prefers to use render view (like me), there is a way to create new notes without using the source view.
Select the text command âEditPaneâ and invoke the script, a markdown file will be shown. The user can create multiple new notes within the EditPane file. Notes will be created after invoking the script. All notes that are created in the EditPane file will be given a date-tag of today.
Summary: The relational notes system of journal views and tag views.
How to surf to tag views that donât show their links in the current view.
Select the text command âTagViewâ and invoke the script. User can select and open one or multiple tag views from the list. The tag views will be refreshed when they are opened.
If the user has a long list of tag views, the list can be filtered by using the â1.Set/Reset list filerâ to enter multiple partial search strings.
Clean View: A reading-focused view of tag view and journal view.
Each note in the tag view and journal view always have its name-link and a list of view links at the bottom of the noteâs section. Those are the links to facilitate surfing among views. But the user can also switch to a more condensed view by selecting the text command [CleanView] and invoke the script. In the long run, if the user always use type-in view links for tagging, the clean view is the way to go for.
DEMO 2: How I surf from one concept/topic to another by using tagview in a current database:
The user doesnât need journal view to take advantage of the relational note system of Journal. Existing notes and literature with tags are embedded in Journal.
With Journal, I can now surf from one tag view to another to explore the connection of my previous notes and reference articles to the one I am writing, or to the different hubs of ideas.
How to write, review previous notes, and create a new collection of an idea in one step.
The user can type in a link of exisiting tag view and click on the link to recall the merged content of their previous notes instantly. While reviewing those contents, the user can add new thoughts to the old notes within the tag view by clicking on the name of the note to start editing it.
The user can continue to add existing links of views or create new view link for new ideas while writing a note. The flow of writing, review of ideas, and the creation of new ideas are integrated into the process of writing.
Text command â[[â.
- When the user selects the double brackets and invoke the script in a markdown or rich text file, the list of tag views will pop up. When the user selects one/more tags from the list, the view links will be pasted into the note.
- The matching of [[ in Journal uses case-insensitive wildcard matching. Which means that the search letters doesnât have to match from the beginning of the tags name.
Note: Even If the user has forgotten to type a view link to create new tags and has instead created new tags by the standard DT ways, as long as the user invokes the script while in the note the script will scan and create the new tag views for the newly created tags.