kunpeng9 / GTD2020-05-31

2020-05-31创建【将github的项目链接等放入滴答清单进行管理或者印象笔记等,实践证明都不可行,不好用,完全被搁置了】
The Unlicense
26 stars 5 forks source link

logseq/logseq: A privacy-first, open-source platform for knowledge sharing and management. #84

Closed kunpeng9 closed 11 months ago

kunpeng9 commented 3 years ago

Logseq

A local-first, non-linear, outliner notebook for organizing and sharing your personal knowledge base.

本地优先,非线性,外线笔记本组织和分享您的个人知识库。

Use it to organize your todo list, to write your journals, or to record your unique life.

用它来整理你的任务清单,写日记,或者记录你独特的生活。

Why Logseq? 为什么是 Logseq?

Logseq is an open-source platform for knowledge sharing and management. It focuses on privacy, longevity, and user control.

Logseq 是一个用于知识共享和管理的开源平台,它关注于隐私、寿命和用户控制。

The server will never store or analyze your private notes. Your data are plain text files and we currently support both Markdown and Emacs Org mode (more to be added soon).

服务器将永远不会存储或分析您的私人笔记。您的数据是纯文本文件,我们目前支持 Markdown 和 Emacs Org 模式 (很快将添加更多内容)。

In the unlikely event that the website is down or cannot be maintained, your data is, and will always be yours.

万一网站出现故障或无法维护,你的数据现在是,而且将永远是你的。

How can I use it? 我怎样使用它?

  1. Make sure you have registered a GitHub account and already created a repository (could be an old one). Currently we only support GitHub, but more sync options (e.g. Gitlab, Dropbox, Google Drive, WebDAV, etc.) will be added soon.

    确保您已经注册了一个 GitHub 帐户并且已经创建了一个仓库 (可能是一个旧的仓库)。目前我们只支持 GitHub,但是更多的同步选项(例如 Gitlab,Dropbox,Google Drive,WebDAV 等等) 很快就会加入。

  2. Visit our website https://logseq.com/.

    访问我们的网站 https://logseq.com/。

  3. Click the "Login with GitHub" button in the upper-right corner.

    点击右上角的 “Login with GitHub” 按钮。

  4. Following the on-screen instructions, install Logseq app on your selected repository.

    按照屏幕上的说明,在选定的存储库上安装 Logseq 应用程序。

  5. Start writing and have fun!

    开始写作,享受快乐!

Credits 学分

Logseq is hugely inspired by Roam Research, Org Mode, Tiddlywiki, Workflowy and Cuekeeper, hats off to all of them!

是受到 Roam Research,Org Mode,Tiddlywiki,Workflowy 和 Cuekeeper 的巨大启发,向他们致敬!

Logseq is also made possible by the following projects:

下列项目也使 Logseq 成为可能:

Learn more 了解更多

The following is for developers and designers who want to build and run Logseq locally and contribute to this project.

下面的内容适用于希望在本地构建和运行 Logseq 并为此项目做出贡献的开发人员和设计人员。

Set up development environment 建立开发环境

If you are on Windows, use the Windows setup below.

如果你使用的是 Windows 系统,请使用下面的 Windows 设置。

1. Requirements 1. 需求

2. Create a GitHub app 2. 创建一个 GitHub 应用

Follow the guide at https://docs.github.com/en/free-pro-team@latest/developers/apps/creating-a-github-app, where the user authorization "Callback URL" should be http://localhost:3000/auth/github.

按照 https://docs.github.com/en/free-pro-team@latest/developers/apps/creating-a-github-app 的指南,用户授权的‘ Callback URL’应该是‘ http://localhost:3000/auth/github’。

Remember to download the private-key.pem which will be used for the next step. Also take note of your App ID, Client ID, and your newly generated Client Secret for use in step 4.

记得下载私钥。这将被用于下一步。还要注意应用程序 ID、客户端 ID 和新生成的客户端机密,以便在步骤 4 中使用。

Add contents permission:

添加内容权限:

3. Set up PostgreSQL 3. 设置 PostgreSQL

Make sure you have PostgreSQL running. You can check if it's running with pg_ctl -D /usr/local/var/postgres status and use pg_ctl -D /usr/local/var/postgres start to start it up. You'll also need to make a Logseq DB in PostgreSQL. Do that with createdb logseq.

确保你有 PostgreSQL 运行。您可以检查它是否以 pg ctl-d/usr/local/var/postgres 状态运行,并使用 pg ctl-d/usr/local/var/postgres 启动它。您还需要在 PostgreSQL 中创建 logseqdb。使用 createdblogseq 实现这一点。

4. Add environment variables 4. 添加环境变量

export ENVIRONMENT="dev"
export JWT_SECRET="xxxxxxxxxxxxxxxxxxxx"
export COOKIE_SECRET="xxxxxxxxxxxxxxxxxxxx"
export DATABASE_URL="postgres://localhost:5432/logseq"
export GITHUB_APP2_NAME="logseq-test-your-username-app"
export GITHUB_APP2_ID="your id"
export GITHUB_APP2_KEY="xxxxxxxxxxxxxxxxxxxx" #Your Github App's Client ID
export GITHUB_APP2_SECRET="xxxxxxxxxxxxxxxxxxxx"
# Replace your-code-directory and your-app.private-key.pem with yours
export GITHUB_APP_PEM="/your-code-directory/your-app.private-key.pem"
export LOG_PATH="/tmp/logseq"
export PG_USERNAME="xxx"
export PG_PASSWORD="xxx"

5. Compile to JavaScript 5. 编译到 JavaScript

git clone https://github.com/logseq/logseq
yarn
yarn watch

6. Start the Clojure server 6. 启动 Clojure 服务器

  1. Download jar

    下载 jar

    Go to https://github.com/logseq/logseq/releases, download the logseq.jar and put it in the logseq directory.

    进入 https://github.com/logseq/logseq/releases ,下载 logseq.jar 并将其放入 logseq 目录。

  2. Run jar

    跑罐子

    java -Duser.timezone=UTC -jar logseq.jar

7. Open the browser 7. 打开浏览器

Open http://localhost:3000.

打开 http://localhost:3000。

Windows setup 安装 Windows

1. Required software 1. 必需软件

Install Clojure through scoop-clojure: https://github.com/littleli/scoop-clojure. You can also install Node.js, Yarn and PostgreSQL through scoop if you want to.

通过 scoop-Clojure: https://github.com/littleli/scoop-Clojure 安装 Clojure,如果你愿意,也可以通过 scoop 安装 Node.js、 Yarn 和 PostgreSQL。

2. Create a GitHub app 2. 创建一个 GitHub 应用

Follow Step 2 above if you want Logseq to connect to GitHub. If not, skip this section. The GITHUB_APP_PEM variable in the run-windows.bat needs to be set with the correct directory for your system.

如果你想让 Logseq 连接到 GitHub,请按照上面的步骤 2 操作。如果没有,请跳过这一部分。需要使用系统的正确目录来设置 run-windows.bat 中的 GITHUB app pem 变量。

3. Set up PostgreSQL 3. 设置 PostgreSQL

Make sure you have PostgreSQL running. You can check if it's running with pg_ctl status and use pg_ctl start to start it up. You'll also need to make a Logseq DB in PostgreSQL. Do that with createdb logseq.

确保你有 PostgreSQL 运行。你可以检查它是否运行 pg ctl 状态和使用 pg ctl 启动它。您还需要在 PostgreSQL 中创建 logseqdb。使用 createdblogseq 实现这一点。

4. Download the Clojure server 4. 下载 Clojure 服务器

Go to https://github.com/logseq/logseq/releases, download the logseq.jar and move into the root directory of repo.

进入 https://github.com/logseq/logseq/releases ,下载 logseq.jar 并进入 repo 的根目录。

5. Start Logseq 5. 启动 Logseq

Run start-windows.bat which is located in the repo. This will open a second terminal that runs Logseq's backend server. To completely stop Logseq, you'll need to also close that second terminal that was opened.

运行位于回购中的 start-windows.bat。这将打开运行 Logseq 后端服务器的第二个终端。要完全停止 Logseq,还需要关闭打开的第二个终端。

start-windows.bat will try to start PostgreSQL for you if it's not already started.

如果还没有启动,bat 会尝试启动 PostgreSQL。

Build errors 建立错误

1. The required namespace 1. 必需的名称空间devtools.preload is not available. 无法使用

Upload your clojure to at least version 1.10.1.739.

上传你的 clojure 到至少版本 1.10.1.739。 https://github.com/logseq/logseq