个人知识库的模式 - baddate/trilium GitHub Wiki
此页面包含一些用于组织知识库中信息的模式的描述。这旨在给人们一些启发,说明他们通常如何以及在Trilium Notes中特别是如何创建和构建其知识库。它还为某些设计决策提供了背景和依据。
元模式
只需清楚一点,元模式就是"模式的模式",即以其他模式出现的模式。
信息分层组织
基本元模式是将笔记(信息单元)按层次结构进行排序-我有一些代表粗粒度的组织"顶级"笔记,然后将这些拆分成定义更细粒度组织的子笔记,依此类推。我认为这种层次结构(树)组织对于组织大量信息非常有效。在这方面,许多笔记软件(例如Evernote)有着令人沮丧的限制,这限制了软件对大量笔记的可伸缩性。
可扩展性
重要的是,在构想以下(元)模式时,一定要了解我们正在讨论的数据量。
根据我估算个人知识库大小的经验法则,您每天可以合理地制作大约10个笔记,即一年3650个。我计划长期使用我的知识库(无论是否使用Trilium Notes),可能需要数十年,以便您轻松达到10万甚至更多。现在,我的个人知识库大约有10000个笔记。
100,000是大多数笔记软件无法很好地扩展的一个数字(在性能和用户界面方面)。但我不认为这真的是在考虑一辈子的知识。
惰性层级
我创建层次结构的方法很懒惰-我不是先创建结构,然后再用笔记填充它,而是为某个特定主题创建单个笔记,然后开始使用该笔记。内容开始增长后,我将看到如何拆分某些部分,然后将它们移到单独的子笔记中。举例来说,我对指环王的书评:
- 书评
- 指环王
该笔记包含基本的书籍信息(作者,出版商等),带有注解的书籍重点,然后是整体评论。现在事实证明,书中的要点太多了,总体审查时间也很长,因此我想将结构更改为以下内容:
- 书评
- 指环王 (仍包含基本信息)
- 强调
- 评论
- 指环王 (仍包含基本信息)
如果我使用存储在文件系统中的标准文本文件,我很快就会遇到一个烦人的问题,为了将"亮点"和"评论"分为子笔记,我还必须将指环王从文本文件转换为目录并进行分割将笔记的所有部分都分成子笔记。相反,Trilium将所有笔记都视为相等-叶子笔记和内部笔记都可以同时具有文本内容,这使我可以仅对需要它的内容进行子结构化。
将笔记排序到层次结构中的多个位置
在将笔记组织到层次结构中时,您很快就会陷入困境–您的笔记似乎平等地属于层次结构中的两个位置。例如,您要记录一下bash,它属于"OS / Linux"还是"编程/脚本语言"?这实际上是由基本树层次结构的限制所压制的错误二分法-答案当然是它_属于两者_。这就是为什么Trilium不使用标准树结构(要求每个笔记具有一个父对象)而是使用允许每个笔记具有多个父对象的扩展版结构的原因,从而有效地允许它出现在层次结构的多个位置。由于缺乏更好的术语,我称之为"克隆"。这个词的主要问题是,它暗示每个克隆都必须有一个源头,但是这里所有的克隆都是完全相等的-实际上没有源头。
在技术术语中,将其描述为硬链接可能会更好,但有一个重要的区别,那就是可以硬链接(克隆)目录(内部笔记)。
隐私笔记
我会让Trilium Notes一直打开。有时候我去洗手间时忘记锁定计算机。有时候我会让朋友或家人在没有监督的情况下用一儿会计算机。他们可能单击(运行)Trilium,而无意间看到了一个我真的不想让任何人看到的笔记(个人日记,凭据)。为此,Trilium具有"隐私笔记"的概念-隐私笔记会被加密,并且最重要的是,用户需要每5分钟输入一次密码,以确保此类笔记只能在短时间内处于可读状态 。使用普通(不受保护的)笔记不需要密码,因此在不需要时不会受到额外安全性的困扰。
归档笔记
笔记可能会随着时间的流逝而失去意义-假设我换了工作-所有针对前雇主的笔记都会立即失去其大部分来源。但是,这并不意味着我要删除这些笔记-通常来说,我只是希望它们以某种方式取消优先级-在Trilium中,我可以通过为公司根目录笔记分配一个[继承]] [[标签]] archived
来做到这一点。该标签的主要作用是从搜索结果中过滤掉了该子树中的所有笔记(通过笔记自动完成功能快速搜索是我的主要[导航方法)。除此之外,我通常还将这些过时的笔记移到层次结构中不太重要的位置。
我也将归档功能用于与创建时不太相关的笔记 - 一个示例可能会自动导入reddit评论。
有时,相关和不相关的笔记之间没有明确的类别划分,在这种情况下,我只创建带有archived
标签的"O_LD_ "笔记并将所有不相关的笔记移到那里。因此,我的凭据(credentials)笔记可能看起来像这样:
Credentials
- Personal
- OLD (包含一堆带有我不再使用的服务凭证的笔记)
- Gmail
- Github
- ...
模式
日志
每天都有包含或引用与给定日期相关的所有内容的笔记,结构如下:
- 2018
- 11 - November
- 26 - Monday
- 27 - Tuesday
- subnote 1
日志可同时用作工作区和笔记收件箱(Inbox) - 当我没有时间考虑适当的放置位置时,它是创建笔记的默认位置。一天结束时,我通常会查看我的日志,并将其克隆到层次结构中的适当位置。
Trilium部分内置了这种模式 - Trilium可以理解并可以半自动(通过API调用)创建Year / Month / Day结构。还有全局键盘快捷键CTRL-ALT-P
,它将在日志中创建新笔记。
我将在此日志下保留哪些笔记?
- 给定日期的待办事项列表(可以自动执行-请参阅任务管理器)
- 个人日记
- 我在这一天中创建的笔记的克隆(代表我一直在从事的工作)。
- 我经常克隆某些我正在做的项目指定日期的笔记(或子树)
- 我有一些脚本可以跟踪某些日常指标(例如体重)。它们被保存到一个日常的"数据笔记"中(实际上是JSON代码笔记)。
- 我还有其他脚本可以帮助我可视化这些数据(请参见体重追踪器示例)
- 我有一个脚本,可以自动将所有评论从reddit导入日志。
- 人们有时想知道为什么。答案是,我通常会在评论中投入一些精力和思想,这就是为什么我觉得值得保留,特别是如果可以自动完成。
对于大多数笔记,该日志的放置是_次要_的,它们的主要位置在其他地方(例如,对于我一直在进行的书评,它是书/评论,而不是日志)。因此,要使此模式有效,将笔记克隆到多个位置的功能非常重要。
项目
项目是肯定一目了然的(self explanatory),特别是对我而言这意味着持续时间很长(多年)- 例如Trilium Notes或大学学习等项目。考虑到它们的寿命,项目可能很大而且很深,但是它们的结构是非常特定于领域的,我看不到任何常见的模式。显而易见,它们通常与知识库的其他部分广泛关联 - 例如,大学凭据是从"凭据/大学"顶层笔记中克隆的,而与Trilium相关的博客文章位于"博客 / [博客名称] / Trilium"中。
史诗(Epics)与项目相同,但范围不同 - 它们通常长达数月之久,因此通常被放入年鉴中(例如2018 / Epics)。史诗通常具有工作性质(也被复制到工作记录中)和个人性质(例如,目前我有搬到另一个城市的大史诗)。
我没有短期项目(通常为期数天),但是继续讲Scrum的类似,我可以称它们为故事。它们通常直接放置在日志中,并手动从一天移动到另一天(或放置在一个月笔记中,例如2018 / 11 - November)。
凭据
我将所有凭据保存在知识库中,它们分为以下几类:与工作相关的,与项目相关的,每个国家/地区的个人等。这些笔记当然受到保护,并且经常被克隆到其他地方(例如,将项目凭据克隆到项目本身中) )。与诸如KeePass之类的传统工具相比,这是一个非常重要的优势-所有相关信息都集中在一个地方而不会影响安全性。
人物个人资料
对于某些人来说,这似乎令人毛骨悚然,但我对大多数人都保留了一份简介。它包含非常标准的内容,例如出生日期,联系方式,地址,还包括当前和以前的工作,他们的爱好和世界观,有时甚至是重要的(IM / mail / meatspace)会话。几乎所有我认为值得注意的东西。与人见面之前,它有助于刷新一些基本信息,尤其是如果你们有一段时间没有联系时。例如,第十次询问他们在哪里工作变得很尴尬,因为您一直忘记。
自然,我有很多(扩充的)家庭成员,朋友,熟人等,因此我需要某种方式对它们进行排序。我的主要方法是按社交圈(工作,高中,体育俱乐部等)对他们进行分类,有时还按他们的居住城市分类。家族_圈子_仍然太大,因此进一步的组织是由_氏族_组成的(例如在"Smiths"中)。有些人是几个这样的圈子里的成员,因此他们只是被克隆到多个地方。
特别是对于家庭而言,创建关系图以可视化关系非常有用:
图书
当然,我保留标准的"To read"列表。我还会保留一个已读的书的记录 - 通常,一本书有一个子树,其根目录具有一些基本信息,例如作者,页数,出版日期,开始日期,完成日期(以升级标签的形式)。我还写了一份(私人的)评论,并保留了Kindle的重点列表,可以选择添加一些笔记,这些笔记通常存储在子笔记中(除非它们很短)。
为了使书籍清单易于管理,我每年(阅读他们)对它们进行排序,这也使我对给定年份的"阅读能力"有一些基本的了解。我计划创建一个脚本,该脚本将显示一些时间线图表以可视化书籍属性dateStarted
- dateFinished
以更好地查看我的阅读冲刺和趋势。
一些特定的作者也有自己的笔记,其中包含克隆的书评,采访链接和其他相关资源。
我对电影和电视节目上有类似的系统,但没有那么复杂。
个人日记
这是一个反思事件,经历,新发现等的地方。这可以帮助您更深刻地了解自己的内在自我,理清思路并做出更好的决定。
我将个人日记笔记直接分类为_日志_(如上所述),但也可以克隆为"行程笔记"(如果日志是关于给定行程的)或个人简介(如果此人在日记中扮演角色)。我的所有日记受到保护因为他们通常都很敏感。
文件资料
我将所有个人文件(身份证,护照,教育证书...)扫描到知识库中。它们在每台PC上都是同步的,从而提供了不错的备份,并使其可在任何地方使用。
与将它们保存在Dropbox或Google Drive中相比,其优势在于它们没有存储在某些第三方服务器上,并且可以被加密(受保护)。
库存
库存中包含我重要物品的文件和其他相关输物商品 - 例如,对于汽车,您可以保留登记卡,维修记录,相关费用等。我还保留一些对我个人重要的物品的库存 - 主要是计算机,电话,相机和类似电子产品。这有时可能是实用的,但也提供了感性的价值。
主题知识库
我在这里存储硬"知识" - 总结了不同领域的主题和发现。主题范围从传统科学 - 物理,历史,经济到哲学,心理模型,应用程序(关于我使用的特定应用程序的笔记)等。当然,这是非常主观的 - 鉴于我的所作所为,与我的编程子树相比,我的物理子树相当稀疏。
工作知识库
我通常会为我目前工作的公司保留一个顶层笔记树(过去的工作已转移到其他地方)。我跟踪公司的基本组织(部门,业务部门),谁是谁(关系图)对可视化再次有用),我从事的项目等。
我需要使用各种公司服务凭证。公司通常有很多复杂的流程和工具。我记录会议记录,并链接到公司Wiki(通常很难找到相关信息)。总的来说,我需要了解很多公司特定的信息,或者需要以我能理解的良好结构来使用它们。通常,它只是将现有信息的复制粘贴和重组成对我来说更容易理解的内容。
从我的经验来看,保持这一点使我变得更有生产力,而且更重要的是极大地减少了挫折感和压力。
结论
我可能会继续讲更多的模式(例如学习笔记,旅行),但我想你明白了。无论您的生活中有什么重要的事情,记录和跟踪它都可能是有意义的。
=================================
This page contains description of some of the patterns I use to organize information in my knowledge base. This is meant to give some inspiration of how one might create and structure their knowledge base in general and also specifically in Trilium Notes. It also gives some background and justification for some of the design decisions.
Meta patterns
Just to be clear, meta patterns are "patterns of patterns", i.e. patterns appearing in other patterns.
Hierarchical organization of information
Basic meta pattern is that I sort notes (units of information) into a hierarchy - I have some "top level" notes which represent coarse grained organization, these then split into sub-notes defining finer grained organization and so on. I consider this hierarchical (tree) organization very efficient for organization of large amounts of information. A lot of note taking software (such as Evernote) are frustratingly limited in this regard which limits scalability of the software to large amounts of notes.
Scalability
It's important to frame the following (meta) patterns with some idea of how large amount of data are we talking about.
My rule of thumb for estimation of size of personal knowledge base is that you can reasonably produce around 10 notes a day, which is 3650 in a year. I plan to use my knowledge base long term (with or without Trilium Notes), probably decades so you can easily get to number 100 000 or even more. Right now, my personal knowledge base has around 10 000 notes.
100 000 is a number to which most note taking software doesn't scale well (in both performance and UI). Yet I don't think it's really very much considering a lifetime of knowledge.
Lazy hierarchy
My approach to creating the hierarchy is being lazy - I don't create the structure first and then fill it with notes, instead I create single note for some specific topic and start using this one note. Once the content starts to grow and I see how some parts could be split out, I move them out into separate sub notes. As an example I have a book review for The Fellowship of the Ring:
- Book reviews
- The Fellowship of the Ring
The note contains basic book info (author, publisher etc.), book highlights with the comments and then overall review. Now it turns out there's far too many book highlights and overall review is also rather long so I want to change the structure to the following:
- Book reviews
- The Fellowship of the Ring (still contains basic info)
- Highlights
- Review
- The Fellowship of the Ring (still contains basic info)
If I used standard text file stored in a filesystem I would soon run into an annoying problem that in order to split out the Highlights and Review into sub-notes I would also have to convert The Fellowship of the Ring from text file into directory and split out all sections of the note into sub-notes. Instead, Trilium treats all notes as equal - both leaf notes and inner notes can have both text content which allows me to sub-structure only content which needs it.
Sorting notes into multiple places in the hierarchy
While organizing the notes into the hierarchy, you very quickly run into a dilemma - your note seem to belong to two places in the hierarchy equally. As an example - you want to make a note about bash - does it belong to "OS / Linux" or "Programming / Scripting languages"? This is actually a false dichotomy forced down by the limits of the basic tree hierarchy - the answer is of course it belongs to both. This is the reason why Trilium doesn't use standard tree structure (which requires every note to have exactly one parent), but an extension which allows every note to have several parents, thus effectively allowing it to appear in multiple places in the hierarchy. For lack of better term I call this "cloning". The main problem with this term is that it suggests that each clone must have an original, but here all clones are completely equal - effectively there's no original.
In tech lingo, it might be better to describe it as a hard link with an important difference that it is possible to hard link (clone) a directory (inner note).
Protected notes
I have Trilium Notes opened non-stop. Sometimes I forget to lock my computer when going to the bathroom. Sometimes I let a friend or family member to use my computer for a minute without supervision. They might click on (running) Trilium and inadvertently see a note I really don't want anybody to see (personal diary, credentials). To cover this, Trilium has a concept of "protected notes" - protected note is encrypted and on top of that requires the user to enter the password every 5 minutes which guarantees that such note can be in a readable state only for small amount of time. Working with ordinary (not protected) notes don't require password so you're not bothered by extra security when it's not needed.
Archiving notes
Notes can lose relevancy with time - let's say I switch jobs - all the notes specific to the former employer immediately lose most of its import. This doesn't mean I want to delete these notes though - typically I just want them to somehow deprioritize - in Trilium I would do that by assigning an inherited label archived
to the company root note. The main effect of this label is that all the notes from this sub-tree are filtered out from search results (fast search via note autocomplete is my main navigation approach). Apart from this, I also typically move such outdated notes to some less prominent place in the hierarchy.
I use archivation also for notes which are not very relevant from their creation - an example might be automatically imported reddit comments.
Sometimes there's no clear category split between relevant and non-relevant notes, in that case I just create "OLD" note with archived
label and move all irrelevant notes there. So my credentials note might look something like this:
- Credentials
- Personal
- OLD (contains bunch of notes with credentials for services I don't use anymore)
- Gmail
- Github
- ...
- Personal
Patterns
Day note
Every day has its note which contains or references everything related to the given day. Structure looks like this:
- 2018
- 11 - November
- 26 - Monday
- 27 - Tuesday
- subnote 1
- 11 - November
Day note serves as a workspace and note inbox at the same time - it's the default location to create a note when I don't have time to think about proper placement. At the end of the day I typically review my day note and clone the notes into suitable locations in the hierarchy.
Trilium has this pattern partly built-in - Trilium understands and can create this Year / Month / Day structure semi-automatically (on API call). There's also global keyboard shortcut CTRL-ALT-P
which will create new note in the day note.
What notes do I keep under this day note?
- TODO list for given day (this can be automated - see Task Manager)
- Personal diary
- clones of notes I created during this day (which kind of represents what I've been working on).
- I often clone notes (or sub-trees) of e.g. projects I'm working on at given day so they are at hand
- I have some scripts which allow me to track certain daily metrics (like weight). These are saved into one daily "data note" (actually JSON code note).
- I have other scripts which then help me to visualize these data (see a Weight Tracker example)
- I have a script which automatically imports all my comments from reddit into the day note.
- People are sometimes wondering why. The answer is that I usually put some effort and thought into a comment and that's why I feel it's worth preserving, especially if it can be done automatically.
For most notes, this day note placement is secondary and their primary location is somewhere else (e.g. for a book review I've been working on it's Book / Reviews, not the day note). So for this pattern to work, ability to clone notes into multiple places is pretty fundamental.
Projects
Project is pretty self explanatory, for me specifically it also means being long term (years) - an example of a project might be Trilium Notes or university studies. Given their longevity, projects can be large and deep, but their structure is very domain specific and I don't see any common patterns. What's pretty clear is they are often widely interconnected with other parts of the knowledge base - e.g. university credentials are cloned from "Credentials / University" top level notes and Trilium related blog posts are in "Blog / [Name of the blog] / Trilium".
Epics are the same thing as projects, but differ in scope - they are typically several months long and as such are usually placed into a year note (e.g. 2018 / Epics). Epics are often of work nature (also cloned into work note) and personal (e.g. currently I have large epic for moving to a different city).
I don't have a term for short term projects (typically several days long), but continuing the scrum analogy I might call them story. These are often placed directly into day notes and manually moved from one day to another (or place into a month note, e.g. 2018 / 11 - November).
Credentials
I keep all my credentials in the knowledge base, they are sorted into categories - work related, project related, personal per country etc. These notes are of course protected and are often cloned into other places (e.g. project credentials are cloned into the project itself). This is a pretty important advantage compared to traditional tools like KeePass - all the relevant information is centralized into one place without compromising security.
People profiles
This might seem creepy to some, but I keep a profile on most people. It contains pretty standard things like date of birth, contacts, address, but also current and previous employments, their hobbies and worldviews and sometimes even important (IM/mail/meatspace) conversations. Just about everything I find notable. It helps to refresh some basic info before meeting people, especially if you haven't been in touch in a while. It gets pretty awkward to ask for the tenth time where do they work for example, because you keep forgetting it.
Naturally I have a lot of (extended) family members, friends, acquaintances etc. so I need some way to sort them. My main method is to sort them by social circle (work, high school, sports club etc.), sometimes also by their town of residence. Family circle is still too large so the further organization is by clan (as in "Smiths"). Some people are members of several such circles so they are just cloned into multiple places.
For family specifically it's pretty useful to create relation map to visualize relationships:
Books
Of course I keep standard "To read" list. I also keep a record on the books I've read - typically one book has one subtree where the root has some basic info like author, page count, publication date, date started, date finished (in the form of promoted labels). I also write a (private) review and keep list of highlights from Kindle, optionally with some commentary, these are usually stored in sub notes (unless they are pretty short).
To keep the list of books manageable, I sort them per year (of reading them), this also gives me some basic overview of "reading performance" for given year. I plan to create a script which would show some timeline chart visualizing book attributes dateStarted
- dateFinished
to have nicer view of my reading sprints and trends.
Some specific authors also have their own note which contains cloned book reviews, links to interviews and other related resources.
I have similar system for movies and TV shows, but not as sophisticated.
Personal diary
This is a place to reflect on events, experiences, new findings etc. This can help you get deeper understanding of your inner self, clarify your thinking and make better decisions as a result.
I sort personal diary notes directly under day note (explained above), but it can be cloned also to e.g. "trip note" (if the diary note is about given trip) or to person's profile (if the person plays a role in the diary note). All my diary notes are protected since they are usually pretty sensitive.
Documents
I keep all my personal documents (ID, passport, education certificates ...) scanned in the knowledge base. They are synchronized across every PC which provides decent backup and makes them available everywhere.
Advantage compared to e.g. keeping them in Dropbox or Google Drive is that they are not stored on some 3rd party server and they can be encrypted (protected).
Inventory
Inventory contains documents and other relevant importation for my important belongings - e.g. for car you can keep the registration card, maintenance record, related costs etc. I also keep inventory for some items personally important to me - mainly computers, phones, cameras and similar electronics. This can be practical at times but also provides sentimental value.
Topic knowledge base
This where I store hard "knowledge" - summarized topics and findings from different domains. Topics can range from traditional sciences - physics, history, economy to philosophy, mental models, apps (notes about specific apps I use) etc. Of course this is very subjective - given what I do, my Physics sub-tree is pretty sparse compared to my Programming sub-tree.
Work knowledge base
I usually keep top level note for the company I currently work at (past jobs are moved elsewhere). I track basic organization of the company (divisions, business units), who is who (relation maps) are again useful for visualization), projects I work at etc.
There's a number of credentials to various company services I need to use. Companies usually have a bunch of complex processes and tools. I record meeting minutes, link to the company wiki (which is usually difficult to find relevant info). In general there's a lot of company specific information I need to know or need have them at hand in a nice structure I can understand. Often it's just copy pasting and reshuffling of existing information into something more understandable for me.
From my experience, keeping this makes me more productive and even more importantly dramatically reduces frustration and stress.
Conclusion
I could probably go on with more patterns (e.g. study notes, travelling), but I think you get the idea. Whatever is important in your life, it probably makes sense to document and track it.