Journal

On Personal Knowledge Management

2012·03·16

Machine-translated from Chinese.  ·  Read original

Human Brain’s Memory Limitations

The human brain’s memory capacity is limited. I often encounter many problems while tinkering with computers, and after solving them, I forget about them. However, when I encounter the same problem again, I have to seek help from Google, which wastes a lot of time. Many online knowledge and skills are not worth spending time memorizing. Building a knowledge base to store these skills and knowledge is the best approach. On TL, everyone discussed various methods for establishing a personal knowledge management system. There is no one-size-fits-all solution; the best approach is the one that suits you the most. I have tried using bookmarks, self-built wiki sites, Evernote, Dropbox, and other tools to build a knowledge base, but I always feel that they are not convenient enough. After multiple attempts, I finally chose to use Zim wiki in combination with GitHub and Dropbox to establish my personal knowledge management system.

Zim Wiki

Zim wiki is a cross-platform personal wiki software. Its Linux version is very user-friendly, without the unnecessary features of Evernote, and it has fast startup speeds, making it suitable for saving text from web pages or terminals. It is the most suitable tool for simple personal knowledge management. However, Zim wiki lacks synchronization functionality, so I set up GitHub to add this feature. Since each entry in Zim wiki is a plain text document, I only need to set up Git in the corresponding directory of my Notebook and synchronize the content to GitHub. Then, I can implement automatic synchronization by writing a Bash script with git pull and git push commands.

# syncwiki.sh
cd ~/knowledge
git pull origin master
git add *
git commit -m "new"
git push origin master

Modified Zim Wiki

To make it more convenient, I modified the Zim program in /usr/bin by adding the following lines before sys.exit(1):

except KeyboardInterrupt:  # e.g. <ctrl>C while --server
    print >>sys.stderr, 'Interrupt'
    os.popen("sh ~/syncwiki.sh")
    sys.exit(1)

I saved the new program as zimm. Now, when I open Zim wiki using zimm, it will automatically synchronize with GitHub before closing. You can also set up a crontab to schedule synchronization.

Synchronization Across Different Systems

Using GitHub allows me to synchronize the wiki system across different Linux hosts. For synchronization between Linux and Windows systems, I chose Dropbox. The synchronization method is simple: I created a symbolic link to the Dropbox folder using the ln command and set Zim wiki to open the Dropbox folder on Windows. However, this method has some drawbacks, such as a few seconds of lag when opening Zim wiki on another system after modifying it, and potential conflicts when modifying the wiki on both systems simultaneously.

Alternative Synchronization Methods

Although there are some shortcomings, it is rare to work on both Linux and Windows systems simultaneously. As the saying goes, “if it works, it’s good enough.” Besides using GitHub, you can also use other online version control systems, such as Sina’s SAE, to synchronize your wiki. If you need to share your personal knowledge management system with others, you can use Zim wiki’s built-in HTTP server to share it as a web page. For long-term sharing, you can search for “zim wiki deploy” (author’s blog: blog, GitHub address: GitHub), which provides a script to convert Zim wiki to Dokuwiki.

Remote Synchronization

Alternatively, you can try using ssh -X to remotely start Zim wiki and achieve synchronization.

留 · 言