Pages

Friday, 31 January 2020

一个基于nodejs的记笔记的程序-Trilium Notes


Trilium Notes是一款开源的笔记应用程序,专注于建立大型个人知识库。支持树状笔记、笔记加密、全文搜索、自托管服务器,还可生成可视化笔记的关系图和链接图等。基于Javascript编写,遵守AGPL-3.0开源协议。

功能特色:

    笔记可整理成为树形结构,单个笔记可以放置到多个结构树中。
    富文本支持,包括表格,图片,markdown数据公式等
    支持编程代码高亮
    快速导航,全文搜索F
    无感的笔记历史版本记录
    笔记属性可用来组织,查询等功能
    同步笔记至自己的同步服务器
    共享/发布笔记至公共网络
    笔记加密功能,每个笔记可单独加密
    快速创建各种图表(笔记类型 “canvas”)
    笔记关系图谱
    支持脚本
    支持REST API自动化
    触控优化,支持手机,平板。
    暗夜主题模式Night theme
    支持Evernote和Markdown文件导入导出
    网页粘贴板

源码:https://github.com/zadam/trilium

------------------------------------------------

Build your personal knowledge base with Trilium Notes.

Join the chat at https://gitter.im/trilium-notes/Lobby 
Trilium Notes is a hierarchical note taking application with focus on building large personal knowledge bases.

Features

Builds

Trilium is provided as either desktop application (Linux and Windows) or web application hosted on your server (Linux). Mac OS desktop build is available, but it is unsupported.
  • If you want to use Trilium on the desktop, download binary release for your platform from latest release, unzip the package and run trilium executable.
  • If you want to install Trilium on server, follow this page.
    • Currently only recent Chrome and Firefox are supported (tested) browsers.

Documentation

You can also read Patterns of personal knowledge base to get some inspiration on how you might use Trilium.

Contribute

Use a browser based dev environment
Open in Gitpod
Or clone locally and run
npm install
npm run start-server

Shoutouts

  • CKEditor 5 - best WYSIWYG editor on the market, very interactive and listening team
  • FancyTree - very feature rich tree library without real competition. Trilium Notes would not be the same without it.
  • CodeMirror - code editor with support for huge amount of languages
  • jsPlumb - visual connectivity library without competition. Used in relation maps and link maps

---------------------------------------------------

Requirements

Trilium is a node.js application. Supported (tested) version of node.js is latest 14.X.X and 16.X.X. Trilium might work with older versions as well.

You can check your node version with this command (node.js needs to be installed):

node --version

If your Linux distribution has only an outdated version of node.js, you can take a look at the installation instruction on node.js website, which covers most popular distributions.

Dependencies

There are some dependencies required. You can see command for Debian and its derivatives (like Ubuntu) below:

sudo apt install libpng16-16 libpng-dev pkg-config autoconf libtool build-essential nasm libx11-dev libxkbfile-dev

Installation

Download

You can either download source code zip/tar from latest release or clone git repository from stable branch with

git clone -b stable https://github.com/zadam/trilium.git

Installation

cd trilium

# download all node dependencies
npm install

# make sure the better-sqlite3 binary is there
npm rebuild

Run

cd trilium

# using nohup to make sure trilium keeps running after user logs out
nohup TRILIUM_ENV=dev node src/www &

The application by default starts up on port 8080, so you can open your browser and navigate to http://localhost:8080 to access Trilium (replace "localhost" with your hostname).

TLS

Don't forget to configure TLS, which is required for secure usage!

from https://github.com/zadam/trilium/wiki/Manual-server-installation

------------------------------------------------------------------------------------

Desktop installation

If you want to use Trilium on the desktop, download binary release for your platform from latest release, unzip the package and run trilium executable.

Startup scripts

There are also some other options to start Trilium:

  • trilium-no-cert-check - Trilium will not validate the certificates, useful e.g. when you're syncing against a sync server with self-signed certificate
    • Alternatively you can set NODE_TLS_REJECT_UNAUTHORIZED=0 environment variable to the Trilium process.
  • trilium-portable - Trilium will try to create data directory in the trilium's directory
  • trilium-safe-mode - start up in "safe mode" which disables any startup scripts which might e.g. crash the application

Synchronization

If you are using a desktop instance and would like to sync with your server instance: Synchronization.

from  https://github.com/zadam/trilium/wiki/Desktop-installation