mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	Merge remote-tracking branch 'origin/develop' into feature/server_esm
This commit is contained in:
		
							
								
								
									
										10
									
								
								.github/workflows/dev.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/dev.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,6 +1,14 @@ | ||||
| name: Dev | ||||
| on: | ||||
|   push: | ||||
|     branches-ignore: | ||||
|       - 'develop' | ||||
|       - 'feature/update**' | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| jobs: | ||||
|   build_docker: | ||||
|     name: Build Docker image | ||||
| @@ -10,7 +18,7 @@ jobs: | ||||
|       - name: Set up node & dependencies | ||||
|         uses: actions/setup-node@v4 | ||||
|         with: | ||||
|           node-version: 18 | ||||
|           node-version: 20 | ||||
|           cache: "npm" | ||||
|       - run: npm ci     | ||||
|       - name: Run the TypeScript build | ||||
|   | ||||
							
								
								
									
										65
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										65
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							| @@ -3,9 +3,18 @@ on: | ||||
|   push: | ||||
|     branches: | ||||
|       - 'develop' | ||||
|       - 'feature/update*' | ||||
|     paths-ignore: | ||||
|       - 'docs/**' | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| env: | ||||
|   REGISTRY: ghcr.io | ||||
|   IMAGE_NAME: ${{ github.repository }} | ||||
|  | ||||
| jobs: | ||||
|   build_darwin-x64: | ||||
|     name: Build macOS x86_64 | ||||
| @@ -15,10 +24,12 @@ jobs: | ||||
|       - name: Set up node & dependencies | ||||
|         uses: actions/setup-node@v4 | ||||
|         with: | ||||
|           node-version: 18 | ||||
|           node-version: 20 | ||||
|           cache: "npm" | ||||
|       - run: npm ci | ||||
|       - run: ./bin/build-mac-x64.sh | ||||
|       - run: | | ||||
|           npm run update-build-info | ||||
|           ./bin/build-mac-x64.sh | ||||
|       - uses: actions/upload-artifact@v4 | ||||
|         with: | ||||
|           name: trilium-mac-x64.zip | ||||
| @@ -31,10 +42,12 @@ jobs: | ||||
|       - name: Set up node & dependencies | ||||
|         uses: actions/setup-node@v4 | ||||
|         with: | ||||
|           node-version: 18 | ||||
|           node-version: 20 | ||||
|           cache: "npm" | ||||
|       - run: npm ci | ||||
|       - run: ./bin/build-mac-arm64.sh | ||||
|       - run: | | ||||
|           npm run update-build-info | ||||
|           ./bin/build-mac-arm64.sh | ||||
|       - uses: actions/upload-artifact@v4 | ||||
|         with: | ||||
|           name: trilium-mac-arm64.zip | ||||
| @@ -47,10 +60,12 @@ jobs: | ||||
|       - name: Set up node & dependencies | ||||
|         uses: actions/setup-node@v4 | ||||
|         with: | ||||
|           node-version: 18 | ||||
|           node-version: 20 | ||||
|           cache: "npm" | ||||
|       - run: npm ci | ||||
|       - run: ./bin/build-linux-x64.sh | ||||
|       - run: | | ||||
|           npm run update-build-info | ||||
|           ./bin/build-linux-x64.sh | ||||
|       - uses: actions/upload-artifact@v4 | ||||
|         with: | ||||
|           name: trilium-linux-x64.tar.xz | ||||
| @@ -67,10 +82,12 @@ jobs: | ||||
|       - name: Set up node & dependencies | ||||
|         uses: actions/setup-node@v4 | ||||
|         with: | ||||
|           node-version: 18 | ||||
|           node-version: 20 | ||||
|           cache: "npm" | ||||
|       - run: npm ci | ||||
|       - run: ./bin/build-server.sh | ||||
|       - run: | | ||||
|           npm run update-build-info | ||||
|           ./bin/build-server.sh | ||||
|       - uses: actions/upload-artifact@v4 | ||||
|         with: | ||||
|           name: trilium-linux-x64-server.tar.xz | ||||
| @@ -90,14 +107,36 @@ jobs: | ||||
|       - name: Set up node & dependencies | ||||
|         uses: actions/setup-node@v4 | ||||
|         with: | ||||
|           node-version: 18 | ||||
|           node-version: 20 | ||||
|           cache: "npm" | ||||
|       - run: npm ci | ||||
|       - run: ./bin/build-win-x64.sh | ||||
|       - run: | | ||||
|           npm run update-build-info | ||||
|           ./bin/build-win-x64.sh DONTPACK | ||||
|       - uses: actions/upload-artifact@v4 | ||||
|         with: | ||||
|           name: trilium-windows-x64.zip | ||||
|           path: dist/trilium-windows-x64-*.zip | ||||
|           name: trilium-windows-x64 | ||||
|           path: dist/trilium-windows-x64 | ||||
|   build_windows-installer: | ||||
|     name: Build Windows x86_64 (Setup) | ||||
|     runs-on: windows-latest | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|       - name: Set up node & dependencies | ||||
|         uses: actions/setup-node@v4 | ||||
|         with: | ||||
|           node-version: 20 | ||||
|           cache: "npm" | ||||
|       - run: npm ci | ||||
|       - name: Run installer build | ||||
|         run: | | ||||
|           npm run update-build-info | ||||
|           npm run make-electron | ||||
|       - name: Publish installer artifact | ||||
|         uses: actions/upload-artifact@v4 | ||||
|         with: | ||||
|           name: TriliumNext Notes for Windows (Setup) | ||||
|           path: out/make/squirrel.windows/x64/*.exe | ||||
|   build_docker: | ||||
|     name: Build Docker image | ||||
|     runs-on: ubuntu-latest | ||||
| @@ -122,7 +161,7 @@ jobs: | ||||
|       - name: Set up node & dependencies | ||||
|         uses: actions/setup-node@v4 | ||||
|         with: | ||||
|           node-version: 18 | ||||
|           node-version: 20 | ||||
|           cache: "npm" | ||||
|       - run: npm ci     | ||||
|       - name: Run the TypeScript build | ||||
|   | ||||
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -15,3 +15,5 @@ data/ | ||||
| data-test/ | ||||
| tmp/ | ||||
| .eslintcache | ||||
|  | ||||
| out/ | ||||
| @@ -2,7 +2,7 @@ image: | ||||
|   file: .gitpod.dockerfile | ||||
|  | ||||
| tasks: | ||||
|     - before: nvm install 18.18.2 && nvm use 18.18.2 | ||||
|     - before: nvm install 20.15.1 && nvm use 20.15.1 | ||||
|       init: npm install | ||||
|       command: npm run start-server | ||||
|  | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| # !!! Don't try to build this Dockerfile directly, run it through bin/build-docker.sh script !!! | ||||
| FROM node:18.18.2-alpine | ||||
| FROM node:20.15.1-alpine | ||||
|  | ||||
| # Configure system dependencies | ||||
| RUN apk add --no-cache --virtual .build-dependencies \ | ||||
|   | ||||
| @@ -1,63 +1,78 @@ | ||||
| # Trilium Notes | ||||
| # TriliumNext Notes | ||||
|  | ||||
| [English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md) | [Italian](https://github.com/zadam/trilium/blob/master/README.it.md) | ||||
| [English](https://github.com/TriliumNext/Notes/blob/master/README.md) | [Chinese](https://github.com/TriliumNext/Notes/blob/master/README-ZH_CN.md) | [Russian](https://github.com/TriliumNext/Notes/blob/master/README.ru.md) | [Japanese](https://github.com/TriliumNext/Notes/blob/master/README.ja.md) | [Italian](https://github.com/TriliumNext/Notes/blob/master/README.it.md) | ||||
|  | ||||
| [](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||||
| Trilium Notes 是一个层次化的笔记应用程序,专注于建立大型个人知识库。请参阅[屏幕截图](https://github.com/zadam/trilium/wiki/Screenshot-tour)以快速了解: | ||||
| TriliumNext Notes 是一个层次化的笔记应用程序,专注于建立大型个人知识库。请参阅[屏幕截图](https://triliumnext.github.io/Docs/Wiki/screenshot-tour)以快速了解: | ||||
|  | ||||
|  | ||||
| <a href="https://triliumnext.github.io/Docs/Wiki/screenshot-tour"><img src="https://github.com/TriliumNext/Docs/blob/main/Wiki/images/screenshot.png?raw=true" alt="Trilium Screenshot" width="1000"></a> | ||||
|  | ||||
| Ukraine is currently suffering from Russian aggression, please consider donating to [one of these charities](https://old.reddit.com/r/ukraine/comments/s6g5un/want_to_support_ukraine_heres_a_list_of_charities/). | ||||
| ## ⚠️ 为什么选择TriliumNext? | ||||
|  | ||||
| <img src="https://upload.wikimedia.org/wikipedia/commons/4/49/Flag_of_Ukraine.svg" alt="drawing" width="600"/> | ||||
| <img src="https://signmyrocket.com//uploads/2b2a523cd0c0e76cdbba95a89a9636b2_1676971281.jpg" alt="Trilium Notes supports Ukraine!" width="600"/> | ||||
| [原始的Trilium项目目前处于维护模式](https://github.com/zadam/trilium/issues/4620) | ||||
|  | ||||
| ## 特性 | ||||
| ## 🗭 与我们讨论 | ||||
|  | ||||
| * 笔记可以排列成任意深的树。单个笔记可以放在树中的多个位置(请参阅[克隆](https://github.com/zadam/trilium/wiki/Cloning-notes)) | ||||
| * 丰富的所见即所得笔记编辑功能,包括带有 Markdown [自动格式化功能的](https://github.com/zadam/trilium/wiki/Text-notes#autoformat)表格,图像和[数学](https://github.com/zadam/trilium/wiki/Text-notes#math-support) | ||||
| * 支持编辑[使用源代码的笔记](https://github.com/zadam/trilium/wiki/Code-notes),包括语法高亮显示 | ||||
| * 笔记之间快速[导航](https://github.com/zadam/trilium/wiki/Note-navigation),全文搜索和[笔记聚焦](https://github.com/zadam/trilium/wiki/Note-hoisting) | ||||
| * 无缝[笔记版本控制](https://github.com/zadam/trilium/wiki/Note-revisions) | ||||
| * 笔记[属性](https://github.com/zadam/trilium/wiki/Attributes)可用于笔记组织,查询和高级[脚本编写](https://github.com/zadam/trilium/wiki/Scripts) | ||||
| * [同步](https://github.com/zadam/trilium/wiki/Synchronization)与自托管同步服务器 | ||||
| 欢迎加入我们的官方讨论和社区。我们专注于Trilium的开发,乐于听取您对功能、建议或问题的意见! | ||||
|  | ||||
| - [Matrix](https://matrix.to/#/#triliumnext:matrix.org)(用于同步讨论) | ||||
| - [Github Discussions](https://github.com/TriliumNext/Notes/discussions)(用于异步讨论) | ||||
| - [Wiki](https://triliumnext.github.io/Docs/)(用于常见操作问题和用户指南) | ||||
|  | ||||
| 上面链接的两个房间是镜像的,所以您可以在任意平台上使用XMPP或者Matrix来和我们交流。 | ||||
|  | ||||
| ### 非官方社区 | ||||
|  | ||||
| [Trilium Rocks](https://discord.gg/aqdX9mXX4r) | ||||
|  | ||||
| ## 🎁 特性 | ||||
|  | ||||
| * 笔记可以排列成任意深的树。单个笔记可以放在树中的多个位置(请参阅[克隆](https://triliumnext.github.io/Docs/Wiki/cloning-notes)) | ||||
| * 丰富的所见即所得笔记编辑功能,包括带有 Markdown [自动格式化功能的](https://triliumnext.github.io/Docs/Wiki/text-notes#autoformat)表格,图像和[数学公式](https://triliumnext.github.io/Docs/Wiki/text-notes#math-support) | ||||
| * 支持编辑[使用源代码的笔记](https://triliumnext.github.io/Docs/Wiki/code-notes),包括语法高亮显示 | ||||
| * 笔记之间快速[导航](https://triliumnext.github.io/Docs/Wiki/note-navigation),全文搜索和[提升笔记](https://triliumnext.github.io/Docs/Wiki/note-hoisting) | ||||
| * 无缝[笔记版本控制](https://triliumnext.github.io/Docs/Wiki/note-revisions) | ||||
| * 笔记[属性](https://triliumnext.github.io/Docs/Wiki/attributes)可用于笔记组织,查询和高级[脚本编写](https://triliumnext.github.io/Docs/Wiki/scripts) | ||||
| * [同步](https://triliumnext.github.io/Docs/Wiki/synchronization)与自托管同步服务器 | ||||
|   * 有一个[第三方提供的同步服务器托管服务](https://trilium.cc/paid-hosting) | ||||
| * 公开地[分享](https://github.com/zadam/trilium/wiki/Sharing)(发布)笔记到互联网 | ||||
| * 具有按笔记粒度的强大的[笔记加密](https://github.com/zadam/trilium/wiki/Protected-notes) | ||||
| * 公开地[分享](https://triliumnext.github.io/Docs/Wiki/sharing)(发布)笔记到互联网 | ||||
| * 具有按笔记粒度的强大的[笔记加密](https://triliumnext.github.io/Docs/Wiki/protected-notes) | ||||
| * 使用自带的 Excalidraw 来绘制图表(笔记类型“画布”) | ||||
| * [关系图](https://github.com/zadam/trilium/wiki/Relation-map)和[链接图](https://github.com/zadam/trilium/wiki/Link-map),用于可视化笔记及其关系 | ||||
| * [脚本](https://github.com/zadam/trilium/wiki/Scripts) - 请参阅[高级功能展示](https://github.com/zadam/trilium/wiki/Advanced-showcases) | ||||
| * [关系图](https://triliumnext.github.io/Docs/Wiki/relation-map)和[链接图](https://triliumnext.github.io/Docs/Wiki/link-map),用于可视化笔记及其关系 | ||||
| * [脚本](https://triliumnext.github.io/Docs/Wiki/scripts) - 请参阅[高级功能展示](https://triliumnext.github.io/Docs/Wiki/advanced-showcases) | ||||
| * 可用于自动化的 [REST API](https://triliumnext.github.io/Docs/Wiki/etapi) | ||||
| * 在拥有超过 10 万条笔记时仍能保持良好的可用性和性能 | ||||
| * 针对智能手机和平板电脑进行优化的[用于移动设备的前端](https://github.com/zadam/trilium/wiki/Mobile-frontend) | ||||
| * [夜间主题](https://github.com/zadam/trilium/wiki/Themes) | ||||
| * [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import) 和 [Markdown 导入导出](https://github.com/zadam/trilium/wiki/Markdown)功能 | ||||
| * 使用[网页剪藏](https://github.com/zadam/trilium/wiki/Web-clipper)轻松保存互联网上的内容 | ||||
| * 针对智能手机和平板电脑进行优化的[用于移动设备的前端](https://triliumnext.github.io/Docs/Wiki/mobile-frontend) | ||||
| * [夜间主题](https://triliumnext.github.io/Docs/Wiki/themes) | ||||
| * [Evernote](https://triliumnext.github.io/Docs/Wiki/evernote-import) 和 [Markdown 导入导出](https://triliumnext.github.io/Docs/Wiki/markdown)功能 | ||||
| * 使用[网页剪藏](https://triliumnext.github.io/Docs/Wiki/web-clipper)轻松保存互联网上的内容 | ||||
|  | ||||
| ## 构建 | ||||
| ✨ 查看以下第三方资源,获取更多关于TriliumNext的好东西: | ||||
|  | ||||
| Trilium 可以用作桌面应用程序(Linux 和 Windows)或服务器(Linux)上托管的 Web 应用程序。虽然有 macOS 版本的桌面应用程序,但它[不受支持](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support)。 | ||||
| - [awesome-trilium](https://github.com/Nriver/awesome-trilium):提供第三方主题、脚本、插件等资源的列表。 | ||||
| - [TriliumRocks!](https://trilium.rocks/):提供教程、指南等更多内容。 | ||||
|  | ||||
| * 如果要在桌面上使用 Trilium,请从[最新版本](https://github.com/zadam/trilium/releases/latest)下载适用于您平台的二进制版本,解压缩该软件包并运行`trilium`可执行文件。 | ||||
| * 如果要在服务器上安装 Trilium,请参考[此页面](https://github.com/zadam/trilium/wiki/Server-installation)。 | ||||
| ## 🏗 构建 | ||||
|  | ||||
| Trilium 可以用作桌面应用程序(Linux 和 Windows)或服务器(Linux)上托管的 Web 应用程序。虽然有 macOS 版本的桌面应用程序,但它[不受支持](https://triliumnext.github.io/Docs/Wiki/faq#mac-os-support)。 | ||||
|  | ||||
| * 如果要在桌面上使用 Trilium,请从[最新版本](https://github.com/TriliumNext/Notes/releases/latest)下载适用于您平台的二进制版本,解压缩该软件包并运行`trilium`可执行文件。 | ||||
| * 如果要在服务器上安装 Trilium,请参考[此页面](https://triliumnext.github.io/Docs/Wiki/server-installation)。 | ||||
|   * 当前仅支持(测试过)最近发布的 Chrome 和 Firefox 浏览器。 | ||||
|  | ||||
| Trilium 也提供 Flatpak: | ||||
|  | ||||
| [<img width="240" src="https://flathub.org/assets/badges/flathub-badge-en.png">](https://flathub.org/apps/details/com.github.zadam.trilium) | ||||
|  | ||||
| ## 文档 | ||||
| ## 📝 文档 | ||||
|  | ||||
| [有关文档页面的完整列表,请参见 Wiki。](https://github.com/zadam/trilium/wiki/) | ||||
| [有关文档页面的完整列表,请参见 Wiki。](https://triliumnext.github.io/Docs/) | ||||
|  | ||||
| * [Wiki 的中文翻译版本](https://github.com/baddate/trilium/wiki/) | ||||
|  | ||||
| 您还可以阅读[个人知识库模式](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base),以获取有关如何使用 Trilium 的灵感。 | ||||
| 您还可以阅读[个人知识库模式](https://triliumnext.github.io/Docs/Wiki/patterns-of-personal-knowledge),以获取有关如何使用 Trilium 的灵感。 | ||||
|  | ||||
| ## 贡献 | ||||
| ## 💻 贡献 | ||||
|  | ||||
| 使用基于浏览器的开发环境 | ||||
|  | ||||
| [](https://gitpod.io/#https://github.com/zadam/trilium) | ||||
|  | ||||
| 或者克隆本仓库到本地,并运行 | ||||
|  | ||||
| @@ -66,17 +81,17 @@ npm install | ||||
| npm run start-server | ||||
| ``` | ||||
|  | ||||
| ## 致谢 | ||||
| ## 👏 致谢 | ||||
|  | ||||
| * [CKEditor 5](https://github.com/ckeditor/ckeditor5) - 市面上最好的所见即所得编辑器,拥有互动性强且聆听能力强的团队 | ||||
| * [FancyTree](https://github.com/mar10/fancytree) - 一个非常丰富的关于树的库,强大到没有对手。没有它,Trilium Notes 将不会如此。 | ||||
| * [CodeMirror](https://github.com/codemirror/CodeMirror) - 支持大量语言的代码编辑器 | ||||
| * [jsPlumb](https://github.com/jsplumb/jsplumb) - 强大的可视化连接库。用于[关系图](https://github.com/zadam/trilium/wiki/Relation-map)和[链接图](https://github.com/zadam/trilium/wiki/Link-map) | ||||
| * [jsPlumb](https://github.com/jsplumb/jsplumb) - 强大的可视化连接库。用于[关系图](https://triliumnext.github.io/Docs/Wiki/relation-map)和[链接图](https://triliumnext.github.io/Docs/Wiki/link-map) | ||||
|  | ||||
| ## 捐赠 | ||||
| ## 🤝 捐赠 | ||||
|  | ||||
| 你可以通过 GitHub Sponsors,[PayPal](https://paypal.me/za4am) 或者比特币 (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2) 来捐赠。 | ||||
|  | ||||
| ## 许可证 | ||||
| ## 🔑 许可证 | ||||
|  | ||||
| 本程序是自由软件:你可以再发布本软件和/或修改本软件,只要你遵循 Free Software Foundation 发布的 GNU Affero General Public License 的第三版或者任何(由你选择)更晚的版本。 | ||||
|   | ||||
							
								
								
									
										93
									
								
								README.it.md
									
									
									
									
									
								
							
							
						
						
									
										93
									
								
								README.it.md
									
									
									
									
									
								
							| @@ -1,92 +1,91 @@ | ||||
| # Trilium Notes | ||||
| # TriliumNext Notes | ||||
|  | ||||
| ## Trilium è in manutenzione - vedi i dettagli in https://github.com/zadam/trilium/issues/4620 | ||||
| [English](https://github.com/TriliumNext/Notes/blob/master/README.md) | [Chinese](https://github.com/TriliumNext/Notes/blob/master/README-ZH_CN.md) | [Russian](https://github.com/TriliumNext/Notes/blob/master/README.ru.md) | [Japanese](https://github.com/TriliumNext/Notes/blob/master/README.ja.md) | [Italian](https://github.com/TriliumNext/Notes/blob/master/README.it.md) | ||||
|  | ||||
| Le discussioni preliminari sull'organizzazione si stanno svolgendo in [Trilium Next discussions](https://github.com/orgs/TriliumNext/discussions).  | ||||
| TriliumNext Notes è un'applicazione per appunti ad organizzazione gerarchica, studiata per la costruzione di archivi di conoscenza personali di grandi dimensioni. | ||||
|  | ||||
| [](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md) | [Italian](https://github.com/zadam/trilium/blob/master/README.it.md) | ||||
| Vedi [fotografie](https://triliumnext.github.io/Docs/Wiki/screenshot-tour) per una panoramica veloce: | ||||
|  | ||||
| <a href="https://triliumnext.github.io/Docs/Wiki/screenshot-tour"><img src="https://github.com/TriliumNext/Docs/blob/main/Wiki/images/screenshot.png?raw=true" alt="Trilium Screenshot" width="1000"></a> | ||||
|  | ||||
| Trilium Notes è un'applicazione per appunti ad organizzazione gerarchica, studiata per la costruzione di archivi di conoscenza personali di grandi dimensioni. | ||||
| ## ⚠️ Perchè TriliumNext? | ||||
| [Il progetto originale Trilium è in modalità di manutenzione](https://github.com/zadam/trilium/issues/4620) | ||||
|  | ||||
| Vedi [fotografie](https://github.com/zadam/trilium/wiki/Screenshot-tour) per una panoramica veloce: | ||||
| ## 🗭 Discuti con noi | ||||
| Sentiti libero di unirti alle nostre discussioni ufficiali e alla nostra comunità. Siamo concentrati sullo sviluppo di Trilium e ci piacerebbe sapere quali funzioni, suggerimenti o eventuali problemi hai! | ||||
|  | ||||
| <a href="https://github.com/zadam/trilium/wiki/Screenshot-tour"><img src="https://raw.githubusercontent.com/wiki/zadam/trilium/images/screenshot.png" alt="Trilium Screenshot" width="1000"></a> | ||||
| - [Matrix](https://matrix.to/#/#triliumnext:matrix.org) (Per discussioni sincrone) | ||||
| - [Discussioni Github](https://github.com/TriliumNext/Notes/discussions) (Per discussioni asincrone) | ||||
| - [Wiki](https://triliumnext.github.io/Docs/) (Per le domande più comuni e le guide per l'utente) | ||||
|  | ||||
| L'Ucraina si sta difendendo dall'aggressione russa, considera [donare all'esercito ucraino o a organizzazioni umanitarie](https://standforukraine.com/). | ||||
|  | ||||
| <p float="left"> | ||||
|   <img src="https://upload.wikimedia.org/wikipedia/commons/4/49/Flag_of_Ukraine.svg" alt="drawing" width="400"/> | ||||
|   <img src="https://signmyrocket.com//uploads/2b2a523cd0c0e76cdbba95a89a9636b2_1676971281.jpg" alt="Trilium Notes supports Ukraine!" width="570"/> | ||||
| </p> | ||||
| Le due stanze linkate sopra sono connesse e contengono gli stessi messaggi, quindi puoi usare XMPP o Matrix da qualsiasi client tu preferisca, praticamente su qualsiasi piattaforma! | ||||
| ### Comunità non ufficiali | ||||
|  | ||||
| [Trilium Rocks](https://discord.gg/aqdX9mXX4r) | ||||
| ## 🎁 Funzionalità | ||||
|  | ||||
|  | ||||
| * Gli appunti possono essere organizzati in un albero di profondità arbitraria. Un singolo appunto può essere collocato in più posti nell'albero (vedi [clonazione](https://github.com/zadam/trilium/wiki/Cloning-notes)) | ||||
| * Ricco editor visuale (WYSIWYG), con supporto -tra l'altro- per tabelle, immagini ed [espressioni matematiche](https://github.com/zadam/trilium/wiki/Text-notes#math-support) e con [formattazione automatica](https://github.com/zadam/trilium/wiki/Text-notes#autoformat) per markdown | ||||
| * Supporto per la modifica di [appunti con codice sorgente](https://github.com/zadam/trilium/wiki/Code-notes), con evidenziazione della sintassi | ||||
| * [Navigazione veloce](https://github.com/zadam/trilium/wiki/Note-navigation) tra gli appunti, ricerca testuale completa e [fissaggio degli appunti](https://github.com/zadam/trilium/wiki/Note-hoisting) | ||||
| * Supporto integrato ed automatico per le [revisioni degli appunti](https://github.com/zadam/trilium/wiki/Note-revisions) | ||||
| * Gli [attributi](https://github.com/zadam/trilium/wiki/Attributes) degli appunti possono essere utilizzati per l'organizzazione, per l'interrogazione e per lo scripting avanzato (prorgrammazione). | ||||
| * [Sincronizzazione](https://github.com/zadam/trilium/wiki/Synchronization) con un server di sincronizzazione auto-ospitato | ||||
| * Gli appunti possono essere organizzati in un albero di profondità arbitraria. Un singolo appunto può essere collocato in più posti nell'albero (vedi [clonazione](https://triliumnext.github.io/Docs/Wiki/cloning-notes)) | ||||
| * Ricco editor visuale (WYSIWYG), con supporto -tra l'altro- per tabelle, immagini ed [espressioni matematiche](https://triliumnext.github.io/Docs/Wiki/text-notes#math-support) e con [formattazione automatica](https://triliumnext.github.io/Docs/Wiki/text-notes#autoformat) per markdown | ||||
| * Supporto per la modifica di [appunti con codice sorgente](https://triliumnext.github.io/Docs/Wiki/code-notes), con evidenziazione della sintassi | ||||
| * [Navigazione veloce](https://triliumnext.github.io/Docs/Wiki/note-navigation) tra gli appunti, ricerca testuale completa e [fissaggio degli appunti](https://triliumnext.github.io/Docs/Wiki/note-hoisting) | ||||
| * Supporto integrato ed automatico per le [revisioni degli appunti](https://triliumnext.github.io/Docs/Wiki/note-revisions) | ||||
| * Gli [attributi](https://triliumnext.github.io/Docs/Wiki/attributes) degli appunti possono essere utilizzati per l'organizzazione, per l'interrogazione e per lo scripting avanzato (prorgrammazione). | ||||
| * [Sincronizzazione](https://triliumnext.github.io/Docs/Wiki/synchronization) con un server di sincronizzazione auto-ospitato | ||||
|   * c'è un [servizio di terze parti per ospitare server di sincronizzazione](https://trilium.cc/paid-hosting) | ||||
| * [Condivisione](https://github.com/zadam/trilium/wiki/Sharing)  (pubblicazione) di appunti sull'internet pubblico | ||||
| * Robusta [crittografia](https://github.com/zadam/trilium/wiki/Protected-notes) configurabile singolarmente per ogni appunto | ||||
| * [Condivisione](https://triliumnext.github.io/Docs/Wiki/sharing)  (pubblicazione) di appunti sull'internet pubblico | ||||
| * Robusta [crittografia](https://triliumnext.github.io/Docs/Wiki/protected-notes) configurabile singolarmente per ogni appunto | ||||
| * Disegno di diagrammi con Excalidraw (tipo di appunto "canvas") | ||||
| * [Mappe relazionali](https://github.com/zadam/trilium/wiki/Relation-map) e [mappe di collegamenti](https://github.com/zadam/trilium/wiki/Link-map) per visualizzare gli appunti e le loro relazioni | ||||
| * [Scripting](https://github.com/zadam/trilium/wiki/Scripts) - vedi [Esempi avanzati](https://github.com/zadam/trilium/wiki/Advanced-showcases) | ||||
| * [API REST](https://github.com/zadam/trilium/wiki/ETAPI) per l'automazione | ||||
| * [Mappe relazionali](https://triliumnext.github.io/Docs/Wiki/relation-map) e [mappe di collegamenti](https://triliumnext.github.io/Docs/Wiki/link-map) per visualizzare gli appunti e le loro relazioni | ||||
| * [Scripting](https://triliumnext.github.io/Docs/Wiki/scripts) - vedi [Esempi avanzati](https://triliumnext.github.io/Docs/Wiki/advanced-showcases) | ||||
| * [API REST](https://triliumnext.github.io/Docs/Wiki/etapi) per l'automazione | ||||
| * Si adatta bene sia in termini di usabilità che di prestazioni fino ad oltre 100 000 appunti | ||||
| * Interfaccia utente ottimizzata per il [mobile](https://github.com/zadam/trilium/wiki/Mobile-frontend) (smartphone e tablet) | ||||
| * [Tema Notturno](https://github.com/zadam/trilium/wiki/Themes) | ||||
| * Supporto per importazione ed esportazione da e per [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import) e [Markdown import](https://github.com/zadam/trilium/wiki/Markdown) | ||||
| * [Web Clipper](https://github.com/zadam/trilium/wiki/Web-clipper) per il salvataggio facile di contenuti web | ||||
| * Interfaccia utente ottimizzata per il [mobile](https://triliumnext.github.io/Docs/Wiki/mobile-frontend) (smartphone e tablet) | ||||
| * [Tema Notturno](https://triliumnext.github.io/Docs/Wiki/themes) | ||||
| * Supporto per importazione ed esportazione da e per [Evernote](https://triliumnext.github.io/Docs/Wiki/evernote-import) e [Markdown import](https://triliumnext.github.io/Docs/Wiki/markdown) | ||||
| * [Web Clipper](https://triliumnext.github.io/Docs/Wiki/web-clipper) per il salvataggio facile di contenuti web | ||||
|  | ||||
| ✨ Dai un'occhiata alle seguenti risorse di terze parti per scoprire altre bellezze legate a TriliumNext: | ||||
|  | ||||
| Dai un'occhiata a [awesome-trilium](https://github.com/Nriver/awesome-trilium) per temi, script, plugin e altro di terze parti. | ||||
|  | ||||
| -[awesome-trilium](https://github.com/Nriver/awesome-trilium) per temi, script, plugin e altro di terze parti. | ||||
| - [TriliumRocks!](https://trilium.rocks/) per tutorial, guide e molto altro. | ||||
| ## 🏗 Rilasci | ||||
|  | ||||
|  | ||||
| Trilium è fornito come applicazione desktop (Linux e Windows) o come applicazione web ospitata sul tuo server (Linux). La versione desktop per Mac OS è disponibile, ma [non è supportata](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support). | ||||
| Trilium è fornito come applicazione desktop (Linux e Windows) o come applicazione web ospitata sul tuo server (Linux). La versione desktop per Mac OS è disponibile, ma [non è supportata](https://triliumnext.github.io/Docs/Wiki/faq#mac-os-support). | ||||
|  | ||||
| * Se vuoi usare Trilium sul tuo desktop, scarica il rilascio binario per la tua piattaforma dall'[ultimo rilascio](https://github.com/zadam/trilium/releases/latest), decomprimi l'archivio e avvia l'eseguibile ```trilium```. | ||||
| * Se vuoi installare Trilium su un server, segui [questa pagina](https://github.com/zadam/trilium/wiki/Server-installation). | ||||
| * Se vuoi usare Trilium sul tuo desktop, scarica il rilascio binario per la tua piattaforma dall'[ultimo rilascio](https://github.com/TriliumNext/Notes/releases/latest), decomprimi l'archivio e avvia l'eseguibile ```trilium```. | ||||
| * Se vuoi installare Trilium su un server, segui [questa pagina](https://triliumnext.github.io/Docs/Wiki/server-installation). | ||||
|   * Per ora solo Chrome e Firefox sono i browser supportati (testati). | ||||
|  | ||||
| Trilium è anche disponibile su Flatpak: | ||||
| TriliumNext sarà fornito anche come Flatpak: | ||||
|  | ||||
| [<img width="240" src="https://flathub.org/assets/badges/flathub-badge-en.png">](https://flathub.org/apps/details/com.github.zadam.trilium) | ||||
| <img width="240" src="https://flathub.org/assets/badges/flathub-badge-en.png"> | ||||
|  | ||||
| ## 📝 Documentazione | ||||
|  | ||||
| [Vedi la wiki per una lista completa delle pagine di documentazione.](https://github.com/zadam/trilium/wiki/) | ||||
| [Vedi la wiki per una lista completa delle pagine di documentazione.](https://triliumnext.github.io/Docs/) | ||||
|  | ||||
| Puoi anche leggere ["Patterns of personal knowledge base"](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base) per avere un'ispirazione su come potresti utilizzare Trilium. | ||||
| Puoi anche leggere ["Patterns of personal knowledge base"](https://triliumnext.github.io/Docs/Wiki/patterns-of-personal-knowledge) per avere un'ispirazione su come potresti utilizzare Trilium. | ||||
|  | ||||
| ## 💻 Contribuire | ||||
|  | ||||
| Usa un ambiente di sviluppo basato su browser | ||||
|  | ||||
| [](https://gitpod.io/#https://github.com/zadam/trilium) | ||||
|  | ||||
| O clona localmente ed esegui | ||||
| Clona localmente ed esegui | ||||
| ``` | ||||
| npm install | ||||
| npm run start-server | ||||
| ``` | ||||
|  | ||||
| ## 📢 Riconoscimenti | ||||
| ## 👏 Riconoscimenti | ||||
|  | ||||
| * [CKEditor 5](https://github.com/ckeditor/ckeditor5) - miglior editor visuale (WYSIWYG) sul mercato, squadra di sviluppo attenta e reattiva | ||||
| * [FancyTree](https://github.com/mar10/fancytree) -  libreria per alberi molto ricca di funzionalità, senza pari. Trilium Notes non sarebbe lo stesso senza di essa. | ||||
| * [CodeMirror](https://github.com/codemirror/CodeMirror) - editor di codice con supporto per un'enorme quantità di linguaggi. | ||||
| * [jsPlumb](https://github.com/jsplumb/jsplumb) - libreria per la  connettività visuale senza pari. Utilizzata per [mappe relazionali](https://github.com/zadam/trilium/wiki/Relation-map) e [mappe di collegamenti](https://github.com/zadam/trilium/wiki/Link-map). | ||||
| * [jsPlumb](https://github.com/jsplumb/jsplumb) - libreria per la  connettività visuale senza pari. Utilizzata per [mappe relazionali](https://triliumnext.github.io/Docs/Wiki/relation-map) e [mappe di collegamenti](https://triliumnext.github.io/Docs/Wiki/link-map). | ||||
|  | ||||
| ## 🤝 Supporto | ||||
|  | ||||
| È possibile supportare Trilium attraverso Github Sponsors, [PayPal](https://paypal.me/za4am) o Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2). | ||||
| Puoi sostenere lo sviluppatore originale di Trilium utilizzando gli sponsor di GitHub, [PayPal](https://paypal.me/za4am) o Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2). | ||||
| Il supporto all'organizzazione TriliumNext sarà possibile nel prossimo futuro. | ||||
|  | ||||
| ## 🔑 Licenza | ||||
|  | ||||
|   | ||||
							
								
								
									
										63
									
								
								README.ja.md
									
									
									
									
									
								
							
							
						
						
									
										63
									
								
								README.ja.md
									
									
									
									
									
								
							| @@ -1,48 +1,41 @@ | ||||
| # Trilium Notes | ||||
| # TriliumNext Notes | ||||
|  | ||||
| [English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md) | [Italian](https://github.com/zadam/trilium/blob/master/README.it.md) | ||||
| [English](https://github.com/TriliumNext/Notes/blob/master/README.md) | [Chinese](https://github.com/TriliumNext/Notes/blob/master/README-ZH_CN.md) | [Russian](https://github.com/TriliumNext/Notes/blob/master/README.ru.md) | [Japanese](https://github.com/TriliumNext/Notes/blob/master/README.ja.md) | [Italian](https://github.com/TriliumNext/Notes/blob/master/README.it.md) | ||||
|  | ||||
| Trilium Notes は、大規模な個人知識ベースの構築に焦点を当てた、階層型ノートアプリケーションです。概要は[スクリーンショット](https://github.com/zadam/trilium/wiki/Screenshot-tour)をご覧ください: | ||||
| Trilium Notes は、大規模な個人知識ベースの構築に焦点を当てた、階層型ノートアプリケーションです。概要は[スクリーンショット](https://triliumnext.github.io/Docs/Wiki/screenshot-tour)をご覧ください: | ||||
|  | ||||
| <a href="https://github.com/zadam/trilium/wiki/Screenshot-tour"><img src="https://raw.githubusercontent.com/wiki/zadam/trilium/images/screenshot.png" alt="Trilium Screenshot" width="1000"></a> | ||||
|  | ||||
| ウクライナは現在、ロシアの侵略から自国を守っています。[ウクライナ軍や人道的な慈善団体への寄付](https://standforukraine.com/)をご検討ください。 | ||||
|  | ||||
| <p float="left"> | ||||
|   <img src="https://upload.wikimedia.org/wikipedia/commons/4/49/Flag_of_Ukraine.svg" alt="drawing" width="400"/> | ||||
|   <img src="https://signmyrocket.com//uploads/2b2a523cd0c0e76cdbba95a89a9636b2_1676971281.jpg" alt="Trilium Notes supports Ukraine!" width="570"/> | ||||
| </p> | ||||
| <a href="https://triliumnext.github.io/Docs/Wiki/screenshot-tour"><img src="https://raw.githubusercontent.com/wiki/zadam/trilium/images/screenshot.png" alt="Trilium Screenshot" width="1000"></a> | ||||
|  | ||||
| ## 🎁 特徴 | ||||
|  | ||||
| * ノートは、任意の深さのツリーに配置できます。単一のノートをツリー内の複数の場所に配置できます ([cloning](https://github.com/zadam/trilium/wiki/Cloning-notes) を参照) | ||||
| * マークダウン[オートフォーマット](https://github.com/zadam/trilium/wiki/Text-notes#autoformat)による、表、画像、[数学](https://github.com/zadam/trilium/wiki/Text-notes#math-support)などの豊富な WYSIWYG ノート編集機能 | ||||
| * シンタックスハイライトを含む[ソースコード付きノート](https://github.com/zadam/trilium/wiki/Code-notes)の編集をサポート | ||||
| * [ノート間のナビゲーション](https://github.com/zadam/trilium/wiki/Note-navigation)、全文検索、[ノートホイスト](https://github.com/zadam/trilium/wiki/Note-hoisting)が高速かつ簡単に行えます | ||||
| * シームレスな[ノートのバージョン管理](https://github.com/zadam/trilium/wiki/Note-revisions) | ||||
| * ノート[属性](https://github.com/zadam/trilium/wiki/Attributes)は、ノート整理、クエリ、高度な[スクリプト](https://github.com/zadam/trilium/wiki/Scripts)に使用できます | ||||
| * 自己ホスト型同期サーバーとの[同期](https://github.com/zadam/trilium/wiki/Synchronization) | ||||
| * ノートは、任意の深さのツリーに配置できます。単一のノートをツリー内の複数の場所に配置できます ([cloning](https://triliumnext.github.io/Docs/Wiki/cloning-notes) を参照) | ||||
| * マークダウン[オートフォーマット](https://triliumnext.github.io/Docs/Wiki/text-notes#autoformat)による、表、画像、[数学](https://triliumnext.github.io/Docs/Wiki/text-notes#math-support)などの豊富な WYSIWYG ノート編集機能 | ||||
| * シンタックスハイライトを含む[ソースコード付きノート](https://triliumnext.github.io/Docs/Wiki/code-notes)の編集をサポート | ||||
| * [ノート間のナビゲーション](https://triliumnext.github.io/Docs/Wiki/note-navigation)、全文検索、[ノートホイスト](https://triliumnext.github.io/Docs/Wiki/note-hoisting)が高速かつ簡単に行えます | ||||
| * シームレスな[ノートのバージョン管理](https://triliumnext.github.io/Docs/Wiki/note-revisions) | ||||
| * ノート[属性](https://triliumnext.github.io/Docs/Wiki/Attributes)は、ノート整理、クエリ、高度な[スクリプト](https://triliumnext.github.io/Docs/Wiki/scripts)に使用できます | ||||
| * 自己ホスト型同期サーバーとの[同期](https://triliumnext.github.io/Docs/Wiki/synchronization) | ||||
|   * [同期サーバーをホストするサードパーティ・サービス](https://trilium.cc/paid-hosting)があります | ||||
| * 公開インターネットへのノートの[共有](https://github.com/zadam/trilium/wiki/Sharing)(公開) | ||||
| * ノートごとの粒度を持つ強力な[ノート暗号化](https://github.com/zadam/trilium/wiki/Protected-notes) | ||||
| * 公開インターネットへのノートの[共有](https://triliumnext.github.io/Docs/Wiki/sharing)(公開) | ||||
| * ノートごとの粒度を持つ強力な[ノート暗号化](https://triliumnext.github.io/Docs/Wiki/protected-notes) | ||||
| * 組み込みの Excalidraw を使用した図のスケッチ (ノート タイプ"キャンバス") | ||||
| * ノートとその関係を可視化するための[関係図](https://github.com/zadam/trilium/wiki/Relation-map)と[リンクマップ](https://github.com/zadam/trilium/wiki/Link-map) | ||||
| * [スクリプティング](https://github.com/zadam/trilium/wiki/Scripts) - [高度なショーケース](https://github.com/zadam/trilium/wiki/Advanced-showcases)を参照 | ||||
| * 自動化のための [REST API](https://github.com/zadam/trilium/wiki/ETAPI) | ||||
| * ノートとその関係を可視化するための[関係図](https://triliumnext.github.io/Docs/Wiki/relation-map)と[リンクマップ](https://triliumnext.github.io/Docs/Wiki/link-map) | ||||
| * [スクリプティング](https://triliumnext.github.io/Docs/Wiki/scripts) - [高度なショーケース](https://triliumnext.github.io/Docs/Wiki/advanced-showcases)を参照 | ||||
| * 自動化のための [REST API](https://triliumnext.github.io/Docs/Wiki/etapi) | ||||
| * ユーザビリティとパフォーマンスの両方で 100 000 ノート以上に拡張可能 | ||||
| * スマートフォンとタブレット向けのタッチ最適化[モバイルフロントエンド](https://github.com/zadam/trilium/wiki/Mobile-frontend) | ||||
| * [ナイトテーマ](https://github.com/zadam/trilium/wiki/Themes) | ||||
| * [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import) と [Markdown のインポートとエクスポート](https://github.com/zadam/trilium/wiki/Markdown) | ||||
| * Web コンテンツを簡単に保存するための [Web クリッパー](https://github.com/zadam/trilium/wiki/Web-clipper) | ||||
| * スマートフォンとタブレット向けのタッチ最適化[モバイルフロントエンド](https://triliumnext.github.io/Docs/Wiki/mobile-frontend) | ||||
| * [ナイトテーマ](https://triliumnext.github.io/Docs/Wiki/themes) | ||||
| * [Evernote](https://triliumnext.github.io/Docs/Wiki/evernote-import) と [Markdown のインポートとエクスポート](https://triliumnext.github.io/Docs/Wiki/Markdown) | ||||
| * Web コンテンツを簡単に保存するための [Web クリッパー](https://triliumnext.github.io/Docs/Wiki/web-clipper) | ||||
|  | ||||
| サードパーティのテーマ、スクリプト、プラグインなどは、 [awesome-trilium](https://github.com/Nriver/awesome-trilium) をチェックしてください。 | ||||
|  | ||||
| ## 🏗 ビルド | ||||
|  | ||||
| Trilium は、デスクトップアプリケーション(Linux、Windows)またはサーバー上でホストされるウェブアプリケーション(Linux)として提供されます。 Mac OS のデスクトップビルドも利用可能ですが、 [unsupported](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support) となっています。 | ||||
| Trilium は、デスクトップアプリケーション(Linux、Windows)またはサーバー上でホストされるウェブアプリケーション(Linux)として提供されます。 Mac OS のデスクトップビルドも利用可能ですが、 [unsupported](https://triliumnext.github.io/Docs/Wiki/faq#mac-os-support) となっています。 | ||||
|  | ||||
| * デスクトップで Trilium を使用したい場合は、 [latest release](https://github.com/zadam/trilium/releases/latest) からお使いのプラットフォームのバイナリリリースをダウンロードし、パッケージを解凍して ``trilium`` の実行ファイルを実行してください。 | ||||
| * サーバーに Trilium をインストールする場合は、[このページ](https://github.com/zadam/trilium/wiki/Server-installation)に従ってください。 | ||||
| * デスクトップで Trilium を使用したい場合は、 [latest release](https://github.com/TriliumNext/Notes/releases/latest) からお使いのプラットフォームのバイナリリリースをダウンロードし、パッケージを解凍して ``trilium`` の実行ファイルを実行してください。 | ||||
| * サーバーに Trilium をインストールする場合は、[このページ](https://triliumnext.github.io/Docs/Wiki/server-installation)に従ってください。 | ||||
|   * 現在、対応(動作確認)しているブラウザは、最近の Chrome と Firefox のみです。 | ||||
|  | ||||
| Trilium は Flatpak としても提供されます: | ||||
| @@ -51,16 +44,12 @@ Trilium は Flatpak としても提供されます: | ||||
|  | ||||
| ## 📝 ドキュメント | ||||
|  | ||||
| [ドキュメントページの全リストはwikiをご覧ください。](https://github.com/zadam/trilium/wiki/) | ||||
| [ドキュメントページの全リストはwikiをご覧ください。](https://triliumnext.github.io/Docs/) | ||||
|  | ||||
| また、[個人的な知識基盤のパターン](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base)を読むと、 Trilium の使い方のヒントを得ることができます。 | ||||
| また、[個人的な知識基盤のパターン](https://triliumnext.github.io/Docs/Wiki/patterns-of-personal-knowledge)を読むと、 Trilium の使い方のヒントを得ることができます。 | ||||
|  | ||||
| ## 💻 コントリビュート | ||||
|  | ||||
| ブラウザベースの開発環境を使用 | ||||
|  | ||||
| [](https://gitpod.io/#https://github.com/zadam/trilium) | ||||
|  | ||||
| または、ローカルにクローンして実行 | ||||
| ``` | ||||
| npm install | ||||
| @@ -72,7 +61,7 @@ npm run start-server | ||||
| * [CKEditor 5](https://github.com/ckeditor/ckeditor5) - 市場で最高の WYSIWYG エディター、非常にインタラクティブで聞き上手なチーム | ||||
| * [FancyTree](https://github.com/mar10/fancytree) - 真の競争相手がいない、非常に機能豊富なツリーライブラリです。 Trilium Notes は、これなしでは成り立たないでしょう。 | ||||
| * [CodeMirror](https://github.com/codemirror/CodeMirror) - 膨大な数の言語をサポートするコードエディタ | ||||
| * [jsPlumb](https://github.com/jsplumb/jsplumb) - 競合のないビジュアルコネクティビティライブラリです。[関係図](https://github.com/zadam/trilium/wiki/Relation-map)、[リンク図](https://github.com/zadam/trilium/wiki/Link-map)で使用。 | ||||
| * [jsPlumb](https://github.com/jsplumb/jsplumb) - 競合のないビジュアルコネクティビティライブラリです。[関係図](https://triliumnext.github.io/Docs/Wiki/relation-map)、[リンク図](https://triliumnext.github.io/Docs/Wiki/link-map)で使用。 | ||||
|  | ||||
| ## 🤝 サポート | ||||
|  | ||||
|   | ||||
							
								
								
									
										44
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										44
									
								
								README.md
									
									
									
									
									
								
							| @@ -4,9 +4,9 @@ | ||||
|  | ||||
| TriliumNext Notes is a hierarchical note taking application with focus on building large personal knowledge bases. | ||||
|  | ||||
| See [screenshots](https://triliumnext.github.io/Docs/Wiki/Screenshot%20tour) for quick overview: | ||||
| See [screenshots](https://triliumnext.github.io/Docs/Wiki/screenshot-tour) for quick overview: | ||||
|  | ||||
| <a href="https://triliumnext.github.io/Docs/Wiki/Screenshot%20tour"><img src="https://github.com/TriliumNext/Docs/blob/main/Wiki/images/screenshot.png?raw=true" alt="Trilium Screenshot" width="1000"></a> | ||||
| <a href="https://triliumnext.github.io/Docs/Wiki/screenshot-tour"><img src="https://github.com/TriliumNext/Docs/blob/main/Wiki/images/screenshot.png?raw=true" alt="Trilium Screenshot" width="1000"></a> | ||||
|  | ||||
| ## ⚠️ Why TriliumNext? | ||||
|  | ||||
| @@ -18,7 +18,7 @@ Feel free to join our official discussions and community. We are focused on the | ||||
|  | ||||
| - [Matrix](https://matrix.to/#/#triliumnext:matrix.org) (For synchronous discussions) | ||||
| - [Github Discussions](https://github.com/TriliumNext/Notes/discussions) (For Asynchronous discussions) | ||||
| - [Wiki](https://github.com/zadam/trilium/wiki) (For common how-to questions and user guides) | ||||
| - [Wiki](https://triliumnext.github.io/Docs/) (For common how-to questions and user guides) | ||||
|  | ||||
| The two rooms linked above are mirrored, so you can use either XMPP or Matrix, from any client you prefer, on pretty much any platform under the sun! | ||||
|  | ||||
| @@ -28,25 +28,25 @@ The two rooms linked above are mirrored, so you can use either XMPP or Matrix, f | ||||
|  | ||||
| ## 🎁 Features | ||||
|  | ||||
| * Notes can be arranged into arbitrarily deep tree. Single note can be placed into multiple places in the tree (see [cloning](https://triliumnext.github.io/Docs/Wiki/Cloning-notes)) | ||||
| * Rich WYSIWYG note editing including e.g. tables, images and [math](https://triliumnext.github.io/Docs/Wiki/Text-notes) with markdown [autoformat](https://triliumnext.github.io/Docs/Wiki/Text-notes#autoformat) | ||||
| * Support for editing [notes with source code](https://triliumnext.github.io/Docs/Wiki/Code-notes), including syntax highlighting | ||||
| * Fast and easy [navigation between notes](https://triliumnext.github.io/Docs/Wiki/Note-navigation), full text search and [note hoisting](https://triliumnext.github.io/Docs/Wiki/Note-hoisting) | ||||
| * Seamless [note versioning](https://triliumnext.github.io/Docs/Wiki/Note-revisions) | ||||
| * Note [attributes](https://triliumnext.github.io/Docs/Wiki/Attributes) can be used for note organization, querying and advanced [scripting](https://triliumnext.github.io/Docs/Wiki/Scripts) | ||||
| * [Synchronization](https://triliumnext.github.io/Docs/Wiki/Synchronization) with self-hosted sync server | ||||
| * Notes can be arranged into arbitrarily deep tree. Single note can be placed into multiple places in the tree (see [cloning](https://triliumnext.github.io/Docs/Wiki/cloning-notes) | ||||
| * Rich WYSIWYG note editing including e.g. tables, images and [math](https://triliumnext.github.io/Docs/Wiki/text-notes) with markdown [autoformat](https://triliumnext.github.io/Docs/Wiki/text-notes#autoformat) | ||||
| * Support for editing [notes with source code](https://triliumnext.github.io/Docs/Wiki/code-notes), including syntax highlighting | ||||
| * Fast and easy [navigation between notes](https://triliumnext.github.io/Docs/Wiki/note-navigation), full text search and [note hoisting](https://triliumnext.github.io/Docs/Wiki/note-hoisting) | ||||
| * Seamless [note versioning](https://triliumnext.github.io/Docs/Wiki/note-revisions) | ||||
| * Note [attributes](https://triliumnext.github.io/Docs/Wiki/attributes) can be used for note organization, querying and advanced [scripting](https://triliumnext.github.io/Docs/Wiki/scripts) | ||||
| * [Synchronization](https://triliumnext.github.io/Docs/Wiki/synchronization) with self-hosted sync server | ||||
|   * there's a [3rd party service for hosting synchronisation server](https://trilium.cc/paid-hosting) | ||||
| * [Sharing](https://triliumnext.github.io/Docs/Wiki/Sharing) (publishing) notes to public internet | ||||
| * Strong [note encryption](https://triliumnext.github.io/Docs/Wiki/Protected-notes) with per-note granularity | ||||
| * [Sharing](https://triliumnext.github.io/Docs/Wiki/sharing) (publishing) notes to public internet | ||||
| * Strong [note encryption](https://triliumnext.github.io/Docs/Wiki/protected-notes) with per-note granularity | ||||
| * Sketching diagrams with built-in Excalidraw (note type "canvas") | ||||
| * [Relation maps](https://triliumnext.github.io/Docs/Wiki/Relation-map) and [link maps](https://triliumnext.github.io/Docs/Wiki/Link-map) for visualizing notes and their relations | ||||
| * [Scripting](https://triliumnext.github.io/Docs/Wiki/Scripts) - see [Advanced showcases](https://triliumnext.github.io/Docs/Wiki/Advanced-showcases) | ||||
| * [REST API](https://triliumnext.github.io/Docs/Wiki/ETAPI) for automation | ||||
| * [Relation maps](https://triliumnext.github.io/Docs/Wiki/relation-map) and [link maps](https://triliumnext.github.io/Docs/Wiki/link-map) for visualizing notes and their relations | ||||
| * [Scripting](https://triliumnext.github.io/Docs/Wiki/scripts) - see [Advanced showcases](https://triliumnext.github.io/Docs/Wiki/advanced-showcases) | ||||
| * [REST API](https://triliumnext.github.io/Docs/Wiki/etapi) for automation | ||||
| * Scales well in both usability and performance upwards of 100 000 notes | ||||
| * Touch optimized [mobile frontend](https://triliumnext.github.io/Docs/Wiki/Mobile-frontend) for smartphones and tablets | ||||
| * [Night theme](https://triliumnext.github.io/Docs/Wiki/Themes) | ||||
| * [Evernote](https://triliumnext.github.io/Docs/Wiki/Evernote-import) and [Markdown import & export](https://triliumnext.github.io/Docs/Wiki/Markdown) | ||||
| * [Web Clipper](https://triliumnext.github.io/Docs/Wiki/Web-clipper) for easy saving of web content | ||||
| * Touch optimized [mobile frontend](https://triliumnext.github.io/Docs/Wiki/mobile-frontend) for smartphones and tablets | ||||
| * [Night theme](https://triliumnext.github.io/Docs/Wiki/themes) | ||||
| * [Evernote](https://triliumnext.github.io/Docs/Wiki/evernote-import) and [Markdown import & export](https://triliumnext.github.io/Docs/Wiki/markdown) | ||||
| * [Web Clipper](https://triliumnext.github.io/Docs/Wiki/web-clipper) for easy saving of web content | ||||
|  | ||||
| ✨ Check out the following third-party resources for more TriliumNext related goodies: | ||||
|  | ||||
| @@ -55,10 +55,10 @@ The two rooms linked above are mirrored, so you can use either XMPP or Matrix, f | ||||
|  | ||||
| ## 🏗 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](https://triliumnext.github.io/Docs/Wiki/FAQ#mac-os-support). | ||||
| 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](https://triliumnext.github.io/Docs/Wiki/faq#mac-os-support). | ||||
|  | ||||
| * If you want to use TriliumNext on the desktop, download binary release for your platform from [latest release](https://github.com/TriliumNext/Notes/releases/latest), unzip the package and run ```trilium``` executable. | ||||
| * If you want to install TriliumNext on your own server, follow [this page](https://triliumnext.github.io/Docs/Wiki/Server-installation). | ||||
| * If you want to install TriliumNext on your own server, follow [this page](https://triliumnext.github.io/Docs/Wiki/server-installation). | ||||
|   * Currently only recent versions of Chrome and Firefox are supported (tested) browsers. | ||||
|  | ||||
| TriliumNext will also provided as a Flatpak: | ||||
| @@ -69,7 +69,7 @@ TriliumNext will also provided as a Flatpak: | ||||
|  | ||||
| [See wiki for complete list of documentation pages.](https://triliumnext.github.io/Docs) | ||||
|  | ||||
| You can also read [Patterns of personal knowledge base](https://triliumnext.github.io/Docs/Wiki/Patterns-of-personal-knowledge-base) to get some inspiration on how you might use Trilium. | ||||
| You can also read [Patterns of personal knowledge base](https://triliumnext.github.io/Docs/Wiki/patterns-of-personal-knowledge) to get some inspiration on how you might use Trilium. | ||||
|  | ||||
| ## 💻 Contribute | ||||
|  | ||||
|   | ||||
							
								
								
									
										70
									
								
								README.ru.md
									
									
									
									
									
								
							
							
						
						
									
										70
									
								
								README.ru.md
									
									
									
									
									
								
							| @@ -1,54 +1,44 @@ | ||||
| # Trilium Notes | ||||
| # TriliumNext Notes | ||||
|  | ||||
| [English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md) | [Italian](https://github.com/zadam/trilium/blob/master/README.it.md) | ||||
| [English](https://github.com/TriliumNext/Notes/blob/master/README.md) | [Chinese](https://github.com/TriliumNext/Notes/blob/master/README-ZH_CN.md) | [Russian](https://github.com/TriliumNext/Notes/blob/master/README.ru.md) | [Japanese](https://github.com/TriliumNext/Notes/blob/master/README.ja.md) | [Italian](https://github.com/TriliumNext/Notes/blob/master/README.it.md) | ||||
|  | ||||
| [](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||||
| Trilium Notes – это приложение для заметок с иерархической структурой, ориентированное на создание больших персональных баз знаний. Для быстрого ознакомления посмотрите [скриншот-тур](https://github.com/zadam/trilium/wiki/Screenshot-tour): | ||||
| Trilium Notes – это приложение для заметок с иерархической структурой, ориентированное на создание больших персональных баз знаний. Для быстрого ознакомления посмотрите [скриншот-тур](https://triliumnext.github.io/Docs/Wiki/screenshot-tour): | ||||
|  | ||||
|  | ||||
| <a href="https://triliumnext.github.io/Docs/Wiki/screenshot-tour"><img src="https://github.com/TriliumNext/Docs/blob/main/Wiki/images/screenshot.png?raw=true" alt="Trilium Screenshot" width="1000"></a> | ||||
|  | ||||
| Ukraine is currently suffering from Russian aggression, please consider donating to [one of these charities](https://old.reddit.com/r/ukraine/comments/s6g5un/want_to_support_ukraine_heres_a_list_of_charities/). | ||||
| ## 🎁 Возможности | ||||
|  | ||||
| <img src="https://upload.wikimedia.org/wikipedia/commons/4/49/Flag_of_Ukraine.svg" alt="drawing" width="600"/> | ||||
| <img src="https://signmyrocket.com//uploads/2b2a523cd0c0e76cdbba95a89a9636b2_1676971281.jpg" alt="Trilium Notes supports Ukraine!" width="600"/> | ||||
|  | ||||
| ## Возможности | ||||
|  | ||||
| * Заметки можно расположить в виде дерева произвольной глубины. Отдельную заметку можно разместить в нескольких местах дерева (см. [клонирование](https://github.com/zadam/trilium/wiki/Cloning-notes)) | ||||
| * Продвинутый визуальный редактор (WYSIWYG) позволяет работать с таблицами, изображениями, [формулами](https://github.com/zadam/trilium/wiki/Text-notes#math-support) и разметкой markdown, имеет [автоформатирование](https://github.com/zadam/trilium/wiki/Text-notes#autoformat) | ||||
| * Редактирование [заметок с исходным кодом](https://github.com/zadam/trilium/wiki/Code-notes), включая подсветку синтаксиса | ||||
| * Быстрая и простая [навигация между заметками](https://github.com/zadam/trilium/wiki/Note-navigation), полнотекстовый поиск и [выделение заметок](https://github.com/zadam/trilium/wiki/Note-hoisting) в отдельный блок | ||||
| * Бесшовное [версионирование заметки](https://github.com/zadam/trilium/wiki/Note-revisions) | ||||
| * Специальные [атрибуты](https://github.com/zadam/trilium/wiki/Attributes) позволяют гибко организовать структуру, используются для поиска и продвинутого [скриптинга](https://github.com/zadam/trilium/wiki/Scripts) | ||||
| * [Синхронизация](https://github.com/zadam/trilium/wiki/Synchronization) заметок со своим сервером | ||||
| * Надёжное [шифрование](https://github.com/zadam/trilium/wiki/Protected-notes) с детализацией по каждой заметке | ||||
| * [Карты связей](https://github.com/zadam/trilium/wiki/Relation-map) и [карты ссылок](https://github.com/zadam/trilium/wiki/Link-map) для визуализации их взяимосвязей | ||||
| * [Скрипты](https://github.com/zadam/trilium/wiki/Scripts) - см. [продвинутые примеры](https://github.com/zadam/trilium/wiki/Advanced-showcases) | ||||
| * Заметки можно расположить в виде дерева произвольной глубины. Отдельную заметку можно разместить в нескольких местах дерева (см. [клонирование](https://triliumnext.github.io/Docs/Wiki/cloning-notes)) | ||||
| * Продвинутый визуальный редактор (WYSIWYG) позволяет работать с таблицами, изображениями, [формулами](https://triliumnext.github.io/Docs/Wiki/text-notes#math-support) и разметкой markdown, имеет [автоформатирование](https://triliumnext.github.io/Docs/Wiki/text-notes#autoformat) | ||||
| * Редактирование [заметок с исходным кодом](https://triliumnext.github.io/Docs/Wiki/code-notes), включая подсветку синтаксиса | ||||
| * Быстрая и простая [навигация между заметками](https://triliumnext.github.io/Docs/Wiki/note-navigation), полнотекстовый поиск и [выделение заметок](https://triliumnext.github.io/Docs/Wiki/note-hoisting) в отдельный блок | ||||
| * Бесшовное [версионирование заметки](https://triliumnext.github.io/Docs/Wiki/note-revisions) | ||||
| * Специальные [атрибуты](https://triliumnext.github.io/Docs/Wiki/attributes) позволяют гибко организовать структуру, используются для поиска и продвинутого [скриптинга](https://triliumnext.github.io/Docs/Wiki/scripts) | ||||
| * [Синхронизация](https://triliumnext.github.io/Docs/Wiki/synchronization) заметок со своим сервером | ||||
| * Надёжное [шифрование](https://triliumnext.github.io/Docs/Wiki/protected-notes) с детализацией по каждой заметке | ||||
| * [Карты связей](https://triliumnext.github.io/Docs/Wiki/relation-map) и [карты ссылок](https://triliumnext.github.io/Docs/Wiki/link-map) для визуализации их взяимосвязей | ||||
| * [Скрипты](https://triliumnext.github.io/Docs/Wiki/scripts) - см. [продвинутые примеры](https://triliumnext.github.io/Docs/Wiki/advanced-showcases) | ||||
| * Хорошо масштабируется, как по удобству использования, так и по производительности до 100000 заметок | ||||
| * Оптимизированный [мобильный фронтенд](https://github.com/zadam/trilium/wiki/Mobile-frontend) смартфонов и планшетов | ||||
| * [Темная тема](https://github.com/zadam/trilium/wiki/Themes) | ||||
| * Импорт и экпорт [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import) и данных в [markdown](https://github.com/zadam/trilium/wiki/Markdown) формате | ||||
| * [Web Clipper](https://github.com/zadam/trilium/wiki/Web-clipper) для удобного сохранения веб-контента | ||||
| * Оптимизированный [мобильный фронтенд](https://triliumnext.github.io/Docs/Wiki/mobile-frontend) смартфонов и планшетов | ||||
| * [Темная тема](https://triliumnext.github.io/Docs/Wiki/themes) | ||||
| * Импорт и экпорт [Evernote](https://triliumnext.github.io/Docs/Wiki/evernote-import) и данных в [markdown](https://triliumnext.github.io/Docs/Wiki/markdown) формате | ||||
| * [Web Clipper](https://triliumnext.github.io/Docs/Wiki/web-clipper) для удобного сохранения веб-контента | ||||
|  | ||||
| ## Сборки | ||||
| ## 🏗 Сборки | ||||
|  | ||||
| Trilium предоставляется в виде десктопного приложения (Linux и Windows) или веб-приложения, размещенного на вашем сервере (Linux). Доступна сборка Mac OS, но она [не поддерживается](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support). | ||||
| Trilium предоставляется в виде десктопного приложения (Linux и Windows) или веб-приложения, размещенного на вашем сервере (Linux). Доступна сборка Mac OS, но она [не поддерживается](https://triliumnext.github.io/Docs/Wiki/faq#mac-os-support). | ||||
|  | ||||
| * Если вы хотите использовать Trilium на десктопе, скачайте архив для своей платформы со страницы [релизов](https://github.com/zadam/trilium/releases/latest), распакуйте и запустите исполняемый файл ```trilium```. | ||||
| * Если вы хотите установить Trilium на сервере, следуйте этой [инструкции](https://github.com/zadam/trilium/wiki/Server-installation). | ||||
| * Если вы хотите использовать Trilium на десктопе, скачайте архив для своей платформы со страницы [релизов](https://github.com/TriliumNext/Notes/releases/latest), распакуйте и запустите исполняемый файл ```trilium```. | ||||
| * Если вы хотите установить Trilium на сервере, следуйте этой [инструкции](https://triliumnext.github.io/Docs/Wiki/server-installation). | ||||
|   * В данный момент поддерживаются (протестированы) последние версии браузеров Chrome и Firefox. | ||||
|  | ||||
| ## Документация | ||||
| ## 📝 Документация | ||||
|  | ||||
| [Полный список страниц документации доступен в Wiki.](https://github.com/zadam/trilium/wiki/) | ||||
| [Полный список страниц документации доступен в Wiki.](https://triliumnext.github.io/Docs/) | ||||
|  | ||||
| Вы также можете ознакомиться с [шаблонами персональных баз знаний](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base), чтобы получить представление о том, как можно использовать Trilium. | ||||
| Вы также можете ознакомиться с [шаблонами персональных баз знаний](https://triliumnext.github.io/Docs/Wiki/patterns-of-personal-knowledge), чтобы получить представление о том, как можно использовать Trilium. | ||||
|  | ||||
| ## Участвуйте в разработке | ||||
|  | ||||
| Используйте онлайн среду разработки в браузере | ||||
|  | ||||
| [](https://gitpod.io/#https://github.com/zadam/trilium) | ||||
| ## 💻 Участвуйте в разработке | ||||
|  | ||||
| Или склонируйте на своё устройство и запустите | ||||
| ``` | ||||
| @@ -56,13 +46,13 @@ npm install | ||||
| npm run start-server | ||||
| ``` | ||||
|  | ||||
| ## Благодарности | ||||
| ## 👏 Благодарности | ||||
|  | ||||
| * [CKEditor 5](https://github.com/ckeditor/ckeditor5) - лучший WYSIWYG редактор, очень активная и внимательная команда. | ||||
| * [FancyTree](https://github.com/mar10/fancytree) - многофункциональная библиотека для создания древовидных структур. Вне конкуренции. Без него Trilium Notes не были бы таким. | ||||
| * [CodeMirror](https://github.com/codemirror/CodeMirror) - редактор кода с поддержкой огромного количество языков. | ||||
| * [jsPlumb](https://github.com/jsplumb/jsplumb) - библиотека для визуализации связей. Вне конкуренции. Используется в [картах связей](https://github.com/zadam/trilium/wiki/Relation-map) и [картах ссылок](https://github.com/zadam/trilium/wiki/Link-map). | ||||
| * [jsPlumb](https://github.com/jsplumb/jsplumb) - библиотека для визуализации связей. Вне конкуренции. Используется в [картах связей](https://triliumnext.github.io/Docs/Wiki/relation-map) и [картах ссылок](https://triliumnext.github.io/Docs/Wiki/link-map). | ||||
|  | ||||
| ## Лицензия | ||||
| ## 🔑 Лицензия | ||||
|  | ||||
| Эта программа является бесплатным программным обеспечением: вы можете распространять и/или изменять ее в соответствии с условиями GNU Affero General Public License, опубликованной Free Software Foundation, либо версии 3 Лицензии, либо (по вашему выбору) любой более поздней версии. | ||||
|   | ||||
| @@ -35,7 +35,7 @@ echo "Packaging linux x64 electron build" | ||||
| BUILD_DIR=./dist/trilium-linux-x64 | ||||
| rm -rf "$BUILD_DIR" | ||||
|  | ||||
| mv "./dist/Trilium Notes-linux-x64" "$BUILD_DIR" | ||||
| mv "./dist/TriliumNext Notes-linux-x64" "$BUILD_DIR" | ||||
|  | ||||
| cp images/app-icons/png/128x128.png "$BUILD_DIR"/icon.png | ||||
| cp bin/tpl/anonymize-database.sql "$BUILD_DIR"/ | ||||
|   | ||||
| @@ -21,7 +21,7 @@ BUILD_DIR=./dist/trilium-mac-arm64 | ||||
| rm -rf $BUILD_DIR | ||||
|  | ||||
| # Mac build has by default useless directory level | ||||
| mv "./dist/Trilium Notes-darwin-arm64" $BUILD_DIR | ||||
| mv "./dist/TriliumNext Notes-darwin-arm64" $BUILD_DIR | ||||
|  | ||||
| cp bin/tpl/anonymize-database.sql $BUILD_DIR/ | ||||
|  | ||||
|   | ||||
| @@ -21,7 +21,7 @@ BUILD_DIR=./dist/trilium-mac-x64 | ||||
| rm -rf $BUILD_DIR | ||||
|  | ||||
| # Mac build has by default useless directory level | ||||
| mv "./dist/Trilium Notes-darwin-x64" $BUILD_DIR | ||||
| mv "./dist/TriliumNext Notes-darwin-x64" $BUILD_DIR | ||||
|  | ||||
| cp bin/tpl/anonymize-database.sql $BUILD_DIR/ | ||||
|  | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| #!/usr/bin/env bash | ||||
|  | ||||
| PKG_DIR=dist/trilium-linux-x64-server | ||||
| NODE_VERSION=18.18.2 | ||||
| NODE_VERSION=20.15.1 | ||||
|  | ||||
| if [ "$1" != "DONTCOPY" ] | ||||
| then | ||||
|   | ||||
| @@ -25,7 +25,7 @@ echo "Packaging windows x64 electron build" | ||||
| BUILD_DIR=./dist/trilium-windows-x64 | ||||
| rm -rf $BUILD_DIR | ||||
|  | ||||
| mv "./dist/Trilium Notes-win32-x64" $BUILD_DIR | ||||
| mv "./dist/TriliumNext Notes-win32-x64" $BUILD_DIR | ||||
|  | ||||
| cp bin/tpl/anonymize-database.sql $BUILD_DIR/ | ||||
|  | ||||
| @@ -34,9 +34,11 @@ rm -rf $BUILD_DIR/dump-db/node_modules | ||||
|  | ||||
| cp bin/tpl/trilium-{portable,no-cert-check,safe-mode}.bat $BUILD_DIR/ | ||||
|  | ||||
| echo "Zipping windows x64 electron distribution..." | ||||
| VERSION=`jq -r ".version" package.json` | ||||
| if [ "$1" != "DONTPACK" ] | ||||
| then | ||||
|   echo "Zipping windows x64 electron distribution..." | ||||
|   VERSION=`jq -r ".version" package.json` | ||||
|  | ||||
| cd dist | ||||
|  | ||||
| zip -r9 trilium-windows-x64-${VERSION}.zip trilium-windows-x64 | ||||
|   cd dist | ||||
|   zip -r9 trilium-windows-x64-${VERSION}.zip trilium-windows-x64 | ||||
| fi | ||||
| @@ -35,26 +35,36 @@ for f in 'package.json' 'package-lock.json' 'README.md' 'LICENSE' 'config-sample | ||||
|     cp "$f" "$DIR"/ | ||||
| done | ||||
|  | ||||
| # Patch package.json main | ||||
| sed -i 's/.\/dist\/electron.js/electron.js/g' "$DIR/package.json" | ||||
|  | ||||
| script_dir=$(realpath $(dirname $0)) | ||||
| cp -Rv "$script_dir/../build/src" "$DIR" | ||||
| cp -R "$script_dir/../build/src" "$DIR" | ||||
| cp "$script_dir/../build/electron.js" "$DIR" | ||||
|  | ||||
| # run in subshell (so we return to original dir) | ||||
| (cd $DIR && npm install --only=prod) | ||||
| (cd $DIR && npm install --omit=dev) | ||||
|  | ||||
| if [[ -d "$DIR"/node_modules ]]; then | ||||
| # cleanup of useless files in dependencies | ||||
|     for d in 'image-q/demo' 'better-sqlite3/Release' 'better-sqlite3/deps/sqlite3.tar.gz' '@jimp/plugin-print/fonts' 'jimp/browser' 'jimp/fonts'; do | ||||
|         [[ -e "$DIR"/node_modules/"$d" ]] && rm -rv "$DIR"/node_modules/"$d" | ||||
|     # cleanup of useless files in dependencies | ||||
|     for d in 'image-q/demo' \ | ||||
|         '@excalidraw/excalidraw/dist/excalidraw-assets-dev' '@excalidraw/excalidraw/dist/excalidraw.development.js' '@excalidraw/excalidraw/dist/excalidraw-with-preact.development.js' \ | ||||
|         'mermaid/dist/mermaid.js' \ | ||||
|         'boxicons/svg' 'boxicons/node_modules/react'/* \ | ||||
|         'better-sqlite3/Release' 'better-sqlite3/deps/sqlite3.tar.gz' 'better-sqlite3/deps/sqlite3' \ | ||||
|         '@jimp/plugin-print/fonts' 'jimp/browser' 'jimp/fonts'; do | ||||
|         [[ -e "$DIR"/node_modules/"$d" ]] && rm -r "$DIR"/node_modules/"$d" | ||||
|     done | ||||
|  | ||||
| # delete all tests (there are often large images as test file for jimp etc.) | ||||
|     for d in 'test' 'docs' 'demo'; do | ||||
|         find "$DIR"/node_modules -name "$d" -exec rm -rf {} \; | ||||
|     # delete all tests (there are often large images as test file for jimp etc.) | ||||
|     for d in 'test' 'docs' 'demo' 'example'; do | ||||
|         find "$DIR"/node_modules -name "$d" -exec rm -rf {} + | ||||
|     done | ||||
| fi | ||||
|  | ||||
| find $DIR/libraries -name "*.map" -type f -delete | ||||
| find $DIR/node_modules -name "*.map" -type f -delete | ||||
| find $DIR -name "*.ts" -type f -delete | ||||
|  | ||||
| d="$DIR"/src/public | ||||
| [[ -d "$d"/app-dist ]] || mkdir -pv "$d"/app-dist | ||||
|   | ||||
							
								
								
									
										1
									
								
								bin/docs/.env.example
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								bin/docs/.env.example
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| SHARE_URL=https://notes.example.com/share/4yYHqKbLovVY | ||||
							
								
								
									
										2
									
								
								bin/docs/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								bin/docs/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| output | ||||
| .env | ||||
							
								
								
									
										10
									
								
								bin/docs/index.template.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								bin/docs/index.template.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | ||||
| <!DOCTYPE html> | ||||
| <html> | ||||
|     <head> | ||||
|         <meta http-equiv="refresh" content="0; url=./{{ROOT_NOTE_ID}}.html" /> | ||||
|     </head> | ||||
|      | ||||
|     <body> | ||||
|      | ||||
|     </body> | ||||
| </html> | ||||
							
								
								
									
										34
									
								
								bin/docs/prepare.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										34
									
								
								bin/docs/prepare.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,34 @@ | ||||
| #!/usr/bin/env bash | ||||
|  | ||||
| if [ ! -f .env ]; then | ||||
|     echo "Missing .env file, cannot proceed." | ||||
|     exit 1 | ||||
| fi | ||||
|  | ||||
| script_dir=$(realpath $(dirname $0)) | ||||
| output_dir="$script_dir/../docs" | ||||
| mkdir -p "$output_dir" | ||||
| rm -f "$output_dir"/* | ||||
| rm -rf "$output_dir"/{assets,share} | ||||
|  | ||||
| source ./.env | ||||
|  | ||||
| # Download everything in output/notes.example.com/share/... | ||||
| share_url="$SHARE_PROTOCOL://$SHARE_HOST/share/$ROOT_NOTE_ID" | ||||
| wget -rpEk -e robots=off "$share_url" -P "$output_dir" | ||||
|  | ||||
| # Get rid of the domain in the output folder | ||||
| mv "$output_dir/$SHARE_HOST"/* "$output_dir/" | ||||
| rmdir "$output_dir/$SHARE_HOST" | ||||
|  | ||||
| # Create home page with redirect | ||||
| index_dest_path="$output_dir/index.html" | ||||
| cp index.template.html "$index_dest_path" | ||||
| sed -i "s/{{ROOT_NOTE_ID}}/$ROOT_NOTE_ID/g" "$index_dest_path" | ||||
|  | ||||
| # Rewrite links to get rid of the share folder | ||||
| sed -i "s/<link href=\"\\.\\./<link href=\"\\./g" "$output_dir/share"/*.html | ||||
| sed -i "s/<script src=\"\\.\\./<script src=\"\\./g" "$output_dir/share"/*.html | ||||
| sed -i "s/rel=\"shortcut icon\" href=\"\\.\\./rel=\"shortcut icon\" href=\"\\./g" "$output_dir/share"/*.html | ||||
| mv "$output_dir/share"/* "$output_dir" | ||||
| rmdir "$output_dir/share" | ||||
							
								
								
									
										5
									
								
								bin/docs/preview.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								bin/docs/preview.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| #!/usr/bin/env bash | ||||
|  | ||||
| script_dir=$(realpath $(dirname $0)) | ||||
| output_dir="$script_dir/../docs" | ||||
| httpd -fv -p 127.0.0.1:8089 -h "$output_dir" | ||||
| @@ -32,7 +32,7 @@ mv package.json.tmp package.json | ||||
|  | ||||
| git add package.json | ||||
|  | ||||
| echo 'export = { buildDate:"'`date --iso-8601=seconds`'", buildRevision: "'`git log -1 --format="%H"`'" };' > src/services/build.ts | ||||
| npm run update-build-info | ||||
|  | ||||
| git add src/services/build.ts | ||||
|  | ||||
| @@ -65,7 +65,9 @@ if [[ $TAG == *"beta"* ]]; then | ||||
|   EXTRA=--prerelease | ||||
| fi | ||||
|  | ||||
| echo "$GITHUB_CLI_AUTH_TOKEN" | gh auth login --with-token | ||||
| if [ ! -z "$GITHUB_CLI_AUTH_TOKEN" ]; then | ||||
|   echo "$GITHUB_CLI_AUTH_TOKEN" | gh auth login --with-token | ||||
| fi | ||||
|  | ||||
| gh release create "$TAG" \ | ||||
|     --title "$TAG release" \ | ||||
|   | ||||
							
								
								
									
										25
									
								
								bin/update-build-info.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								bin/update-build-info.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| import child_process from "child_process"; | ||||
| import fs from "fs"; | ||||
|  | ||||
| function getBuildDate() { | ||||
|     const now = new Date(); | ||||
|     now.setMilliseconds(0); | ||||
|     return now | ||||
|         .toISOString() | ||||
|         .replace(".000", ""); | ||||
| } | ||||
|  | ||||
| function getGitRevision() { | ||||
|     return child_process.execSync('git log -1 --format="%H"') | ||||
|         .toString("utf-8") | ||||
|         .trimEnd(); | ||||
| } | ||||
|  | ||||
| const output = `\ | ||||
| export = { | ||||
|     buildDate: "${getBuildDate()}", | ||||
|     buildRevision: "${getGitRevision()}" | ||||
| }; | ||||
| `; | ||||
|  | ||||
| fs.writeFileSync("src/services/build.ts", output); | ||||
							
								
								
									
										126
									
								
								docs/4yYHqKbLovVX.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										126
									
								
								docs/4yYHqKbLovVX.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,126 @@ | ||||
| <!DOCTYPE html> | ||||
| <html lang="en"> | ||||
| <head> | ||||
|     <meta charset="utf-8"> | ||||
|      | ||||
|  | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||
|      | ||||
|     <link rel="shortcut icon" href="./favicon.ico"> | ||||
|      | ||||
|     <script src="./assets/v0.63.6/app-dist/share.js"></script> | ||||
|      | ||||
|         <link href="./assets/v0.63.6/libraries/normalize.min.css" rel="stylesheet"> | ||||
|         <link href="./assets/v0.63.6/stylesheets/share.css" rel="stylesheet"> | ||||
|      | ||||
|      | ||||
|         <link href="./assets/v0.63.6/libraries/ckeditor/ckeditor-content.css" rel="stylesheet"> | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|     <title>Developer's Guide</title> | ||||
| </head> | ||||
| <body data-note-id="4yYHqKbLovVX" data-ancestor-note-id="4yYHqKbLovVX"> | ||||
| <div id="layout"> | ||||
|     <div id="main"> | ||||
|          | ||||
|  | ||||
|         <h1 id="title">Developer's Guide</h1> | ||||
|  | ||||
|          | ||||
|  | ||||
|          | ||||
|  | ||||
|          | ||||
|             <nav id="childLinks" class="grid"> | ||||
|                  | ||||
|  | ||||
|                 <ul> | ||||
|                      | ||||
|                         <li> | ||||
|                             <a href="hkrBX8KE1HQl.html"  | ||||
|                                class="type-text">Internationalisation</a> | ||||
|                         </li> | ||||
|                      | ||||
|                         <li> | ||||
|                             <a href="VS22Hq5PBFNf.html"  | ||||
|                                class="type-text">Dependency Management</a> | ||||
|                         </li> | ||||
|                      | ||||
|                 </ul> | ||||
|             </nav> | ||||
|          | ||||
|     </div> | ||||
|  | ||||
|      | ||||
|         <button id="toggleMenuButton"></button> | ||||
|  | ||||
|         <nav id="menu"> | ||||
|              | ||||
| <p> | ||||
|      | ||||
|  | ||||
|      | ||||
|     <strong>Developer's Guide</strong> | ||||
|      | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <ul> | ||||
|      | ||||
|         <li> | ||||
|              | ||||
| <p> | ||||
|      | ||||
|  | ||||
|      | ||||
|     <a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation</a> | ||||
|      | ||||
| </p> | ||||
|  | ||||
|  | ||||
|  | ||||
|         </li> | ||||
|      | ||||
|         <li> | ||||
|              | ||||
| <p> | ||||
|      | ||||
|  | ||||
|      | ||||
|     <a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a> | ||||
|      | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <ul> | ||||
|      | ||||
|         <li> | ||||
|              | ||||
| <p> | ||||
|      | ||||
|  | ||||
|      | ||||
|     <a class="type-text" href="QXCi6Y1SYulw.html">Adding a new client library</a> | ||||
|      | ||||
| </p> | ||||
|  | ||||
|  | ||||
|  | ||||
|         </li> | ||||
|      | ||||
| </ul> | ||||
|  | ||||
|  | ||||
|         </li> | ||||
|      | ||||
| </ul> | ||||
|  | ||||
|  | ||||
|         </nav> | ||||
|      | ||||
| </div> | ||||
| </body> | ||||
| </html> | ||||
							
								
								
									
										165
									
								
								docs/QXCi6Y1SYulw.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										165
									
								
								docs/QXCi6Y1SYulw.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,165 @@ | ||||
| <!DOCTYPE html> | ||||
| <html lang="en"> | ||||
| <head> | ||||
|     <meta charset="utf-8"> | ||||
|      | ||||
|  | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||
|      | ||||
|     <link rel="shortcut icon" href="./favicon.ico"> | ||||
|      | ||||
|     <script src="./assets/v0.63.6/app-dist/share.js"></script> | ||||
|      | ||||
|         <link href="./assets/v0.63.6/libraries/normalize.min.css" rel="stylesheet"> | ||||
|         <link href="./assets/v0.63.6/stylesheets/share.css" rel="stylesheet"> | ||||
|      | ||||
|      | ||||
|         <link href="./assets/v0.63.6/libraries/ckeditor/ckeditor-content.css" rel="stylesheet"> | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|     <title>Adding a new client library</title> | ||||
| </head> | ||||
| <body data-note-id="QXCi6Y1SYulw" data-ancestor-note-id="4yYHqKbLovVX"> | ||||
| <div id="layout"> | ||||
|     <div id="main"> | ||||
|          | ||||
|             <nav id="parentLink"> | ||||
|                 parent: <a href="VS22Hq5PBFNf.html" | ||||
|                            class="type-text">Dependency Management</a> | ||||
|             </nav> | ||||
|          | ||||
|  | ||||
|         <h1 id="title">Adding a new client library</h1> | ||||
|  | ||||
|          | ||||
|  | ||||
|          | ||||
|             <div id="content" class="type-text ck-content"> | ||||
|                 <p>In the past some libraries have been copy-pasted (and adapted if needed) to the repository. However, new libraries must be obtained exclusively through npm.</p><p>The first step is to install the desired library. As an example we are going to install <code>i18next</code>:</p><pre><code class="language-text-plain">npm i i18next</code></pre><h3>Step 1. Understanding the structure of the import</h3><p>After installing the dependency, it's important to know how it's structured. You can do this by looking at the directory structure of the newly imported dependency:</p><pre><code class="language-text-plain">$ tree node_modules/i18next | ||||
| node_modules/i18next | ||||
| ├── dist | ||||
| │   ├── cjs | ||||
| │   │   └── i18next.js | ||||
| │   ├── esm | ||||
| │   │   ├── i18next.bundled.js | ||||
| │   │   ├── i18next.js | ||||
| │   │   └── package.json | ||||
| │   └── umd | ||||
| │       ├── i18next.js | ||||
| │       └── i18next.min.js | ||||
| ├── i18next.js | ||||
| ├── i18next.min.js | ||||
| ├── index.d.mts | ||||
| ├── index.d.ts | ||||
| ├── index.js | ||||
| ├── index.v4.d.ts | ||||
| ├── LICENSE | ||||
| ├── package.json | ||||
| ├── README.md | ||||
| └── typescript | ||||
|     ├── helpers.d.ts | ||||
|     ├── options.d.ts | ||||
|     ├── t.d.ts | ||||
|     └── t.v4.d.ts</code></pre><p>Generally you should be looking for a <code>.min.js</code> file. Note that the <code>esm</code> and <code>cjs</code> variants generally don't work, we are looking for the classic, no module dependency.</p><h3>Step 2. Exposing the library from the server</h3><p>The library must be delivered by the server and this is done via <code>src/routes/assets.ts</code>. In the <code>register</code> function, add a new entry near the bottom of the function:</p><pre><code class="language-application-javascript-env-frontend">app.use(`/${assetPath}/node_modules/i18next/`, persistentCacheStatic(path.join(srcRoot, "..", 'node_modules/i18next/')));</code></pre><h3>Step 3. Adding it to the library loader</h3><p>The library loader is a client module which is in charge of downloading the library from the server and importing it. The loader is located in <code>src/public/app/services/library_loader.js</code>.</p><p>To add a new library, start by creating a constant for it, with the value pointing to the minified JS identified at the first step:</p><pre><code class="language-application-javascript-env-frontend">const I18NEXT = { | ||||
|     js: [ | ||||
|         "node_modules/i18next/i18next.min.js" | ||||
|     ] | ||||
| };</code></pre><p>Then add it to the <code>export default</code> section:</p><pre><code class="language-text-x-diff"> export default { | ||||
|      requireCss, | ||||
|      requireLibrary, | ||||
|      CKEDITOR, | ||||
|      CODE_MIRROR, | ||||
|      ESLINT, | ||||
|      RELATION_MAP, | ||||
|      PRINT_THIS, | ||||
|      CALENDAR_WIDGET, | ||||
|      KATEX, | ||||
|      WHEEL_ZOOM, | ||||
|      FORCE_GRAPH, | ||||
|      MERMAID, | ||||
|      EXCALIDRAW, | ||||
| -    MARKJS | ||||
| +    MARKJS, | ||||
| +    I18NEXT | ||||
|  }</code></pre><h3>Step 4. Using the library</h3><p>To import the library, simply use the following mechanism:</p><pre><code class="language-text-x-diff">import library_loader from "./library_loader.js"; | ||||
|  | ||||
| await library_loader.requireLibrary(library_loader.I18NEXT);</code></pre><p>Make sure to replace <code>I18NEXT</code> with the library that was created at the previous steps.</p><p>Note that because we are not using a module management mechanism such as ES Modules or Common.js modules, the <code>requireLibrary</code> method does not actually return anything. </p><p>To benefit from the library, it must export on its own an object in <code>window</code>.</p><p>In the case of <code>i18next</code>, it sets <code>window.i18next</code> and that can be used directly:</p><pre><code class="language-text-x-diff">i18next.init({});</code></pre> | ||||
|             </div> | ||||
|          | ||||
|  | ||||
|          | ||||
|     </div> | ||||
|  | ||||
|      | ||||
|         <button id="toggleMenuButton"></button> | ||||
|  | ||||
|         <nav id="menu"> | ||||
|              | ||||
| <p> | ||||
|      | ||||
|  | ||||
|      | ||||
|     <a class="type-text" href="4yYHqKbLovVX.html">Developer's Guide</a> | ||||
|      | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <ul> | ||||
|      | ||||
|         <li> | ||||
|              | ||||
| <p> | ||||
|      | ||||
|  | ||||
|      | ||||
|     <a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation</a> | ||||
|      | ||||
| </p> | ||||
|  | ||||
|  | ||||
|  | ||||
|         </li> | ||||
|      | ||||
|         <li> | ||||
|              | ||||
| <p> | ||||
|      | ||||
|  | ||||
|      | ||||
|     <a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a> | ||||
|      | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <ul> | ||||
|      | ||||
|         <li> | ||||
|              | ||||
| <p> | ||||
|      | ||||
|  | ||||
|      | ||||
|     <strong>Adding a new client library</strong> | ||||
|      | ||||
| </p> | ||||
|  | ||||
|  | ||||
|  | ||||
|         </li> | ||||
|      | ||||
| </ul> | ||||
|  | ||||
|  | ||||
|         </li> | ||||
|      | ||||
| </ul> | ||||
|  | ||||
|  | ||||
|         </nav> | ||||
|      | ||||
| </div> | ||||
| </body> | ||||
| </html> | ||||
							
								
								
									
										126
									
								
								docs/VS22Hq5PBFNf.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										126
									
								
								docs/VS22Hq5PBFNf.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,126 @@ | ||||
| <!DOCTYPE html> | ||||
| <html lang="en"> | ||||
| <head> | ||||
|     <meta charset="utf-8"> | ||||
|      | ||||
|  | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||
|      | ||||
|     <link rel="shortcut icon" href="./favicon.ico"> | ||||
|      | ||||
|     <script src="./assets/v0.63.6/app-dist/share.js"></script> | ||||
|      | ||||
|         <link href="./assets/v0.63.6/libraries/normalize.min.css" rel="stylesheet"> | ||||
|         <link href="./assets/v0.63.6/stylesheets/share.css" rel="stylesheet"> | ||||
|      | ||||
|      | ||||
|         <link href="./assets/v0.63.6/libraries/ckeditor/ckeditor-content.css" rel="stylesheet"> | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|     <title>Dependency Management</title> | ||||
| </head> | ||||
| <body data-note-id="VS22Hq5PBFNf" data-ancestor-note-id="4yYHqKbLovVX"> | ||||
| <div id="layout"> | ||||
|     <div id="main"> | ||||
|          | ||||
|             <nav id="parentLink"> | ||||
|                 parent: <a href="4yYHqKbLovVX.html" | ||||
|                            class="type-text">Developer's Guide</a> | ||||
|             </nav> | ||||
|          | ||||
|  | ||||
|         <h1 id="title">Dependency Management</h1> | ||||
|  | ||||
|          | ||||
|  | ||||
|          | ||||
|  | ||||
|          | ||||
|             <nav id="childLinks" class="grid"> | ||||
|                  | ||||
|  | ||||
|                 <ul> | ||||
|                      | ||||
|                         <li> | ||||
|                             <a href="QXCi6Y1SYulw.html"  | ||||
|                                class="type-text">Adding a new client library</a> | ||||
|                         </li> | ||||
|                      | ||||
|                 </ul> | ||||
|             </nav> | ||||
|          | ||||
|     </div> | ||||
|  | ||||
|      | ||||
|         <button id="toggleMenuButton"></button> | ||||
|  | ||||
|         <nav id="menu"> | ||||
|              | ||||
| <p> | ||||
|      | ||||
|  | ||||
|      | ||||
|     <a class="type-text" href="4yYHqKbLovVX.html">Developer's Guide</a> | ||||
|      | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <ul> | ||||
|      | ||||
|         <li> | ||||
|              | ||||
| <p> | ||||
|      | ||||
|  | ||||
|      | ||||
|     <a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation</a> | ||||
|      | ||||
| </p> | ||||
|  | ||||
|  | ||||
|  | ||||
|         </li> | ||||
|      | ||||
|         <li> | ||||
|              | ||||
| <p> | ||||
|      | ||||
|  | ||||
|      | ||||
|     <strong>Dependency Management</strong> | ||||
|      | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <ul> | ||||
|      | ||||
|         <li> | ||||
|              | ||||
| <p> | ||||
|      | ||||
|  | ||||
|      | ||||
|     <a class="type-text" href="QXCi6Y1SYulw.html">Adding a new client library</a> | ||||
|      | ||||
| </p> | ||||
|  | ||||
|  | ||||
|  | ||||
|         </li> | ||||
|      | ||||
| </ul> | ||||
|  | ||||
|  | ||||
|         </li> | ||||
|      | ||||
| </ul> | ||||
|  | ||||
|  | ||||
|         </nav> | ||||
|      | ||||
| </div> | ||||
| </body> | ||||
| </html> | ||||
							
								
								
									
										23
									
								
								docs/assets/v0.63.6/app-dist/share.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								docs/assets/v0.63.6/app-dist/share.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| /** | ||||
|  * Fetch note with given ID from backend | ||||
|  * | ||||
|  * @param noteId of the given note to be fetched. If false, fetches current note. | ||||
|  */ | ||||
| async function fetchNote(noteId = null) { | ||||
|     if (!noteId) { | ||||
|         noteId = document.body.getAttribute("data-note-id"); | ||||
|     } | ||||
|  | ||||
|     const resp = await fetch(`api/notes/${noteId}`); | ||||
|  | ||||
|     return await resp.json(); | ||||
| } | ||||
|  | ||||
| document.addEventListener('DOMContentLoaded', () => { | ||||
|     const toggleMenuButton = document.getElementById('toggleMenuButton'); | ||||
|     const layout = document.getElementById('layout'); | ||||
|  | ||||
|     if (toggleMenuButton && layout) { | ||||
|         toggleMenuButton.addEventListener('click', () => layout.classList.toggle('showMenu')); | ||||
|     } | ||||
| }, false); | ||||
							
								
								
									
										551
									
								
								docs/assets/v0.63.6/libraries/ckeditor/ckeditor-content.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										551
									
								
								docs/assets/v0.63.6/libraries/ckeditor/ckeditor-content.css
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,551 @@ | ||||
| /* !!!!!! TRILIUM CUSTOM CHANGES !!!!!! */ | ||||
|  | ||||
| .printed-content .ck-widget__selection-handle, .printed-content .ck-widget__type-around { /* gets rid of triangles: https://github.com/zadam/trilium/issues/1129 */ | ||||
|     display: none; | ||||
| } | ||||
|  | ||||
| /* | ||||
|  * CKEditor 5 (v41.0.0) content styles. | ||||
|  * Generated on Fri, 26 Jan 2024 10:23:49 GMT. | ||||
|  * For more information, check out https://ckeditor.com/docs/ckeditor5/latest/installation/advanced/content-styles.html | ||||
|  */ | ||||
|  | ||||
| :root { | ||||
|     --ck-color-image-caption-background: hsl(0, 0%, 97%); | ||||
|     --ck-color-image-caption-text: hsl(0, 0%, 20%); | ||||
|     --ck-color-mention-background: hsla(341, 100%, 30%, 0.1); | ||||
|     --ck-color-mention-text: hsl(341, 100%, 30%); | ||||
|     --ck-color-selector-caption-background: hsl(0, 0%, 97%); | ||||
|     --ck-color-selector-caption-text: hsl(0, 0%, 20%); | ||||
|     --ck-highlight-marker-blue: hsl(201, 97%, 72%); | ||||
|     --ck-highlight-marker-green: hsl(120, 93%, 68%); | ||||
|     --ck-highlight-marker-pink: hsl(345, 96%, 73%); | ||||
|     --ck-highlight-marker-yellow: hsl(60, 97%, 73%); | ||||
|     --ck-highlight-pen-green: hsl(112, 100%, 27%); | ||||
|     --ck-highlight-pen-red: hsl(0, 85%, 49%); | ||||
|     --ck-image-style-spacing: 1.5em; | ||||
|     --ck-inline-image-style-spacing: calc(var(--ck-image-style-spacing) / 2); | ||||
|     --ck-todo-list-checkmark-size: 16px; | ||||
| } | ||||
|  | ||||
| /* @ckeditor/ckeditor5-table/theme/tablecolumnresize.css */ | ||||
| .ck-content .table .ck-table-resized { | ||||
|     table-layout: fixed; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-table/theme/tablecolumnresize.css */ | ||||
| .ck-content .table table { | ||||
|     overflow: hidden; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-table/theme/tablecolumnresize.css */ | ||||
| .ck-content .table td, | ||||
| .ck-content .table th { | ||||
|     overflow-wrap: break-word; | ||||
|     position: relative; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-table/theme/table.css */ | ||||
| .ck-content .table { | ||||
|     margin: 0.9em auto; | ||||
|     display: table; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-table/theme/table.css */ | ||||
| .ck-content .table table { | ||||
|     border-collapse: collapse; | ||||
|     border-spacing: 0; | ||||
|     width: 100%; | ||||
|     height: 100%; | ||||
|     border: 1px double hsl(0, 0%, 70%); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-table/theme/table.css */ | ||||
| .ck-content .table table td, | ||||
| .ck-content .table table th { | ||||
|     min-width: 2em; | ||||
|     padding: .4em; | ||||
|     border: 1px solid hsl(0, 0%, 75%); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-table/theme/table.css */ | ||||
| .ck-content .table table th { | ||||
|     font-weight: bold; | ||||
|     background: hsla(0, 0%, 0%, 5%); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-table/theme/table.css */ | ||||
| .ck-content[dir="rtl"] .table th { | ||||
|     text-align: right; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-table/theme/table.css */ | ||||
| .ck-content[dir="ltr"] .table th { | ||||
|     text-align: left; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-table/theme/tablecaption.css */ | ||||
| .ck-content .table > figcaption { | ||||
|     display: table-caption; | ||||
|     caption-side: top; | ||||
|     word-break: break-word; | ||||
|     text-align: center; | ||||
|     color: var(--ck-color-selector-caption-text); | ||||
|     background-color: var(--ck-color-selector-caption-background); | ||||
|     padding: .6em; | ||||
|     font-size: .75em; | ||||
|     outline-offset: -1px; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-page-break/theme/pagebreak.css */ | ||||
| .ck-content .page-break { | ||||
|     position: relative; | ||||
|     clear: both; | ||||
|     padding: 5px 0; | ||||
|     display: flex; | ||||
|     align-items: center; | ||||
|     justify-content: center; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-page-break/theme/pagebreak.css */ | ||||
| .ck-content .page-break::after { | ||||
|     content: ''; | ||||
|     position: absolute; | ||||
|     border-bottom: 2px dashed hsl(0, 0%, 77%); | ||||
|     width: 100%; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-page-break/theme/pagebreak.css */ | ||||
| .ck-content .page-break__label { | ||||
|     position: relative; | ||||
|     z-index: 1; | ||||
|     padding: .3em .6em; | ||||
|     display: block; | ||||
|     text-transform: uppercase; | ||||
|     border: 1px solid hsl(0, 0%, 77%); | ||||
|     border-radius: 2px; | ||||
|     font-family: Helvetica, Arial, Tahoma, Verdana, Sans-Serif; | ||||
|     font-size: 0.75em; | ||||
|     font-weight: bold; | ||||
|     color: hsl(0, 0%, 20%); | ||||
|     background: hsl(0, 0%, 100%); | ||||
|     box-shadow: 2px 2px 1px hsla(0, 0%, 0%, 0.15); | ||||
|     -webkit-user-select: none; | ||||
|     -moz-user-select: none; | ||||
|     -ms-user-select: none; | ||||
|     user-select: none; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-media-embed/theme/mediaembed.css */ | ||||
| .ck-content .media { | ||||
|     clear: both; | ||||
|     margin: 0.9em 0; | ||||
|     display: block; | ||||
|     min-width: 15em; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-content .todo-list { | ||||
|     list-style: none; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-content .todo-list li { | ||||
|     position: relative; | ||||
|     margin-bottom: 5px; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-content .todo-list li .todo-list { | ||||
|     margin-top: 5px; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-content .todo-list .todo-list__label > input { | ||||
|     -webkit-appearance: none; | ||||
|     display: inline-block; | ||||
|     position: relative; | ||||
|     width: var(--ck-todo-list-checkmark-size); | ||||
|     height: var(--ck-todo-list-checkmark-size); | ||||
|     vertical-align: middle; | ||||
|     border: 0; | ||||
|     left: -25px; | ||||
|     margin-right: -15px; | ||||
|     right: 0; | ||||
|     margin-left: 0; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-content[dir=rtl] .todo-list .todo-list__label > input { | ||||
|     left: 0; | ||||
|     margin-right: 0; | ||||
|     right: -25px; | ||||
|     margin-left: -15px; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-content .todo-list .todo-list__label > input::before { | ||||
|     display: block; | ||||
|     position: absolute; | ||||
|     box-sizing: border-box; | ||||
|     content: ''; | ||||
|     width: 100%; | ||||
|     height: 100%; | ||||
|     border: 1px solid hsl(0, 0%, 20%); | ||||
|     border-radius: 2px; | ||||
|     transition: 250ms ease-in-out box-shadow; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-content .todo-list .todo-list__label > input::after { | ||||
|     display: block; | ||||
|     position: absolute; | ||||
|     box-sizing: content-box; | ||||
|     pointer-events: none; | ||||
|     content: ''; | ||||
|     left: calc( var(--ck-todo-list-checkmark-size) / 3 ); | ||||
|     top: calc( var(--ck-todo-list-checkmark-size) / 5.3 ); | ||||
|     width: calc( var(--ck-todo-list-checkmark-size) / 5.3 ); | ||||
|     height: calc( var(--ck-todo-list-checkmark-size) / 2.6 ); | ||||
|     border-style: solid; | ||||
|     border-color: transparent; | ||||
|     border-width: 0 calc( var(--ck-todo-list-checkmark-size) / 8 ) calc( var(--ck-todo-list-checkmark-size) / 8 ) 0; | ||||
|     transform: rotate(45deg); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-content .todo-list .todo-list__label > input[checked]::before { | ||||
|     background: hsl(126, 64%, 41%); | ||||
|     border-color: hsl(126, 64%, 41%); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-content .todo-list .todo-list__label > input[checked]::after { | ||||
|     border-color: hsl(0, 0%, 100%); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-content .todo-list .todo-list__label .todo-list__label__description { | ||||
|     vertical-align: middle; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-content .todo-list .todo-list__label.todo-list__label_without-description input[type=checkbox] { | ||||
|     position: absolute; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-editor__editable.ck-content .todo-list .todo-list__label > input, | ||||
| .ck-editor__editable.ck-content .todo-list .todo-list__label > span[contenteditable=false] > input { | ||||
|     cursor: pointer; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-editor__editable.ck-content .todo-list .todo-list__label > input:hover::before, .ck-editor__editable.ck-content .todo-list .todo-list__label > span[contenteditable=false] > input:hover::before { | ||||
|     box-shadow: 0 0 0 5px hsla(0, 0%, 0%, 0.1); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-editor__editable.ck-content .todo-list .todo-list__label > span[contenteditable=false] > input { | ||||
|     -webkit-appearance: none; | ||||
|     display: inline-block; | ||||
|     position: relative; | ||||
|     width: var(--ck-todo-list-checkmark-size); | ||||
|     height: var(--ck-todo-list-checkmark-size); | ||||
|     vertical-align: middle; | ||||
|     border: 0; | ||||
|     left: -25px; | ||||
|     margin-right: -15px; | ||||
|     right: 0; | ||||
|     margin-left: 0; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-editor__editable.ck-content[dir=rtl] .todo-list .todo-list__label > span[contenteditable=false] > input { | ||||
|     left: 0; | ||||
|     margin-right: 0; | ||||
|     right: -25px; | ||||
|     margin-left: -15px; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-editor__editable.ck-content .todo-list .todo-list__label > span[contenteditable=false] > input::before { | ||||
|     display: block; | ||||
|     position: absolute; | ||||
|     box-sizing: border-box; | ||||
|     content: ''; | ||||
|     width: 100%; | ||||
|     height: 100%; | ||||
|     border: 1px solid hsl(0, 0%, 20%); | ||||
|     border-radius: 2px; | ||||
|     transition: 250ms ease-in-out box-shadow; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-editor__editable.ck-content .todo-list .todo-list__label > span[contenteditable=false] > input::after { | ||||
|     display: block; | ||||
|     position: absolute; | ||||
|     box-sizing: content-box; | ||||
|     pointer-events: none; | ||||
|     content: ''; | ||||
|     left: calc( var(--ck-todo-list-checkmark-size) / 3 ); | ||||
|     top: calc( var(--ck-todo-list-checkmark-size) / 5.3 ); | ||||
|     width: calc( var(--ck-todo-list-checkmark-size) / 5.3 ); | ||||
|     height: calc( var(--ck-todo-list-checkmark-size) / 2.6 ); | ||||
|     border-style: solid; | ||||
|     border-color: transparent; | ||||
|     border-width: 0 calc( var(--ck-todo-list-checkmark-size) / 8 ) calc( var(--ck-todo-list-checkmark-size) / 8 ) 0; | ||||
|     transform: rotate(45deg); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-editor__editable.ck-content .todo-list .todo-list__label > span[contenteditable=false] > input[checked]::before { | ||||
|     background: hsl(126, 64%, 41%); | ||||
|     border-color: hsl(126, 64%, 41%); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-editor__editable.ck-content .todo-list .todo-list__label > span[contenteditable=false] > input[checked]::after { | ||||
|     border-color: hsl(0, 0%, 100%); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/todolist.css */ | ||||
| .ck-editor__editable.ck-content .todo-list .todo-list__label.todo-list__label_without-description input[type=checkbox] { | ||||
|     position: absolute; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/list.css */ | ||||
| .ck-content ol { | ||||
|     list-style-type: decimal; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/list.css */ | ||||
| .ck-content ol ol { | ||||
|     list-style-type: lower-latin; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/list.css */ | ||||
| .ck-content ol ol ol { | ||||
|     list-style-type: lower-roman; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/list.css */ | ||||
| .ck-content ol ol ol ol { | ||||
|     list-style-type: upper-latin; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/list.css */ | ||||
| .ck-content ol ol ol ol ol { | ||||
|     list-style-type: upper-roman; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/list.css */ | ||||
| .ck-content ul { | ||||
|     list-style-type: disc; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/list.css */ | ||||
| .ck-content ul ul { | ||||
|     list-style-type: circle; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/list.css */ | ||||
| .ck-content ul ul ul { | ||||
|     list-style-type: square; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-list/theme/list.css */ | ||||
| .ck-content ul ul ul ul { | ||||
|     list-style-type: square; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/image.css */ | ||||
| .ck-content .image { | ||||
|     display: table; | ||||
|     clear: both; | ||||
|     text-align: center; | ||||
|     margin: 0.9em auto; | ||||
|     min-width: 50px; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/image.css */ | ||||
| .ck-content .image img { | ||||
|     display: block; | ||||
|     margin: 0 auto; | ||||
|     max-width: 100%; | ||||
|     min-width: 100%; | ||||
|     height: auto; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/image.css */ | ||||
| .ck-content .image-inline { | ||||
|     /* | ||||
|      * Normally, the .image-inline would have "display: inline-block" and "img { width: 100% }" (to follow the wrapper while resizing).; | ||||
|      * Unfortunately, together with "srcset", it gets automatically stretched up to the width of the editing root. | ||||
|      * This strange behavior does not happen with inline-flex. | ||||
|      */ | ||||
|     display: inline-flex; | ||||
|     max-width: 100%; | ||||
|     align-items: flex-start; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/image.css */ | ||||
| .ck-content .image-inline picture { | ||||
|     display: flex; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/image.css */ | ||||
| .ck-content .image-inline picture, | ||||
| .ck-content .image-inline img { | ||||
|     flex-grow: 1; | ||||
|     flex-shrink: 1; | ||||
|     max-width: 100%; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/imageresize.css */ | ||||
| .ck-content img.image_resized { | ||||
|     height: auto; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/imageresize.css */ | ||||
| .ck-content .image.image_resized { | ||||
|     max-width: 100%; | ||||
|     display: block; | ||||
|     box-sizing: border-box; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/imageresize.css */ | ||||
| .ck-content .image.image_resized img { | ||||
|     width: 100%; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/imageresize.css */ | ||||
| .ck-content .image.image_resized > figcaption { | ||||
|     display: block; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/imagecaption.css */ | ||||
| .ck-content .image > figcaption { | ||||
|     display: table-caption; | ||||
|     caption-side: bottom; | ||||
|     word-break: break-word; | ||||
|     color: var(--ck-color-image-caption-text); | ||||
|     background-color: var(--ck-color-image-caption-background); | ||||
|     padding: .6em; | ||||
|     font-size: .75em; | ||||
|     outline-offset: -1px; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/imagestyle.css */ | ||||
| .ck-content .image-style-block-align-left, | ||||
| .ck-content .image-style-block-align-right { | ||||
|     max-width: calc(100% - var(--ck-image-style-spacing)); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/imagestyle.css */ | ||||
| .ck-content .image-style-align-left, | ||||
| .ck-content .image-style-align-right { | ||||
|     clear: none; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/imagestyle.css */ | ||||
| .ck-content .image-style-side { | ||||
|     float: right; | ||||
|     margin-left: var(--ck-image-style-spacing); | ||||
|     max-width: 50%; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/imagestyle.css */ | ||||
| .ck-content .image-style-align-left { | ||||
|     float: left; | ||||
|     margin-right: var(--ck-image-style-spacing); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/imagestyle.css */ | ||||
| .ck-content .image-style-align-center { | ||||
|     margin-left: auto; | ||||
|     margin-right: auto; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/imagestyle.css */ | ||||
| .ck-content .image-style-align-right { | ||||
|     float: right; | ||||
|     margin-left: var(--ck-image-style-spacing); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/imagestyle.css */ | ||||
| .ck-content .image-style-block-align-right { | ||||
|     margin-right: 0; | ||||
|     margin-left: auto; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/imagestyle.css */ | ||||
| .ck-content .image-style-block-align-left { | ||||
|     margin-left: 0; | ||||
|     margin-right: auto; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/imagestyle.css */ | ||||
| .ck-content p + .image-style-align-left, | ||||
| .ck-content p + .image-style-align-right, | ||||
| .ck-content p + .image-style-side { | ||||
|     margin-top: 0; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/imagestyle.css */ | ||||
| .ck-content .image-inline.image-style-align-left, | ||||
| .ck-content .image-inline.image-style-align-right { | ||||
|     margin-top: var(--ck-inline-image-style-spacing); | ||||
|     margin-bottom: var(--ck-inline-image-style-spacing); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/imagestyle.css */ | ||||
| .ck-content .image-inline.image-style-align-left { | ||||
|     margin-right: var(--ck-inline-image-style-spacing); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-image/theme/imagestyle.css */ | ||||
| .ck-content .image-inline.image-style-align-right { | ||||
|     margin-left: var(--ck-inline-image-style-spacing); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-highlight/theme/highlight.css */ | ||||
| .ck-content .marker-yellow { | ||||
|     background-color: var(--ck-highlight-marker-yellow); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-highlight/theme/highlight.css */ | ||||
| .ck-content .marker-green { | ||||
|     background-color: var(--ck-highlight-marker-green); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-highlight/theme/highlight.css */ | ||||
| .ck-content .marker-pink { | ||||
|     background-color: var(--ck-highlight-marker-pink); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-highlight/theme/highlight.css */ | ||||
| .ck-content .marker-blue { | ||||
|     background-color: var(--ck-highlight-marker-blue); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-highlight/theme/highlight.css */ | ||||
| .ck-content .pen-red { | ||||
|     color: var(--ck-highlight-pen-red); | ||||
|     background-color: transparent; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-highlight/theme/highlight.css */ | ||||
| .ck-content .pen-green { | ||||
|     color: var(--ck-highlight-pen-green); | ||||
|     background-color: transparent; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-block-quote/theme/blockquote.css */ | ||||
| .ck-content blockquote { | ||||
|     overflow: hidden; | ||||
|     padding-right: 1.5em; | ||||
|     padding-left: 1.5em; | ||||
|     margin-left: 0; | ||||
|     margin-right: 0; | ||||
|     font-style: italic; | ||||
|     border-left: solid 5px hsl(0, 0%, 80%); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-block-quote/theme/blockquote.css */ | ||||
| .ck-content[dir="rtl"] blockquote { | ||||
|     border-left: 0; | ||||
|     border-right: solid 5px hsl(0, 0%, 80%); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-basic-styles/theme/code.css */ | ||||
| .ck-content code { | ||||
|     background-color: hsla(0, 0%, 78%, 0.3); | ||||
|     padding: .15em; | ||||
|     border-radius: 2px; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-font/theme/fontsize.css */ | ||||
| .ck-content .text-tiny { | ||||
|     font-size: .7em; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-font/theme/fontsize.css */ | ||||
| .ck-content .text-small { | ||||
|     font-size: .85em; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-font/theme/fontsize.css */ | ||||
| .ck-content .text-big { | ||||
|     font-size: 1.4em; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-font/theme/fontsize.css */ | ||||
| .ck-content .text-huge { | ||||
|     font-size: 1.8em; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-mention/theme/mention.css */ | ||||
| .ck-content .mention { | ||||
|     background: var(--ck-color-mention-background); | ||||
|     color: var(--ck-color-mention-text); | ||||
| } | ||||
| /* @ckeditor/ckeditor5-horizontal-line/theme/horizontalline.css */ | ||||
| .ck-content hr { | ||||
|     margin: 15px 0; | ||||
|     height: 4px; | ||||
|     background: hsl(0, 0%, 87%); | ||||
|     border: 0; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-code-block/theme/codeblock.css */ | ||||
| .ck-content pre { | ||||
|     padding: 1em; | ||||
|     color: hsl(0, 0%, 20.8%); | ||||
|     background: hsla(0, 0%, 78%, 0.3); | ||||
|     border: 1px solid hsl(0, 0%, 77%); | ||||
|     border-radius: 2px; | ||||
|     text-align: left; | ||||
|     direction: ltr; | ||||
|     tab-size: 4; | ||||
|     white-space: pre-wrap; | ||||
|     font-style: normal; | ||||
|     min-width: 200px; | ||||
| } | ||||
| /* @ckeditor/ckeditor5-code-block/theme/codeblock.css */ | ||||
| .ck-content pre code { | ||||
|     background: unset; | ||||
|     padding: 0; | ||||
|     border-radius: 0; | ||||
| } | ||||
| @media print { | ||||
|     /* @ckeditor/ckeditor5-page-break/theme/pagebreak.css */ | ||||
|     .ck-content .page-break { | ||||
|         padding: 0; | ||||
|     } | ||||
|     /* @ckeditor/ckeditor5-page-break/theme/pagebreak.css */ | ||||
|     .ck-content .page-break::after { | ||||
|         display: none; | ||||
|     } | ||||
| } | ||||
							
								
								
									
										2
									
								
								docs/assets/v0.63.6/libraries/normalize.min.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								docs/assets/v0.63.6/libraries/normalize.min.css
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} | ||||
| /*# sourceMappingURL=normalize.min.css.map */ | ||||
							
								
								
									
										165
									
								
								docs/assets/v0.63.6/stylesheets/share.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										165
									
								
								docs/assets/v0.63.6/stylesheets/share.css
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,165 @@ | ||||
| body { | ||||
|     font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif; | ||||
|     line-height: 1.5; | ||||
| } | ||||
|  | ||||
| #layout { | ||||
|     max-width: 1200px; | ||||
|     margin: 0 auto; | ||||
|     display: flex; | ||||
|     flex-direction: row-reverse; | ||||
| } | ||||
|  | ||||
| #menu { | ||||
|     padding: 25px; | ||||
|     flex-basis: 0; | ||||
|     flex-grow: 1; | ||||
|     overflow: auto; | ||||
| } | ||||
|  | ||||
| #menu p { | ||||
|     margin: 0; | ||||
| } | ||||
|  | ||||
| #menu > p { | ||||
|     font-weight: bold; | ||||
|     font-size: 110%; | ||||
| } | ||||
|  | ||||
| #menu ul { | ||||
|     padding-left: 20px; | ||||
| } | ||||
|  | ||||
| #main { | ||||
|     flex-basis: 0; | ||||
|     flex-grow: 3; | ||||
|     overflow: auto; | ||||
|     padding: 10px 20px 20px 20px; | ||||
| } | ||||
|  | ||||
| #parentLink { | ||||
|     float: right; | ||||
|     margin-top: 20px; | ||||
| } | ||||
|  | ||||
| #title { | ||||
|     margin: 0; | ||||
|     padding-top: 10px; | ||||
| } | ||||
|  | ||||
| img { | ||||
|     max-width: 100%; | ||||
| } | ||||
|  | ||||
| pre { | ||||
|     white-space: pre-wrap; | ||||
|     word-wrap: anywhere; | ||||
| } | ||||
|  | ||||
| iframe.pdf-view { | ||||
|     width: 100%; | ||||
|     height: 800px; | ||||
| } | ||||
|  | ||||
| #toggleMenuButton { | ||||
|     display: none; | ||||
|     position: fixed; | ||||
|     top: 8px; | ||||
|     left: 5px; | ||||
|     width: 1.4em; | ||||
|     border-radius: 5px; | ||||
|     border: 1px solid #aaa; | ||||
|     font-size: 2rem; | ||||
|     z-index: 10; | ||||
|     height: auto; | ||||
|     color: black; | ||||
|     cursor: pointer; | ||||
| } | ||||
|  | ||||
| #childLinks.grid ul { | ||||
|     list-style-type: none; | ||||
|     display: flex; | ||||
|     flex-wrap: wrap; | ||||
|     padding: 0; | ||||
| } | ||||
|  | ||||
| #childLinks.grid ul li { | ||||
|     width: 180px; | ||||
|     height: 140px; | ||||
|     padding: 10px; | ||||
| } | ||||
|  | ||||
| #childLinks.grid ul li a { | ||||
|     display: flex; | ||||
|     flex-direction: column; | ||||
|     height: 100%; | ||||
|     width: 100%; | ||||
|     border: 1px solid #ddd; | ||||
|     border-radius: 5px; | ||||
|     justify-content: center; | ||||
|     align-content: center; | ||||
|     text-align: center; | ||||
|     font-size: large; | ||||
| } | ||||
|  | ||||
| #childLinks.grid ul li a:hover { | ||||
|     background: #eee; | ||||
| } | ||||
|  | ||||
| #childLinks.list ul { | ||||
|     list-style-type: none; | ||||
|     display: inline-flex; | ||||
|     flex-wrap: wrap; | ||||
|     padding: 0; | ||||
|     margin-top: 5px; | ||||
| } | ||||
|  | ||||
| #childLinks.list ul li { | ||||
|     margin-right: 20px; | ||||
| } | ||||
|  | ||||
| #noteClippedFrom { | ||||
|     padding: 10px 0 10px 0; | ||||
|     margin: 20px 0 20px 0; | ||||
|     color: #666; | ||||
|     border: 1px solid #ddd; | ||||
|     border-left: 0; | ||||
|     border-right: 0; | ||||
| } | ||||
|  | ||||
| #toggleMenuButton::after { | ||||
|     position: relative; | ||||
|     top: -2px; | ||||
|     left: 1px; | ||||
| } | ||||
|  | ||||
| @media (max-width: 48em) { | ||||
|     #layout.showMenu #menu { | ||||
|         display: block; | ||||
|         margin-top: 40px; | ||||
|     } | ||||
|  | ||||
|     #toggleMenuButton { | ||||
|         display: block; | ||||
|     } | ||||
|  | ||||
|     #layout.showMenu #main { | ||||
|         display: none; | ||||
|     } | ||||
|  | ||||
|     #title { | ||||
|         padding-left: 60px; | ||||
|     } | ||||
|  | ||||
|     #layout.showMenu #toggleMenuButton::after { | ||||
|         content: "«"; | ||||
|     } | ||||
|  | ||||
|     #toggleMenuButton::after { | ||||
|         content: "»"; | ||||
|     } | ||||
|  | ||||
|     #menu { | ||||
|         display: none; | ||||
|     } | ||||
| } | ||||
							
								
								
									
										
											BIN
										
									
								
								docs/favicon.ico
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/favicon.ico
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 111 KiB | 
							
								
								
									
										121
									
								
								docs/hkrBX8KE1HQl.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										121
									
								
								docs/hkrBX8KE1HQl.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,121 @@ | ||||
| <!DOCTYPE html> | ||||
| <html lang="en"> | ||||
| <head> | ||||
|     <meta charset="utf-8"> | ||||
|      | ||||
|  | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||
|      | ||||
|     <link rel="shortcut icon" href="./favicon.ico"> | ||||
|      | ||||
|     <script src="./assets/v0.63.6/app-dist/share.js"></script> | ||||
|      | ||||
|         <link href="./assets/v0.63.6/libraries/normalize.min.css" rel="stylesheet"> | ||||
|         <link href="./assets/v0.63.6/stylesheets/share.css" rel="stylesheet"> | ||||
|      | ||||
|      | ||||
|         <link href="./assets/v0.63.6/libraries/ckeditor/ckeditor-content.css" rel="stylesheet"> | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|      | ||||
|     <title>Internationalisation</title> | ||||
| </head> | ||||
| <body data-note-id="hkrBX8KE1HQl" data-ancestor-note-id="4yYHqKbLovVX"> | ||||
| <div id="layout"> | ||||
|     <div id="main"> | ||||
|          | ||||
|             <nav id="parentLink"> | ||||
|                 parent: <a href="4yYHqKbLovVX.html" | ||||
|                            class="type-text">Developer's Guide</a> | ||||
|             </nav> | ||||
|          | ||||
|  | ||||
|         <h1 id="title">Internationalisation</h1> | ||||
|  | ||||
|          | ||||
|  | ||||
|          | ||||
|             <div id="content" class="type-text ck-content"> | ||||
|                 <p>During the initial development of Trilium Notes, internationalisation was not considered as it was meant to be an English-only product.</p><p>As the application and the user base grows, it makes sense to be able to reach out as many people as possible by providing translations in their native language.</p><p>The library used is <a href="https://www.i18next.com/">i18next</a>.</p><h2>What has been implemented so far</h2><ul class="todo-list"><li><label class="todo-list__label"><input type="checkbox" checked="checked" disabled="disabled"><span class="todo-list__label__description">Client component-level translations: <a href="https://github.com/TriliumNext/Notes/pull/248/files">#248</a></span></label></li><li><label class="todo-list__label"><input type="checkbox" disabled="disabled"><span class="todo-list__label__description">Client template-level translations</span></label></li><li><label class="todo-list__label"><input type="checkbox" disabled="disabled"><span class="todo-list__label__description">Server-side translations</span></label></li><li><label class="todo-list__label"><input type="checkbox" disabled="disabled"><span class="todo-list__label__description">Electron translations</span></label></li><li><label class="todo-list__label"><input type="checkbox" disabled="disabled"><span class="todo-list__label__description">Allowing the user to switch the language via options</span></label></li><li><label class="todo-list__label"><input type="checkbox" disabled="disabled"><span class="todo-list__label__description">Integrate with a translation service</span></label></li></ul><h2>Where are the translations?</h2><p>The translations are formatted as JSON files and they are located in <code>src/public/translations</code>. For every supported locale, there is a subdirectory in which there is a <code>translation.json</code> file (e.g. <code>src/public/translations/en/translation.json</code>).</p><h3>Message keys</h3><p>One important aspect is the fact that we are using a key-based approach. This means that each message is identified by an ID rather than a natural-language message (such as the default approach in gettext).</p><p>The key-based approach allows a hierarchical structure. For example, a key of <code>about.title</code> would be added in <code>translation.json</code> as follows:</p><pre><code class="language-application-json">{ | ||||
| 	"about": { | ||||
| 		"title": "About TriliumNext Notes" | ||||
| 	} | ||||
| } </code></pre><h3>Adding a new locale</h3><p>To add a new locale, go to <code>src/public/translations</code> with your favorite text editor and copy the <code>en</code> directory.</p><p>Rename the copy to the ISO code (e.g. <code>fr</code>, <code>ro</code>) of the language being translated.</p><p>Translations with a country-language combination, using their corresponding ISO code (e.g. <code>fr_FR</code>, <code>fr_BE</code>), has not been tested yet.</p><h3>Changing the language</h3><p>Since the internationalisation process is in its early stages, there is no user-facing way to switch the language.</p><p>To change the language manually, edit <code>src/public/app/services/i18n.js</code> and look for the line containing <code>lng: "en"</code>. Replace <code>en</code> with the desired language code (from the ones available in <code>src/public/translations</code>).</p><h2>Recommendations</h2><ul><li>Use hierarchy whenever appropriate, try to group the messages by:<ul><li>Modals (e.g. <code>about.foo</code>, <code>jump_to_note.foo</code>)</li></ul></li><li>Don't duplicate messages that are very widely used.<ul><li>One such example is <code>aria-label="Close"</code> which should go to a single message such as <code>modal.close</code> instead of being duplicated in every modal.</li></ul></li><li>On the other hand, don't overly generalise messages. A <code>close</code> message that is used whenever the “Close” word is encountered is not a good approach since it can potentially cause issues due to lack of context.</li><li>Use <a href="https://www.i18next.com/translation-function/interpolation">variable interpolation</a> whenever appropriate.<ul><li>If you see multiple messages joined together only to apply add a variable such as a user-inputted value, try to join those messages together into a single message containing a variable.</li><li>So instead of <code>“Number of updates: “ + numUpdates + “.”</code> use <code>$(t("number_updates", { numUpdates }))</code> where the message translation would appear as <code>Number of updates: {{numUpdates}}.</code></li></ul></li></ul><h2>Client-side translations</h2><h3>Component-level translations</h3><p>Most of the client translations are present in the various widgets and layouts.</p><p>Translation support has to be added manually for every file.</p><p>The first step is to add the translation import with a relative import. For example, if we are in the <code>src/public/app/widgets/dialogs</code> directory, the import would look as follows:</p><pre><code class="language-application-javascript-env-frontend">import { t } from "../../services/i18n.js";</code></pre><p>Afterwards, simply replace the hard-coded message with:</p><pre><code class="language-application-javascript-env-frontend">${t("msgid")}</code></pre><p>where <code>msgid</code> is the key of the message being translated.</p><h3>Template-level translations</h3><p>Templates are <code>.ejs</code> files present in <code>src/views</code>, these are used to prepare the root layout for desktop, mobile applications as well as setup (onboarding) and the shared notes view.</p><p>Due to using a different approach, it is not possible yet to translate those files.</p><h2>Server-side translations</h2><p>Currently the server-side messages are not translatable. They will be added as a separate step.</p> | ||||
|             </div> | ||||
|          | ||||
|  | ||||
|          | ||||
|     </div> | ||||
|  | ||||
|      | ||||
|         <button id="toggleMenuButton"></button> | ||||
|  | ||||
|         <nav id="menu"> | ||||
|              | ||||
| <p> | ||||
|      | ||||
|  | ||||
|      | ||||
|     <a class="type-text" href="4yYHqKbLovVX.html">Developer's Guide</a> | ||||
|      | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <ul> | ||||
|      | ||||
|         <li> | ||||
|              | ||||
| <p> | ||||
|      | ||||
|  | ||||
|      | ||||
|     <strong>Internationalisation</strong> | ||||
|      | ||||
| </p> | ||||
|  | ||||
|  | ||||
|  | ||||
|         </li> | ||||
|      | ||||
|         <li> | ||||
|              | ||||
| <p> | ||||
|      | ||||
|  | ||||
|      | ||||
|     <a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a> | ||||
|      | ||||
| </p> | ||||
|  | ||||
|  | ||||
| <ul> | ||||
|      | ||||
|         <li> | ||||
|              | ||||
| <p> | ||||
|      | ||||
|  | ||||
|      | ||||
|     <a class="type-text" href="QXCi6Y1SYulw.html">Adding a new client library</a> | ||||
|      | ||||
| </p> | ||||
|  | ||||
|  | ||||
|  | ||||
|         </li> | ||||
|      | ||||
| </ul> | ||||
|  | ||||
|  | ||||
|         </li> | ||||
|      | ||||
| </ul> | ||||
|  | ||||
|  | ||||
|         </nav> | ||||
|      | ||||
| </div> | ||||
| </body> | ||||
| </html> | ||||
							
								
								
									
										10
									
								
								docs/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								docs/index.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | ||||
| <!DOCTYPE html> | ||||
| <html> | ||||
|     <head> | ||||
|         <meta http-equiv="refresh" content="0; url=./4yYHqKbLovVX.html" /> | ||||
|     </head> | ||||
|      | ||||
|     <body> | ||||
|      | ||||
|     </body> | ||||
| </html> | ||||
| @@ -6,6 +6,11 @@ import appIconService from "./src/services/app_icon.js"; | ||||
| import windowService from "./src/services/window.js"; | ||||
| import tray from "./src/services/tray.js"; | ||||
|  | ||||
| // Prevent Trilium starting twice on first install and on uninstall for the Windows installer. | ||||
| if (require('electron-squirrel-startup')) { | ||||
|   process.exit(0); | ||||
| } | ||||
|  | ||||
| // Adds debug features like hotkeys for triggering dev tools and reload | ||||
| require('electron-debug')(); | ||||
|  | ||||
|   | ||||
							
								
								
									
										23
									
								
								forge.config.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								forge.config.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| module.exports = { | ||||
|   packagerConfig: { | ||||
|     asar: true, | ||||
|     // icon will break once we add .dmg support, since the .ico & .icns have to be in same dir (see https://www.electronforge.io/guides/create-and-add-icons#windows-and-macos) | ||||
|     icon: "./images/app-icons/win/icon" | ||||
|   }, | ||||
|   rebuildConfig: {}, | ||||
|   makers: [ | ||||
|     { | ||||
|       name: '@electron-forge/maker-squirrel', | ||||
|       config: { | ||||
|         setupIcon: "./images/app-icons/win/icon.ico", | ||||
|         loadingGif: "./images/app-icons/win/setup-banner.gif" | ||||
|       } | ||||
|     } | ||||
|   ], | ||||
|   plugins: [ | ||||
|     { | ||||
|       name: '@electron-forge/plugin-auto-unpack-natives', | ||||
|       config: {}, | ||||
|     }, | ||||
|   ], | ||||
| }; | ||||
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/win/setup-banner.gif
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								images/app-icons/win/setup-banner.gif
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 8.5 KiB | 
							
								
								
									
										
											BIN
										
									
								
								images/app-icons/win/setup-banner.xcf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								images/app-icons/win/setup-banner.xcf
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										13823
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										13823
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										106
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										106
									
								
								package.json
									
									
									
									
									
								
							| @@ -1,64 +1,75 @@ | ||||
| { | ||||
|   "name": "trilium", | ||||
|   "productName": "Trilium Notes", | ||||
|   "description": "Trilium Notes", | ||||
|   "version": "0.90.0-beta", | ||||
|   "productName": "TriliumNext Notes", | ||||
|   "description": "Build your personal knowledge base with TriliumNext Notes", | ||||
|   "version": "0.90.1-beta", | ||||
|   "license": "AGPL-3.0-only", | ||||
|   "main": "electron.js", | ||||
|   "main": "./dist/electron.js", | ||||
|   "author": { | ||||
|     "name": "TriliumNext Notes Teams", | ||||
|     "email": "contact@eliandoran.me", | ||||
|     "url": "https://github.com/TriliumNext/Notes" | ||||
|   }, | ||||
|   "copyright": "", | ||||
|   "bin": { | ||||
|     "trilium": "src/www.js" | ||||
|   }, | ||||
|   "repository": { | ||||
|     "type": "git", | ||||
|     "url": "https://github.com/zadam/trilium.git" | ||||
|     "url": "https://github.com/TriliumNext/Notes.git" | ||||
|   }, | ||||
|   "scripts": { | ||||
|     "start-server": "cross-env TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/www.ts", | ||||
|     "start-server-no-dir": "cross-env TRILIUM_SAFE_MODE=1 TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/www.ts", | ||||
|     "qstart-server": "npm run qswitch-server && TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 nodemon src/www.ts", | ||||
|     "start-electron": "rimraf ./dist && tsc && ts-node ./bin/copy-dist.ts && cross-env TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./dist/electron.js --inspect=5858 .", | ||||
|     "start-electron-no-dir": "cross-env TRILIUM_SAFE_MODE=1 TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 electron --inspect=5858 .", | ||||
|     "start-electron": "npm run prepare-dist && cross-env TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./dist/electron.js --inspect=5858 .", | ||||
|     "start-electron-no-dir": "npm run prepare-dist && cross-env TRILIUM_SAFE_MODE=1 TRILIUM_ENV=dev electron ./dist/electron.js --inspect=5858 .", | ||||
|     "qstart-electron": "npm run qswitch-electron && TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron --inspect=5858 .", | ||||
|     "start-test-server": "npm run qswitch-server; rm -rf ./data-test; cross-env TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data-test TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev TRILIUM_PORT=9999 ts-node src/www.ts", | ||||
|     "switch-server": "rm -rf ./node_modules/better-sqlite3 && npm install", | ||||
|     "switch-electron": "./node_modules/.bin/electron-rebuild", | ||||
|     "qswitch-server": "rm -rf ./node_modules/better-sqlite3/bin ; mkdir -p ./node_modules/better-sqlite3/build ; cp ./bin/better-sqlite3/linux-server-better_sqlite3.node ./node_modules/better-sqlite3/build/better_sqlite3.node", | ||||
|     "qswitch-electron": "rm -rf ./node_modules/better-sqlite3/bin ; mkdir -p ./node_modules/better-sqlite3/build ; cp ./bin/better-sqlite3/linux-desktop-better_sqlite3.node ./node_modules/better-sqlite3/build/better_sqlite3.node", | ||||
|     "build-backend-docs": "rm -rf ./docs/backend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/backend_api src/becca/entities/*.js src/services/backend_script_api.js src/services/sql.js", | ||||
|     "build-frontend-docs": "rm -rf ./docs/frontend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/app/entities/*.js src/public/app/services/frontend_script_api.js src/public/app/widgets/basic_widget.js src/public/app/widgets/note_context_aware_widget.js src/public/app/widgets/right_panel_widget.js", | ||||
|     "start-test-server": "npm run qswitch-server; rimraf ./data-test; cross-env TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data-test TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev TRILIUM_PORT=9999 ts-node src/www.ts", | ||||
|     "switch-server": "rimraf ./node_modules/better-sqlite3 && npm install", | ||||
|     "switch-electron": "npx electron-rebuild", | ||||
|     "qswitch-server": "rimraf ./node_modules/better-sqlite3/bin ; mkdir -p ./node_modules/better-sqlite3/build ; cp ./bin/better-sqlite3/linux-server-better_sqlite3.node ./node_modules/better-sqlite3/build/better_sqlite3.node", | ||||
|     "qswitch-electron": "rimraf ./node_modules/better-sqlite3/bin ; mkdir -p ./node_modules/better-sqlite3/build ; cp ./bin/better-sqlite3/linux-desktop-better_sqlite3.node ./node_modules/better-sqlite3/build/better_sqlite3.node", | ||||
|     "build-backend-docs": "rimraf ./docs/backend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/backend_api src/becca/entities/*.js src/services/backend_script_api.js src/services/sql.js", | ||||
|     "build-frontend-docs": "rimraf ./docs/frontend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/app/entities/*.js src/public/app/services/frontend_script_api.js src/public/app/widgets/basic_widget.js src/public/app/widgets/note_context_aware_widget.js src/public/app/widgets/right_panel_widget.js", | ||||
|     "build-docs": "npm run build-backend-docs && npm run build-frontend-docs", | ||||
|     "webpack": "webpack -c webpack.config.ts", | ||||
|     "test-jasmine": "TRILIUM_DATA_DIR=./data-test ts-node ./node_modules/.bin/jasmine", | ||||
|     "test-jasmine": "cross-env TRILIUM_DATA_DIR=./data-test ts-node ./node_modules/jasmine/bin/jasmine", | ||||
|     "test-es6": "ts-node -r esm spec-es6/attribute_parser.spec.ts", | ||||
|     "test": "npm run test-jasmine && npm run test-es6", | ||||
|     "postinstall": "rimraf ./node_modules/canvas", | ||||
|     "start-electron-forge": "npm run prepare-dist && electron-forge start", | ||||
|     "make-electron": "npm run webpack && npm run prepare-dist && electron-forge make", | ||||
|     "package-electron": "electron-forge package", | ||||
|     "prepare-dist": "rimraf ./dist && tsc && ts-node ./bin/copy-dist.ts", | ||||
|     "update-build-info": "ts-node bin/update-build-info.ts", | ||||
|     "errors": "tsc --watch --noEmit" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@braintree/sanitize-url": "6.0.4", | ||||
|     "@braintree/sanitize-url": "^7.1.0", | ||||
|     "@electron/remote": "2.1.2", | ||||
|     "@excalidraw/excalidraw": "0.17.3", | ||||
|     "archiver": "7.0.0", | ||||
|     "async-mutex": "0.4.1", | ||||
|     "axios": "1.6.7", | ||||
|     "better-sqlite3": "8.4.0", | ||||
|     "@excalidraw/excalidraw": "^0.17.6", | ||||
|     "archiver": "^7.0.1", | ||||
|     "async-mutex": "^0.5.0", | ||||
|     "axios": "^1.7.2", | ||||
|     "better-sqlite3": "8.5.0", | ||||
|     "boxicons": "2.1.4", | ||||
|     "chokidar": "3.6.0", | ||||
|     "cls-hooked": "4.2.2", | ||||
|     "compression": "1.7.4", | ||||
|     "cookie-parser": "1.4.6", | ||||
|     "csurf": "1.11.0", | ||||
|     "dayjs": "1.11.10", | ||||
|     "dayjs": "^1.11.12", | ||||
|     "dayjs-plugin-utc": "0.1.2", | ||||
|     "debounce": "1.2.1", | ||||
|     "ejs": "3.1.9", | ||||
|     "debounce": "^2.1.0", | ||||
|     "ejs": "^3.1.10", | ||||
|     "electron-debug": "3.2.0", | ||||
|     "electron-dl": "3.5.2", | ||||
|     "electron-squirrel-startup": "^1.0.0", | ||||
|     "electron-window-state": "5.0.3", | ||||
|     "escape-html": "1.0.3", | ||||
|     "express": "4.18.3", | ||||
|     "express": "^4.19.2", | ||||
|     "express-partial-content": "1.0.2", | ||||
|     "express-rate-limit": "7.2.0", | ||||
|     "express-rate-limit": "^7.3.1", | ||||
|     "express-session": "1.18.0", | ||||
|     "force-graph": "1.43.5", | ||||
|     "fs-extra": "11.2.0", | ||||
| @@ -66,36 +77,34 @@ | ||||
|     "html": "1.0.0", | ||||
|     "html2plaintext": "2.1.4", | ||||
|     "http-proxy-agent": "7.0.2", | ||||
|     "https-proxy-agent": "7.0.4", | ||||
|     "https-proxy-agent": "^7.0.5", | ||||
|     "image-type": "4.1.0", | ||||
|     "ini": "3.0.1", | ||||
|     "ini": "^4.1.3", | ||||
|     "is-animated": "2.0.2", | ||||
|     "is-svg": "4.3.2", | ||||
|     "jimp": "0.22.12", | ||||
|     "joplin-turndown-plugin-gfm": "1.0.12", | ||||
|     "jquery": "3.7.1", | ||||
|     "jquery-hotkeys": "0.2.2", | ||||
|     "jsdom": "24.0.0", | ||||
|     "katex": "0.16.9", | ||||
|     "marked": "12.0.0", | ||||
|     "mermaid": "10.9.0", | ||||
|     "jsdom": "^24.1.0", | ||||
|     "katex": "^0.16.11", | ||||
|     "marked": "^13.0.2", | ||||
|     "mermaid": "^10.9.1", | ||||
|     "mime-types": "2.1.35", | ||||
|     "multer": "1.4.5-lts.1", | ||||
|     "node-abi": "3.56.0", | ||||
|     "normalize-strings": "1.1.1", | ||||
|     "open": "8.4.1", | ||||
|     "panzoom": "9.4.3", | ||||
|     "print-this": "2.0.0", | ||||
|     "rand-token": "1.0.1", | ||||
|     "react": "18.2.0", | ||||
|     "react-dom": "18.2.0", | ||||
|     "react": "^18.3.1", | ||||
|     "react-dom": "^18.3.1", | ||||
|     "request": "2.88.2", | ||||
|     "rimraf": "5.0.5", | ||||
|     "safe-compare": "1.1.4", | ||||
|     "sanitize-filename": "1.6.3", | ||||
|     "sanitize-html": "2.12.1", | ||||
|     "sax": "1.3.0", | ||||
|     "semver": "7.6.0", | ||||
|     "sanitize-html": "^2.13.0", | ||||
|     "sax": "^1.4.1", | ||||
|     "semver": "^7.6.3", | ||||
|     "serve-favicon": "2.5.0", | ||||
|     "session-file-store": "1.5.0", | ||||
|     "split.js": "1.6.5", | ||||
| @@ -103,13 +112,16 @@ | ||||
|     "striptags": "3.2.0", | ||||
|     "tmp": "0.2.3", | ||||
|     "tree-kill": "1.2.2", | ||||
|     "turndown": "7.1.2", | ||||
|     "turndown": "^7.2.0", | ||||
|     "unescape": "1.0.1", | ||||
|     "ws": "8.16.0", | ||||
|     "ws": "^8.18.0", | ||||
|     "xml2js": "0.6.2", | ||||
|     "yauzl": "3.1.2" | ||||
|     "yauzl": "^3.1.3" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@electron-forge/cli": "^6.4.2", | ||||
|     "@electron-forge/maker-squirrel": "^6.4.2", | ||||
|     "@electron-forge/plugin-auto-unpack-natives": "^6.4.2", | ||||
|     "@types/archiver": "^6.0.2", | ||||
|     "@types/better-sqlite3": "^7.6.9", | ||||
|     "@types/cls-hooked": "^4.3.8", | ||||
| @@ -139,19 +151,19 @@ | ||||
|     "@types/xml2js": "^0.4.14", | ||||
|     "cross-env": "7.0.3", | ||||
|     "electron": "25.9.8", | ||||
|     "electron-builder": "24.13.3", | ||||
|     "electron-packager": "17.1.2", | ||||
|     "electron-rebuild": "3.2.9", | ||||
|     "esm": "3.2.25", | ||||
|     "jasmine": "5.1.0", | ||||
|     "jsdoc": "4.0.2", | ||||
|     "jsdoc": "^4.0.3", | ||||
|     "lorem-ipsum": "2.0.8", | ||||
|     "nodemon": "3.1.0", | ||||
|     "nodemon": "^3.1.4", | ||||
|     "rcedit": "4.0.1", | ||||
|     "rimraf": "^6.0.1", | ||||
|     "ts-node": "^10.9.2", | ||||
|     "tslib": "^2.6.2", | ||||
|     "typescript": "^5.3.3", | ||||
|     "webpack": "5.90.3", | ||||
|     "webpack": "^5.93.0", | ||||
|     "webpack-cli": "5.1.4" | ||||
|   }, | ||||
|   "optionalDependencies": { | ||||
|   | ||||
| @@ -1,107 +1,5 @@ | ||||
| import crypto from "crypto"; | ||||
| import etapi from "../support/etapi.js"; | ||||
| describe("Notes", () => { | ||||
|     it("zzz", () => { | ||||
|  | ||||
| etapi.describeEtapi("notes", () => { | ||||
|   it("create", async () => { | ||||
|     const { note, branch } = await etapi.postEtapi("create-note", { | ||||
|       parentNoteId: "root", | ||||
|       type: "text", | ||||
|       title: "Hello World!", | ||||
|       content: "Content", | ||||
|       prefix: "Custom prefix", | ||||
|     }); | ||||
|  | ||||
|     expect(note.title).toEqual("Hello World!"); | ||||
|     expect(branch.parentNoteId).toEqual("root"); | ||||
|     expect(branch.prefix).toEqual("Custom prefix"); | ||||
|  | ||||
|     const rNote = await etapi.getEtapi(`notes/${note.noteId}`); | ||||
|     expect(rNote.title).toEqual("Hello World!"); | ||||
|  | ||||
|     const rContent = await ( | ||||
|       await etapi.getEtapiContent(`notes/${note.noteId}/content`) | ||||
|     ).text(); | ||||
|     expect(rContent).toEqual("Content"); | ||||
|  | ||||
|     const rBranch = await etapi.getEtapi(`branches/${branch.branchId}`); | ||||
|     expect(rBranch.parentNoteId).toEqual("root"); | ||||
|     expect(rBranch.prefix).toEqual("Custom prefix"); | ||||
|   }); | ||||
|  | ||||
|   it("patch", async () => { | ||||
|     const { note } = await etapi.postEtapi("create-note", { | ||||
|       parentNoteId: "root", | ||||
|       type: "text", | ||||
|       title: "Hello World!", | ||||
|       content: "Content", | ||||
|     }); | ||||
|  | ||||
|     await etapi.patchEtapi(`notes/${note.noteId}`, { | ||||
|       title: "new title", | ||||
|       type: "code", | ||||
|       mime: "text/apl", | ||||
|       dateCreated: "2000-01-01 12:34:56.999+0200", | ||||
|       utcDateCreated: "2000-01-01 10:34:56.999Z", | ||||
|     }); | ||||
|  | ||||
|     const rNote = await etapi.getEtapi(`notes/${note.noteId}`); | ||||
|     expect(rNote.title).toEqual("new title"); | ||||
|     expect(rNote.type).toEqual("code"); | ||||
|     expect(rNote.mime).toEqual("text/apl"); | ||||
|     expect(rNote.dateCreated).toEqual("2000-01-01 12:34:56.999+0200"); | ||||
|     expect(rNote.utcDateCreated).toEqual("2000-01-01 10:34:56.999Z"); | ||||
|   }); | ||||
|  | ||||
|   it("update content", async () => { | ||||
|     const { note } = await etapi.postEtapi("create-note", { | ||||
|       parentNoteId: "root", | ||||
|       type: "text", | ||||
|       title: "Hello World!", | ||||
|       content: "Content", | ||||
|     }); | ||||
|  | ||||
|     await etapi.putEtapiContent(`notes/${note.noteId}/content`, "new content"); | ||||
|  | ||||
|     const rContent = await ( | ||||
|       await etapi.getEtapiContent(`notes/${note.noteId}/content`) | ||||
|     ).text(); | ||||
|     expect(rContent).toEqual("new content"); | ||||
|   }); | ||||
|  | ||||
|   it("create / update binary content", async () => { | ||||
|     const { note } = await etapi.postEtapi("create-note", { | ||||
|       parentNoteId: "root", | ||||
|       type: "file", | ||||
|       title: "Hello World!", | ||||
|       content: "ZZZ", | ||||
|     }); | ||||
|  | ||||
|     const updatedContent = crypto.randomBytes(16); | ||||
|  | ||||
|     await etapi.putEtapiContent(`notes/${note.noteId}/content`, updatedContent); | ||||
|  | ||||
|     const rContent = await ( | ||||
|       await etapi.getEtapiContent(`notes/${note.noteId}/content`) | ||||
|     ).arrayBuffer(); | ||||
|     expect(Buffer.from(new Uint8Array(rContent))).toEqual(updatedContent); | ||||
|   }); | ||||
|  | ||||
|   it("delete note", async () => { | ||||
|     const { note } = await etapi.postEtapi("create-note", { | ||||
|       parentNoteId: "root", | ||||
|       type: "text", | ||||
|       title: "Hello World!", | ||||
|       content: "Content", | ||||
|     }); | ||||
|  | ||||
|     await etapi.deleteEtapi(`notes/${note.noteId}`); | ||||
|  | ||||
|     const resp = await etapi.getEtapiResponse(`notes/${note.noteId}`); | ||||
|     expect(resp.status).toEqual(404); | ||||
|  | ||||
|     const error = await resp.json(); | ||||
|     expect(error.status).toEqual(404); | ||||
|     expect(error.code).toEqual("NOTE_NOT_FOUND"); | ||||
|     expect(error.message).toEqual(`Note '${note.noteId}' not found.`); | ||||
|     }); | ||||
| }); | ||||
|   | ||||
							
								
								
									
										107
									
								
								spec/etapi/notes.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										107
									
								
								spec/etapi/notes.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,107 @@ | ||||
| import crypto from "crypto"; | ||||
| import etapi from "../support/etapi"; | ||||
|  | ||||
| etapi.describeEtapi("notes", () => { | ||||
|   it("create", async () => { | ||||
|     const { note, branch } = await etapi.postEtapi("create-note", { | ||||
|       parentNoteId: "root", | ||||
|       type: "text", | ||||
|       title: "Hello World!", | ||||
|       content: "Content", | ||||
|       prefix: "Custom prefix", | ||||
|     }); | ||||
|  | ||||
|     expect(note.title).toEqual("Hello World!"); | ||||
|     expect(branch.parentNoteId).toEqual("root"); | ||||
|     expect(branch.prefix).toEqual("Custom prefix"); | ||||
|  | ||||
|     const rNote = await etapi.getEtapi(`notes/${note.noteId}`); | ||||
|     expect(rNote.title).toEqual("Hello World!"); | ||||
|  | ||||
|     const rContent = await ( | ||||
|       await etapi.getEtapiContent(`notes/${note.noteId}/content`) | ||||
|     ).text(); | ||||
|     expect(rContent).toEqual("Content"); | ||||
|  | ||||
|     const rBranch = await etapi.getEtapi(`branches/${branch.branchId}`); | ||||
|     expect(rBranch.parentNoteId).toEqual("root"); | ||||
|     expect(rBranch.prefix).toEqual("Custom prefix"); | ||||
|   }); | ||||
|  | ||||
|   it("patch", async () => { | ||||
|     const { note } = await etapi.postEtapi("create-note", { | ||||
|       parentNoteId: "root", | ||||
|       type: "text", | ||||
|       title: "Hello World!", | ||||
|       content: "Content", | ||||
|     }); | ||||
|  | ||||
|     await etapi.patchEtapi(`notes/${note.noteId}`, { | ||||
|       title: "new title", | ||||
|       type: "code", | ||||
|       mime: "text/apl", | ||||
|       dateCreated: "2000-01-01 12:34:56.999+0200", | ||||
|       utcDateCreated: "2000-01-01 10:34:56.999Z", | ||||
|     }); | ||||
|  | ||||
|     const rNote = await etapi.getEtapi(`notes/${note.noteId}`); | ||||
|     expect(rNote.title).toEqual("new title"); | ||||
|     expect(rNote.type).toEqual("code"); | ||||
|     expect(rNote.mime).toEqual("text/apl"); | ||||
|     expect(rNote.dateCreated).toEqual("2000-01-01 12:34:56.999+0200"); | ||||
|     expect(rNote.utcDateCreated).toEqual("2000-01-01 10:34:56.999Z"); | ||||
|   }); | ||||
|  | ||||
|   it("update content", async () => { | ||||
|     const { note } = await etapi.postEtapi("create-note", { | ||||
|       parentNoteId: "root", | ||||
|       type: "text", | ||||
|       title: "Hello World!", | ||||
|       content: "Content", | ||||
|     }); | ||||
|  | ||||
|     await etapi.putEtapiContent(`notes/${note.noteId}/content`, "new content"); | ||||
|  | ||||
|     const rContent = await ( | ||||
|       await etapi.getEtapiContent(`notes/${note.noteId}/content`) | ||||
|     ).text(); | ||||
|     expect(rContent).toEqual("new content"); | ||||
|   }); | ||||
|  | ||||
|   it("create / update binary content", async () => { | ||||
|     const { note } = await etapi.postEtapi("create-note", { | ||||
|       parentNoteId: "root", | ||||
|       type: "file", | ||||
|       title: "Hello World!", | ||||
|       content: "ZZZ", | ||||
|     }); | ||||
|  | ||||
|     const updatedContent = crypto.randomBytes(16); | ||||
|  | ||||
|     await etapi.putEtapiContent(`notes/${note.noteId}/content`, updatedContent); | ||||
|  | ||||
|     const rContent = await ( | ||||
|       await etapi.getEtapiContent(`notes/${note.noteId}/content`) | ||||
|     ).arrayBuffer(); | ||||
|     expect(Buffer.from(new Uint8Array(rContent))).toEqual(updatedContent); | ||||
|   }); | ||||
|  | ||||
|   it("delete note", async () => { | ||||
|     const { note } = await etapi.postEtapi("create-note", { | ||||
|       parentNoteId: "root", | ||||
|       type: "text", | ||||
|       title: "Hello World!", | ||||
|       content: "Content", | ||||
|     }); | ||||
|  | ||||
|     await etapi.deleteEtapi(`notes/${note.noteId}`); | ||||
|  | ||||
|     const resp = await etapi.getEtapiResponse(`notes/${note.noteId}`); | ||||
|     expect(resp.status).toEqual(404); | ||||
|  | ||||
|     const error = await resp.json(); | ||||
|     expect(error.status).toEqual(404); | ||||
|     expect(error.code).toEqual("NOTE_NOT_FOUND"); | ||||
|     expect(error.message).toEqual(`Note '${note.noteId}' not found.`); | ||||
|   }); | ||||
| }); | ||||
| @@ -22,7 +22,7 @@ describe('Search', () => { | ||||
|         }); | ||||
|     }); | ||||
|  | ||||
|     it('simple path match', () => { | ||||
|     xit('simple path match', () => { | ||||
|         rootNote.child(becca_mocking.note('Europe').child(becca_mocking.note('Austria'))); | ||||
|  | ||||
|         const searchContext = new SearchContext(); | ||||
| @@ -32,7 +32,7 @@ describe('Search', () => { | ||||
|         expect(becca_mocking.findNoteByTitle(searchResults, 'Austria')).toBeTruthy(); | ||||
|     }); | ||||
|  | ||||
|     it('normal search looks also at attributes', () => { | ||||
|     xit('normal search looks also at attributes', () => { | ||||
|         const austria = becca_mocking.note('Austria'); | ||||
|         const vienna = becca_mocking.note('Vienna'); | ||||
|  | ||||
| @@ -50,7 +50,7 @@ describe('Search', () => { | ||||
|         expect(becca_mocking.findNoteByTitle(searchResults, 'Vienna')).toBeTruthy(); | ||||
|     }); | ||||
|  | ||||
|     it('normal search looks also at type and mime', () => { | ||||
|     xit('normal search looks also at type and mime', () => { | ||||
|         rootNote | ||||
|             .child(becca_mocking.note('Effective Java', { type: 'book', mime: '' })) | ||||
|             .child(becca_mocking.note('Hello World.java', { type: 'code', mime: 'text/x-java' })); | ||||
| @@ -71,7 +71,7 @@ describe('Search', () => { | ||||
|         expect(searchResults.length).toEqual(2); | ||||
|     }); | ||||
|  | ||||
|     it('only end leafs are results', () => { | ||||
|     xit('only end leafs are results', () => { | ||||
|         rootNote.child(becca_mocking.note('Europe').child(becca_mocking.note('Austria'))); | ||||
|  | ||||
|         const searchContext = new SearchContext(); | ||||
| @@ -81,7 +81,7 @@ describe('Search', () => { | ||||
|         expect(becca_mocking.findNoteByTitle(searchResults, 'Europe')).toBeTruthy(); | ||||
|     }); | ||||
|  | ||||
|     it('only end leafs are results', () => { | ||||
|     xit('only end leafs are results', () => { | ||||
|         rootNote.child(becca_mocking.note('Europe').child(becca_mocking.note('Austria').label('capital', 'Vienna'))); | ||||
|  | ||||
|         const searchContext = new SearchContext(); | ||||
| @@ -146,7 +146,7 @@ describe('Search', () => { | ||||
|         expect(becca_mocking.findNoteByTitle(searchResults, 'Czech Republic')).toBeTruthy(); | ||||
|     }); | ||||
|  | ||||
|     it('inherited label comparison', () => { | ||||
|     xit('inherited label comparison', () => { | ||||
|         rootNote.child( | ||||
|             becca_mocking | ||||
|                 .note('Europe') | ||||
| @@ -202,7 +202,9 @@ describe('Search', () => { | ||||
|  | ||||
|         function test(query: string, expectedResultCount: number) { | ||||
|             const searchResults = searchService.findResultsWithQuery(query, searchContext); | ||||
|             expect(searchResults.length).toEqual(expectedResultCount); | ||||
|             expect(searchResults.length) | ||||
|                 .withContext(`While searching for ${query} got unexpected result: [${searchResults.join(", ")}]`) | ||||
|                 .toEqual(expectedResultCount); | ||||
|  | ||||
|             if (expectedResultCount === 1) { | ||||
|                 expect(becca_mocking.findNoteByTitle(searchResults, 'My note')).toBeTruthy(); | ||||
| @@ -574,7 +576,7 @@ describe('Search', () => { | ||||
|         expect(becca.notes[searchResults[0].noteId].title).toEqual('Europe'); | ||||
|     }); | ||||
|  | ||||
|     it('test note.text *=* something', () => { | ||||
|     xit('test note.text *=* something', () => { | ||||
|         const italy = becca_mocking.note('Italy').label('capital', 'Rome'); | ||||
|         const slovakia = becca_mocking.note('Slovakia').label('capital', 'Bratislava'); | ||||
|  | ||||
| @@ -587,7 +589,7 @@ describe('Search', () => { | ||||
|         expect(becca.notes[searchResults[0].noteId].title).toEqual('Slovakia'); | ||||
|     }); | ||||
|  | ||||
|     it('test that fulltext does not match archived notes', () => { | ||||
|     xit('test that fulltext does not match archived notes', () => { | ||||
|         const italy = becca_mocking.note('Italy').label('capital', 'Rome'); | ||||
|         const slovakia = becca_mocking.note('Slovakia').label('capital', 'Bratislava'); | ||||
|  | ||||
|   | ||||
| @@ -19,57 +19,11 @@ function describeEtapi( | ||||
|     let appProcess: ReturnType<typeof child_process.spawn>; | ||||
|  | ||||
|     beforeAll(async () => { | ||||
|       appProcess = child_process.spawn("npm", ["run", "start-test-server"]); | ||||
|       if (!appProcess) { | ||||
|         throw new Error("Failed to start the Trilium process."); | ||||
|       } | ||||
|        | ||||
|       await new Promise<void>((res) => { | ||||
|         appProcess.stdout!.on("data", (data) => { | ||||
|           console.log("Trilium: " + data.toString().trim()); | ||||
|  | ||||
|           if (data.toString().includes("Listening on port")) { | ||||
|             res(); | ||||
|           } | ||||
|         }); | ||||
|       }); | ||||
|  | ||||
|       await fetch(`${HOST}/api/setup/new-document`, { method: "POST" }); | ||||
|  | ||||
|       const formData = new URLSearchParams(); | ||||
|       formData.append("password1", "1234"); | ||||
|       formData.append("password2", "1234"); | ||||
|  | ||||
|       await fetch(`${HOST}/set-password`, { method: "POST", body: formData }); | ||||
|  | ||||
|       etapiAuthToken = ( | ||||
|         await ( | ||||
|           await fetch(`${HOST}/etapi/auth/login`, { | ||||
|             method: "POST", | ||||
|             headers: { | ||||
|               "Content-Type": "application/json", | ||||
|             }, | ||||
|             body: JSON.stringify({ password: "1234" }), | ||||
|           }) | ||||
|         ).json() | ||||
|       ).authToken; | ||||
|     }); | ||||
|  | ||||
|     afterAll(() => { | ||||
|       console.log( | ||||
|         "Attempting to kill the Trilium process as part of the cleanup..." | ||||
|       ); | ||||
|       if (!appProcess.pid) { | ||||
|         console.log("Trilium process not found. Cannot kill."); | ||||
|         return; | ||||
|       } | ||||
|        | ||||
|       kill(appProcess.pid, "SIGKILL", (error) => { | ||||
|         if (error) { | ||||
|           console.error("Failed to kill the Trilium process.", error); | ||||
|         } | ||||
|         console.log("Trilium process killed."); | ||||
|       }); | ||||
|     }); | ||||
|  | ||||
|     specDefinitions(); | ||||
|   | ||||
| @@ -1151,7 +1151,7 @@ class BNote extends AbstractBeccaEntity<BNote> { | ||||
|             .map(row => new BAttachment(row)); | ||||
|     } | ||||
|  | ||||
|     getAttachmentByTitle(title: string): BAttachment { | ||||
|     getAttachmentByTitle(title: string): BAttachment | undefined { | ||||
|         // cannot use SQL to filter by title since it can be encrypted | ||||
|         return this.getAttachments().filter(attachment => attachment.title === title)[0]; | ||||
|     } | ||||
|   | ||||
| @@ -301,7 +301,7 @@ export default class GlobalMenuWidget extends BasicWidget { | ||||
|     } | ||||
|  | ||||
|     async fetchLatestVersion() { | ||||
|         const RELEASES_API_URL = "https://api.github.com/repos/zadam/trilium/releases/latest"; | ||||
|         const RELEASES_API_URL = "https://api.github.com/repos/TriliumNext/Notes/releases/latest"; | ||||
|  | ||||
|         const resp = await fetch(RELEASES_API_URL); | ||||
|         const data = await resp.json(); | ||||
|   | ||||
| @@ -41,22 +41,20 @@ function returnImageInt(image: BNote | BRevision | null, res: Response) { | ||||
| } | ||||
|  | ||||
| function renderSvgAttachment(image: BNote | BRevision, res: Response, attachmentName: string) { | ||||
|     let svgString = '<svg/>' | ||||
|     let svg: string | Buffer = '<svg/>' | ||||
|     const attachment = image.getAttachmentByTitle(attachmentName); | ||||
|  | ||||
|     const content = attachment.getContent(); | ||||
|     if (attachment && typeof content === "string") { | ||||
|         svgString = content; | ||||
|     if (attachment) { | ||||
|         svg = attachment.getContent(); | ||||
|     } else { | ||||
|         // backwards compatibility, before attachments, the SVG was stored in the main note content as a separate key | ||||
|         const contentSvg = image.getJsonContentSafely()?.svg; | ||||
|  | ||||
|         if (contentSvg) { | ||||
|             svgString = contentSvg; | ||||
|             svg = contentSvg; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     const svg = svgString | ||||
|     res.set('Content-Type', "image/svg+xml"); | ||||
|     res.set("Cache-Control", "no-cache, no-store, must-revalidate"); | ||||
|     res.send(svg); | ||||
|   | ||||
| @@ -5,7 +5,6 @@ import { JSDOM } from "jsdom"; | ||||
| import BNote from "../../becca/entities/bnote.js"; | ||||
| import BAttribute from "../../becca/entities/battribute.js"; | ||||
| import { Request } from 'express'; | ||||
| import ValidationError from "../../errors/validation_error.js"; | ||||
|  | ||||
| function buildDescendantCountMap(noteIdsToCount: string[]) { | ||||
|     if (!Array.isArray(noteIdsToCount)) { | ||||
|   | ||||
| @@ -63,7 +63,7 @@ interface Api { | ||||
|      * Note where the script started executing (entrypoint). | ||||
|      * As an analogy, in C this would be the file which contains the main() function of the current process. | ||||
|      */ | ||||
|     startNote?: BNote; | ||||
|     startNote?: BNote | null; | ||||
|  | ||||
|     /** | ||||
|      * Note where the script is currently executing. This comes into play when your script is spread in multiple code | ||||
| @@ -76,7 +76,7 @@ interface Api { | ||||
|     /** | ||||
|      * Entity whose event triggered this execution | ||||
|      */ | ||||
|     originEntity?: AbstractBeccaEntity<any>; | ||||
|     originEntity?: AbstractBeccaEntity<any> | null; | ||||
|      | ||||
|     /** | ||||
|      * Axios library for HTTP requests. See {@link https://axios-http.com} for documentation | ||||
|   | ||||
| @@ -3,8 +3,8 @@ import AbstractBeccaEntity from "../becca/entities/abstract_becca_entity.js"; | ||||
| import BNote from "../becca/entities/bnote.js"; | ||||
|  | ||||
| export interface ApiParams { | ||||
|     startNote?: BNote; | ||||
|     originEntity?: AbstractBeccaEntity<any>; | ||||
|     startNote?: BNote | null; | ||||
|     originEntity?: AbstractBeccaEntity<any> | null; | ||||
|     pathParams?: string[], | ||||
|     req?: Request, | ||||
|     res?: Response | ||||
|   | ||||
| @@ -1 +1,4 @@ | ||||
| export default { buildDate:"2024-07-14T22:32:45+03:00", buildRevision: "b811f3d399aed7e740bd8e92ef7edc7d15de7038" }; | ||||
| export default { | ||||
|     buildDate: "2024-07-21T10:25:01Z", | ||||
|     buildRevision: "715a952148ae6e83fda0886f5ceec8dc329972ae" | ||||
| }; | ||||
|   | ||||
| @@ -95,10 +95,6 @@ function executeScript(script: string, params: ScriptParams, startNoteId: string | ||||
|         throw new Error("Unable to determine script bundle."); | ||||
|     } | ||||
|  | ||||
|     if (!startNote || !originEntity) { | ||||
|         throw new Error("Missing start note or origin entity."); | ||||
|     } | ||||
|  | ||||
|     return executeBundle(bundle, { startNote, originEntity }); | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -33,11 +33,8 @@ const numericComparators: Record<string, Comparator<number>> = { | ||||
| function buildComparator(operator: string, comparedValue: string) { | ||||
|     comparedValue = comparedValue.toLowerCase(); | ||||
|  | ||||
|     if (operator in numericComparators) { | ||||
|         const floatValue = parseFloat(comparedValue); | ||||
|         if (!isNaN(floatValue)) { | ||||
|             return numericComparators[operator](floatValue); | ||||
|         } | ||||
|     if (operator in numericComparators && !isNaN(+comparedValue)) { | ||||
|         return numericComparators[operator](parseFloat(comparedValue)); | ||||
|     } | ||||
|  | ||||
|     if (operator in stringComparators) { | ||||
|   | ||||
| @@ -41,15 +41,13 @@ function updateEntities(entityChanges: EntityChangeRecord[], instanceId: string) | ||||
|             atLeastOnePullApplied = true; | ||||
|         } | ||||
|  | ||||
|         if (entity) { | ||||
|         updateEntity(entityChange, entity, instanceId, updateContext); | ||||
|     } | ||||
|     } | ||||
|  | ||||
|     logUpdateContext(updateContext); | ||||
| } | ||||
|  | ||||
| function updateEntity(remoteEC: EntityChange, remoteEntityRow: EntityRow, instanceId: string, updateContext: UpdateContext) { | ||||
| function updateEntity(remoteEC: EntityChange, remoteEntityRow: EntityRow | undefined, instanceId: string, updateContext: UpdateContext) { | ||||
|     if (!remoteEntityRow && remoteEC.entityName === 'options') { | ||||
|         return; // can be undefined for options with isSynced=false | ||||
|     } | ||||
| @@ -74,14 +72,13 @@ function updateEntity(remoteEC: EntityChange, remoteEntityRow: EntityRow, instan | ||||
|     } | ||||
| } | ||||
|  | ||||
| function updateNormalEntity(remoteEC: EntityChange, remoteEntityRow: EntityRow, instanceId: string, updateContext: UpdateContext) { | ||||
|     const localEC = sql.getRow<EntityChange>(`SELECT * FROM entity_changes WHERE entityName = ? AND entityId = ?`, [remoteEC.entityName, remoteEC.entityId]); | ||||
| function updateNormalEntity(remoteEC: EntityChange, remoteEntityRow: EntityRow | undefined, instanceId: string, updateContext: UpdateContext) { | ||||
|     const localEC = sql.getRow<EntityChange | undefined>(`SELECT * FROM entity_changes WHERE entityName = ? AND entityId = ?`, [remoteEC.entityName, remoteEC.entityId]); | ||||
|     const localECIsOlderOrSameAsRemote = ( | ||||
|             localEC && localEC.utcDateChanged && remoteEC.utcDateChanged && | ||||
|             localEC.utcDateChanged <= remoteEC.utcDateChanged); | ||||
|  | ||||
|     if (!localEC.utcDateChanged || !remoteEC.utcDateChanged) { | ||||
|         throw new Error("Missing date changed."); | ||||
|     } | ||||
|  | ||||
|     if (!localEC || localEC.utcDateChanged <= remoteEC.utcDateChanged) { | ||||
|     if (!localEC || localECIsOlderOrSameAsRemote) { | ||||
|         if (remoteEC.isErased) { | ||||
|             if (localEC?.isErased) { | ||||
|                 eraseEntity(remoteEC); // make sure it's erased anyway | ||||
| @@ -104,7 +101,7 @@ function updateNormalEntity(remoteEC: EntityChange, remoteEntityRow: EntityRow, | ||||
|         } | ||||
|  | ||||
|         if (!localEC | ||||
|             || localEC.utcDateChanged < remoteEC.utcDateChanged | ||||
|             || localECIsOlderOrSameAsRemote | ||||
|             || localEC.hash !== remoteEC.hash | ||||
|             || localEC.isErased !== remoteEC.isErased | ||||
|         ) { | ||||
| @@ -113,7 +110,7 @@ function updateNormalEntity(remoteEC: EntityChange, remoteEntityRow: EntityRow, | ||||
|  | ||||
|         return true; | ||||
|     } else if ((localEC.hash !== remoteEC.hash || localEC.isErased !== remoteEC.isErased) | ||||
|                 && localEC.utcDateChanged > remoteEC.utcDateChanged) { | ||||
|                 && !localECIsOlderOrSameAsRemote) { | ||||
|         // the change on our side is newer than on the other side, so the other side should update | ||||
|         entityChangesService.putEntityChangeForOtherInstances(localEC); | ||||
|  | ||||
| @@ -140,7 +137,7 @@ function preProcessContent(remoteEC: EntityChange, remoteEntityRow: EntityRow) { | ||||
|     } | ||||
| } | ||||
|  | ||||
| function updateNoteReordering(remoteEC: EntityChange, remoteEntityRow: EntityRow, instanceId: string) { | ||||
| function updateNoteReordering(remoteEC: EntityChange, remoteEntityRow: EntityRow | undefined, instanceId: string) { | ||||
|     if (!remoteEntityRow) { | ||||
|         throw new Error(`Empty note_reordering body for: ${JSON.stringify(remoteEC)}`); | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user