kunpeng9 / GTD2020-05-31

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

Zettlr/Zettlr: A Markdown Editor for the 21st century. #102

Closed kunpeng9 closed 11 months ago

kunpeng9 commented 3 years ago

Zettlr [ 齐特勒[ˈset·lər 设置 l r]

A Markdown Editor for the 21st century.

21 世纪的减价编辑。

Homepage | Download | Documentation | Discussion Forum | Contributing | Support Us

主页 | 下载 | 文档 | 讨论论坛 | 贡献 | 支持我们

With Zettlr, writing professional texts is easy and motivating: Whether you are a college student, a researcher, a journalist, or an author — Zettlr has the right tools for you. Watch the video or continue reading to see what they are!

有了 Zettlr,写专业的文章就很容易,也很有动力: 无论你是大学生、研究人员、记者还是作家,Zettlr 都有适合你的工具。观看视频或继续阅读,看看它们是什么!

Visit our Website.

访问我们的网站。

Features 功能

… and the best is: Zettlr is Open Source (FOSS)!

最好的是: Zettlr 是开源的!

Download 下载

To install Zettlr, just download the latest release for your operating system! Currently supported are macOS, Windows, and most Linux distributions (via Debian- and Fedora-packages as well as AppImages).

要安装 Zettlr,只需下载你的操作系统的最新版本!目前支持 macOS、 Windows 和大多数 Linux 发行版 (通过 Debian 和 fedora 包以及 AppImages)。

All other platforms that Electron supports are supported as well, but you will need to build the app yourself for this to work.

所有 Electron 支持的其他平台也都支持,但是你需要自己构建这个应用程序才能工作。

Please also consider becoming a patron or making a one-time donation!

也请考虑成为一个赞助人或做一次性捐赠!

Getting Started 开始

If you have downloaded Zettlr, head over to our website to get to know Zettlr. Refer to the Quick Start Guide, if you prefer to use software heads-on.

如果你已经下载了 Zettlr,请到我们的网站去了解 Zettlr。如果您喜欢直接使用软件,请参阅快速入门指南。

Contributing 贡献

Zettlr is an Electron-based app, so to start developing, you'll need to have:

Zettlr 是一个基于 electron 的应用程序,所以要开始开发,你需要:

  1. A NodeJS-stack installed on your computer. Make sure it's at least Node 12 ( - 堆栈安装在您的计算机上。请确保它至少是 Node 12(lts/erbium). To test what version you have, run )。要测试你所拥有的版本,请运行node -v.
  2. Yarn 纱线 installed. Yarn is the required package manager for the project, as we do not commit 纱线是该项目所需的包装管理器,因为我们不提交package-lock.json-files and many commands require yarn. You can install this globally using - 档案和许多命令需要纱线。你可以安装这个全球使用npm install -g yarn or Homebrew, if you are on macOS. 或者自制程序,如果你使用 macOS 的话

Then, simply clone the repository and install the dependencies on your local computer:

然后,简单地克隆存储库并安装本地计算机上的依赖项:

$ git clone https://github.com/Zettlr/Zettlr.git
$ cd Zettlr
$ yarn install

You can optionally add the --frozen-lockfile flag to ensure yarn will stick to the versions as listed in the yarn.lock and not attempt to update them.

您可以选择添加 -- frozen-lockfile 标志,以确保纱线将坚持在 yarn.lock 中列出的版本,而不会尝试更新它们。

During development, hot module reloading is active so that you can edit the renderer's code easily and hit F5 after the changes have been compiled by electron-forge. You can keep the developer tools open to see when HMR has finished loading your changes.

在开发过程中,热模块重新加载是活跃的,这样你可以编辑渲染器的代码很容易,并点击 F5 后,变化已经通过电子锻造。您可以保持开发人员工具的开放状态,以查看 HMR 何时完成了对您的更改的加载。

Development Commands 开发命令

This section lists all available commands that you can use during application development. These are defined within the package.json and can be run from the command line by prefixing them with yarn. Run them from within the base directory of the repository.

本节列出了在应用程序开发过程中可以使用的所有可用命令。这些都是在 package.json 中定义的,可以通过在命令行中使用纱线作为前缀来运行。从存储库的基本目录中运行它们。

start

Starts electron-forge, which will build the application and launch it in development mode. This will use the normal settings, so if you use Zettlr on the same computer in production, it will use the same configuration files as the regular application. This means: be careful when breaking things. In that case, it's better to use test-gui.

启动电子锻造,它将构建应用程序并以开发模式启动它。这将使用普通设置,因此如果您在生产环境中的同一台计算机上使用 Zettlr,它将使用与常规应用程序相同的配置文件。这意味着: 打碎东西时要小心。在这种情况下,最好使用 test-gui。

package

Packages the application, but not bundle it into an installer. Without any suffix, this command will package the application for your current platform. To create specific packages (may require running on the corresponding platform), the following suffixes are available:

将应用程序打包,但不将其捆绑到安装程序中。没有任何后缀,该命令将为当前平台打包应用程序。要创建特定的包 (可能需要在相应的平台上运行) ,可以使用以下后缀:

The resulting application packages are stored in ./out.

生成的应用程序包存储在./out 中。

release:{platform}

Packages the application and then bundles it into an installer for the corresponding platform. To create such a bundle (may require running on the corresponding platform), one of the following values for {platform} is required:

将应用程序打包,然后将其打包到相应平台的安装程序中。要创建这样的包 (可能需要在相应的平台上运行) ,需要{ platform } 的下列值之一:

The resulting setup bundles are stored in ./release.

生成的安装包存储在./release 中。

Please note that, while you can package directly for your platform without any suffix, for creating a release specifying the platform is required as electron-builder would otherwise include the development-dependencies in the app.asar, resulting in a bloated application.

请注意,虽然您可以直接为您的平台打包而不需要任何后缀,但是创建一个指定平台的发行版是必需的,因为电子构建器会在 app.asar 中包含开发依赖项,从而导致应用程序臃肿。

lang:refresh

This downloads the four default translations of the application from Zettlr Translate, with which it is shipped by default. It places the files in the source/common/lang-directory. Currently, the default languages are: German (Germany), English (USA), English (UK), and French (France).

这将从 Zettlr Translate 下载应用程序的四个默认翻译,默认情况下应用程序是使用 Zettlr Translate 提供的。它将文件放在 source/common/lang - 目录中。目前,默认语言是: 德语 (德国)、英语(美国)、英语(英国) 和法语(法国)。

Please note, that this command is intended for an automated workflow that runs from time to time on the repository to perform this action. This means: Do not commit updated files to the repository. Instead, the updated files will be downloaded whenever you git fetch.

请注意,此命令用于在存储库上不时运行以执行此操作的自动化工作流。这意味着: 不要将更新的文件提交到存储库中。相反,只要你获取 git,更新的文件就会被下载。

csl:refresh

This downloads the Citation Style Language (CSL) files with which the application is shipped, and places them in the source/main/assets/csl-locales- and source/main/assets/csl-styles-directories respectively.

这将下载附带应用程序的引用样式语言 (Citation Style Language,CSL) 文件,并将它们分别放在源 / main/assets/CSL-locales - 和源 / main/assets/CSL-styles - 目录中。

Please note, that this command is intended for an automated workflow that runs from time to time on the repository to perform this action. This means: Do not commit updated files to the repository. Instead, the updated files will be downloaded whenever you git fetch.

请注意,此命令用于在存储库上不时运行以执行此操作的自动化工作流。这意味着: 不要将更新的文件提交到存储库中。相反,只要你获取 git,更新的文件就会被下载。

lint

This simply runs ESLint with the configuration and outputs a file eslint_report.htm into the base directory of the repository with the results. Apps such as Atom or Visual Studio Code will automatically run ESLint in the background, but if you want to be extra-safe, make sure to run this command prior to submitting a Pull Request.

这只需运行配置 ESLint 并将一个文件 ESLint _ report.htm 输出到存储库的基本目录中,并显示结果。诸如 Atom 或 Visual Studio Code 之类的应用程序将在后台自动运行 ESLint,但是如果您想要更加安全,请确保在提交拉请求之前运行这个命令。

This command will run automatically on each Pull Request to check your code for inconsistencies.

这个命令将在每个 Pull Request 上自动运行,以检查代码是否不一致。

reveal:build

This re-compiles the source-files needed by the exporter for building reveal.js-presentations. Due to the nature of how Pandoc creates such presentations, Zettlr needs to modify the output by Pandoc, which is why these files need to be pre-compiled.

这将重新编译出口商构建 reveal.js-presentations 所需的源文件。由于 Pandoc 如何创建这样的演示的性质,Zettlr 需要修改 Pandoc 的输出,这就是为什么这些文件需要预编译的原因。

test

This runs the unit tests in the directory ./test. Make sure to run this command prior to submitting a Pull Request, as this will be run every time you commit to the PR, and this way you can make sure that your changes don't break any tests, making the whole PR-process easier.

这将运行目录中的单元测试。/ 测试。确保在提交 “拉请求” 之前运行这个命令,因为每次提交 PR 时都会运行这个命令,这样可以确保您的更改不会破坏任何测试,从而使整个 PR-process 更加容易。

test-gui

Use this command to carefree test any changes you make to the application. This command will start the application as if you ran yarn start, but will provide a custom configuration and a custom directory.

使用此命令可以无忧无虑地测试对应用程序所做的任何更改。这个命令将启动应用程序,如果你运行纱线开始,但将提供一个自定义配置和自定义目录。

The first time you start this command, pass the --clean-flag to copy a bunch of test-files to your ./resources-directory, create a test-config.yml in your project root, and start the application with this clean configuration. Then, you can adapt the test-config.yml to your liking (so that certain settings which you would otherwise always set will be pre-set without you having to open the preferences).

第一次启动这个命令时,传递 -- clean 标志将一组测试文件复制到您的。/resources-directory,创建一个 test-config。在您的项目根目录中使用 yml,并使用这个干净的配置启动应用程序。然后,您可以调整 test-config。Yml 符合您的喜好 (这样您本来总是设置的某些设置将被预先设置,而不必打开首选项)。

Whenever you want to reset the test directory to its initial state (or you removed the directory, or cloned the whole project anew), pass the flag --clean to the command in order to create or reset the directory. This is also necessary if you changed something in test-config.yml.

无论何时您想要将测试目录重置为其初始状态 (或者您删除了该目录,或者重新克隆了整个项目) ,都要将标志 -- clean 传递给命令,以便创建或重置该目录。如果您更改了 test-config 中的某些内容,这也是必要的。女名女子名。

You can pass additional command-line switches such as --clear-cache to this command as well. They will be passed to the child process.

您还可以向这个命令传递额外的命令行开关,例如 -- clear-cache。它们将被传递给子进程。

Attention: Before first running the command, you must run it with the --clean-flag to create the directory in the first place!

注意: 在第一次运行命令之前,您必须使用 -- clean 标志运行它,以便首先创建目录!

To dive deeper into the development process, have a look at our full development documentation.

要更深入地了解开发过程,请查看完整的开发文档。

Command-Line Switches 命令行开关

The Zettlr binary features a few command line switches that you can make use of for different purposes.

Zettlr 二进制文件包含一些命令行开关,您可以将它们用于不同的目的。

--clear-cache

This will direct the File System Abstraction Layer to fully clear its cache on boot. This can be used to mitigate issues regarding changes in the code base. To ensure compatibility with any changes to the information stored in the cache, the cache is also automatically cleared when the version field in your config.json does not match the one in the package.json, which means that, as long as you do not explicitly set the version-field in your test-config.yml, the cache will always be cleared on each run when you type yarn test-gui.

这将引导文件系统 / 抽象层在启动时完全清除缓存。这可用于减轻与代码库中的更改有关的问题。为了确保缓存中存储的信息的兼容性,当 config.json 中的 version 字段与 package.json 中的不匹配时,缓存也会自动清除,这意味着只要不在 test-config 中显式设置 version 字段。Yml,在每次运行时都会清除缓存,当您键入纱线测试图形用户界面时。

--config=path

Use this switch to temporarily override the default configuration file stored in your AppData-equivalent folder. This path should be absolute. In case you need to provide a relative path, the base for resolving the path will be: either the binary's directory name (when the app is packaged), or the repository root (when the app is not packaged). If the path contains spaces, don't forget to escape it in quotes.

使用此开关可临时覆盖存储在等效 appdata 文件夹中的默认配置文件。这条道路应该是绝对的。如果您需要提供一个相对路径,解析路径的基础是: 二进制文件的目录名 (当应用程序被打包时) ,或者存储库根 (当应用程序没有打包时)。如果路径包含空格,不要忘记用引号对其进行转义。

License 许可证

This software is licensed via the GNU GPL v3-License.

这个软件是通过 GNU GPL v3-License 授权的。

The brand (including name, icons and everything Zettlr can be identified with) is excluded and all rights reserved. If you want to fork Zettlr to develop another app, feel free but please change name and icons. Read about the logo usage.

这个品牌 (包括名字、图标和所有 Zettlr 可以识别的东西) 被排除在外,并且没有保留所有权利。如果你想让 Zettlr 开发另一个应用程序,请随意更改名称和图标。阅读关于 logo 使用的信息。 https://github.com/Zettlr/Zettlr