# saber
**Repository Path**: codreamx/saber
## Basic Information
- **Project Name**: saber
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: GPL-3.0
- **Default Branch**: feat/editor-provider
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-04-22
- **Last Updated**: 2025-05-01
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
#
Saber
[
][google_play]
[
][f-droid]
[
][app_store]
[
][download_windows]
[
][flathub]
[
][download_appimage]
Unofficial packages:
[
][snap]
[
][copr]
[English](https://github.com/saber-notes/saber/blob/main/README.md) |
[čeština](https://github.com/saber-notes/saber/blob/main/README-cs.md) |
[Deutsch](https://github.com/saber-notes/saber/blob/main/README-de.md) |
[中文 (简体中文, 中国)](https://github.com/saber-notes/saber/blob/main/README-zh-CN.md) |
[中文 (繁體, 台灣)](https://github.com/saber-notes/saber/blob/main/README-zh-TW.md) |
[العربية](https://github.com/saber-notes/saber/blob/main/README-ar.md)
Saber 是一款专为手写而设计的笔记应用。
它的设计在尽可能简单和直观的同时仍然为您提供实际使用的独特功能。此外,Saber 可以在你所有的设备上使用,无论大屏幕还是小屏幕,并在它们之间无缝同步。
值得注意的是,当你使用黑暗模式时,它可以反转你的笔记颜色。这样你就可以在黑色背景上用白色墨水书写,在光线较暗的环境下,比如老师在课堂上关灯的时候,您可以看得更清楚。图像和 pdf 文件也可以被反转,所以您仍然可以使用数字打印输出或教科书,而不必大惊小怪。
Saber 使用双密码系统来保护您的笔记,除了您之外,任何人都无法查看您的笔记,即使他人完全控制了服务器。您可以将笔记安全地存储在 Saber 官方服务器、其他服务器或自己的服务器上!
这款应用程序完全开源,任何人都可以查看源代码,了解它的具体操作和数据处理方式。许多其他笔记应用程序都是闭源和专有的,这意味着它们的内部运作对公众来说是个谜。
作为一个学习数学的人,使用其他应用程序突出显示多行公式总是很麻烦,因为当荧光笔与自身重叠时会改变颜色。我遇到的另一个问题是,在某些应用程序中,荧光笔会显示在文本上方,使文本变淡,难以阅读。
Saber 的荧光笔就不会出现这种问题。它利用画布合成来渲染荧光笔,其处理重叠和保持颜色一致性的方式与传统纸张一致/优于传统纸张。
Saber 可以满足您整理笔记的一切需求。您可以随心所欲地创建文件夹内的文件夹,嵌套文件夹的数量不受限制。即使笔记被深埋在嵌套文件夹中,您仍然可以通过主屏幕上的最新笔记轻松访问它。
使用 Saber,探索一种全新的方式来捕捉和组织您的想法。无论您是学生、专业人士还是创意人士,Saber 都是您值得信赖的数字手写工具。立即下载,让您的创意自由流淌!
[](https://github.com/saber-notes/saber/releases/latest)
[](https://flathub.org/apps/details/com.adilhanney.saber)
[](https://f-droid.org/en/packages/com.adilhanney.saber/)
[](https://github.com/saber-notes/saber/releases)
[](https://flathub.org/apps/details/com.adilhanney.saber)
[](https://github.com/sponsors/adil192)
[](https://github.com/saber-notes/saber/blob/main/LICENSE.md)
[](https://codecov.io/gh/saber-notes/saber)
轻按显示/隐藏屏幕截图
## 特性
请阅读 [#1 Saber 进展][progress].
## 安装
点击显示/隐藏安装说明
#### Android
选项:
1. 从 [Play Store][google_play] 下载
2. 从 [F-Droid][f-droid] 下载
- 请注意,F-Droid 构建没有针对 Onyx Boox 设备进行优化,因为这将需要来自 Onyx 的[专有依赖](https://github.com/saber-notes/saber/issues/219)。
3. 从最新的 [Release][releases] 下载 `Saber_{version}.apk`。
#### Linux
选项 1 推荐:
从 [Flathub][flathub] 安装: `flatpak --user install com.adilhanney.saber`.
选项2 2:
从最新的 [Release][releases] 下载 `Saber-{version}-x86_64.AppImage`,使用 `chmod +x Saber-*-x86_64.AppImage` 使其可执行,然后运行它。
选项 3:
有一个非官方的 [snap][snap] 渠道,感谢 @soumyaDghosh。
`sudo snap install saber`
选项 4:
There's an unofficial Fedora Copr [repo][copr] available thanks to @jyo64.
`sudo dnf copr enable jyo64/Saber && sudo dnf install saber`
#### Windows
从最新的 [Release][releases] 现在和安装`SaberInstaller_{version}.exe`。
如果有丢失 dll 的错误,请确保已安装 [Visual C++ Redistributable](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist)。
#### iOS 和 macOS
从 [App Store][app_store] 下载 Saber。
## 从源代码构建
点击显示/隐藏构建说明
### 1. 安装 flutter
https://docs.flutter.dev/get-started/install
### 2. 克隆此项目
```bash
git clone https://github.com/saber-notes/saber.git
```
### 3. 下载依赖
```bash
flutter pub get
```
### 4. 安装其他依赖项
设置 [super_clipboard](https://pub.dev/packages/super_clipboard),可以总结为:
- 安装 [Rust](https://www.rust-lang.org/tools/install)
- 如果你要构建 Android,安装 NDK 26.1.10909125
### 5. 构建...
#### Linux
```bash
sudo apt install libsecret-1-dev libjsoncpp-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev webkit2gtk-4.1-dev
# Or for Fedora...
sudo dnf install libsecret-devel jsoncpp-devel gstreamer1-devel gstreamer1-plugins-base-devel webkit2gtk4.1-devel
flutter build linux
```
这对于在您自己的计算机上使用已经足够好了。但是如果您想重新分发您的构建,你需要使用一个可预测的环境:fork 这个仓库并使用 GitHub Action
[为 Linux 构建](https://github.com/saber-notes/saber/actions/workflows/linux.yml)。
#### Android
`flutter build apk`
你需要创建一个签名证书并创建 `android/key.properties` 文件。更多信息请参考:https://docs.flutter.dev/deployment/android#create-an-upload-keystore
注意:
FOSS/[F-Droid][f-droid-manifest] 构建的方式略有不同:
```bash
./patches/remove_proprietary_dependencies.sh
flutter build apk
```
#### Windows
`flutter build windows`
Windows 安装器使用 [Inno Setup](https://jrsoftware.org/isinfo.php) 创建。
要创建自己的安装程序,请运行上面的构建命令,然后编辑并使用 Inno Setup Compiler 运行
[installers/desktop_inno_script.iss](https://github.com/saber-notes/saber/blob/main/installers/desktop_inno_script.iss)
#### iOS 和 macOS
如果你有一台 macOS 电脑,就可以使用 `flutter build ipa`
[为 iOS 构建](https://docs.flutter.dev/deployment/ios#create-an-app-bundle)或者使用 `flutter build macos`
[为 macOS 构建](https://docs.flutter.dev/deployment/macos#create-a-build-archive-with-xcode)。
如果你不这样做,fork 这个仓库并使用 GitHub Action
[Build for macOS and iOS](https://github.com/saber-notes/saber/actions/workflows/apple.yml).
或者,跟随这个 YouTube 教程
[How to compile a flutter application to iPhone with no mac (free | no jailbreak)](https://www.youtube.com/watch?v=m3_6z2wfHiY)
使用 [Codemagic](https://codemagic.io/start/) 手动构建。
## 链接
- [Nextcloud server][nextcloud]
- [Privacy policy][privacy]
- [License][license]
- [Releases][releases]
## 翻译
所有的翻译都是众包的。到目前为止,Saber 被翻译成:
- 英语 ([en](https://github.com/saber-notes/saber/blob/main/lib/i18n/strings.i18n.yaml))
- 阿拉伯语 ([ar](https://github.com/saber-notes/saber/blob/main/lib/i18n/strings_ar.i18n.yaml))
- 捷克语 ([cs](https://github.com/saber-notes/saber/blob/main/lib/i18n/strings_cs.i18n.yaml))
- 德语 ([de](https://github.com/saber-notes/saber/blob/main/lib/i18n/strings_de.i18n.yaml))
- 西班牙语 ([es](https://github.com/saber-notes/saber/blob/main/lib/i18n/strings_es.i18n.yaml))
- 波斯语 ([fa](https://github.com/saber-notes/saber/blob/main/lib/i18n/strings_fa.i18n.yaml))
- 法语 ([fr](https://github.com/saber-notes/saber/blob/main/lib/i18n/strings_fr.i18n.yaml))
- 希伯来语 ([he](https://github.com/saber-notes/saber/blob/main/lib/i18n/strings_he.i18n.yaml))
- 匈牙利语 ([hu](https://github.com/saber-notes/saber/blob/main/lib/i18n/strings_hu.i18n.yaml))
- 意大利语 ([it](https://github.com/saber-notes/saber/blob/main/lib/i18n/strings_it.i18n.yaml))
- 日语 ([ja](https://github.com/saber-notes/saber/blob/main/lib/i18n/strings_ja.i18n.yaml))
- 巴西葡萄牙语 ([pt_BR](https://github.com/saber-notes/saber/blob/main/lib/i18n/strings_pt_BR.i18n.yaml))
- 俄语 ([ru](https://github.com/saber-notes/saber/blob/main/lib/i18n/strings_ru.i18n.yaml))
- 土耳其语 ([tr](https://github.com/saber-notes/saber/blob/main/lib/i18n/strings_tr.i18n.yaml))
- 简体中文 ([zh_Hans_CN](https://github.com/saber-notes/saber/blob/main/lib/i18n/strings_zh_Hans_CN.i18n.yaml))
- 繁体中文 ([zh_Hant_TW](https://github.com/saber-notes/saber/blob/main/lib/i18n/strings_zh_Hant_TW.i18n.yaml))
### 扩展现有语言
检查 [_missing_translations.yaml](https://github.com/saber-notes/saber/blob/main/lib/i18n/_missing_translations.yaml)
看看是否有翻译缺失。
1. 使用[这个链接](https://github.com/saber-notes/saber/edit/main/lib/i18n/_missing_translations.yaml)
编辑 `_missing_translations.yaml`.
2. 用你的语言更新 `_missing_translations.yaml` ,例如更新德语(de)
```yaml
de:
editor:
newerFileFormat:
title: Diese Notiz wurde mit einer neueren Version von Saber bearbeitet
subtitle: Wenn du diese Notiz bearbeitest, können Daten verloren gehen. Möchtest du die Notiz trotzdem öffnen?
openAnyway: Trotzdem öffnen
cancel: Abbruch
# ignore the other languages...
```
3. 打开拉取请求!剩下的我来做
### 添加一个新语言
1. 查找您的地区代码 [这里](https://saimana.com/list-of-country-locale-code/),
如:印地语是 `hi`,法语是 `fr`,孟加拉语是 `bn`,阿拉伯语是 `ar`,等等。
2. 使用 [这个链接](https://github.com/saber-notes/saber/new/main/lib/i18n)
在 `lib/i18n/` 创建新文件,命名为 `strings_XX.i18n.yaml`
其中 `XX` 是您的地区代码。
3. 复制现有文件的内容,例如
[`lib/i18n/strings.i18n.yaml`](https://github.com/saber-notes/saber/blob/main/lib/i18n/strings.i18n.yaml)
并用你自己的翻译代替。
如果您不知道字符串的翻译,只需删除该行。
4. 打开拉取请求!
也可以参考 [`slang`'s Getting Started](https://pub.dev/packages/slang#getting-started) 获取更多信息。
### 翻译应用商店描述
我们有两种格式的应用商店描述:
1. F-Droid/Play Store:
i. 打开 `metadata/en-US/` 并复制
[`full_description.txt`](https://github.com/saber-notes/saber/blob/main/metadata/en-US/full_description.txt)
和
[`short_description.txt`](https://github.com/saber-notes/saber/blob/main/metadata/en-US/short_description.txt)
文件到 `metadata/XX/` 文件夹,其中 `XX` 是您的地区代码.
然后翻译文件的内容。
ii. 更改日志会自动从英文版本翻译过来。
如果您发现错误,请编辑翻译后的变更日志
`metadata/XX/changelogs/.txt` 其中 `XX` 是您的地区代码。
2. Linux .desktop 文件:
i. 打开
[`flatpak/com.adilhanney.saber.desktop`](https://github.com/saber-notes/saber/blob/main/flatpak/com.adilhanney.saber.desktop)
并为 `Comment` 键添加一行,格式如下,其中 `XX` 是您的地区代码:
```ini
Comment[XX]=Your translation
```
如果还需要翻译 `Name` 键,请执行相同操作
3. Flathub(可选):
i. Since this is slightly more technical, you can skip the Flathub part if you
want to and I'll copy the translations from the above section.
ii. In [`flatpak/com.adilhanney.saber.metainfo.xml`](https://github.com/saber-notes/saber/blob/main/flatpak/com.adilhanney.saber.metainfo.xml)
before the `` closing tag, add a line for your translation
with the following format where `XX` is your locale code:
```html
Your translation
```
iii. 在同一个文件中,您可以通过执行同样的操作来翻译变更日志
在它们的 `` 结束标记之前的 `` 标记中的东西。
## 支持 Saber
如果您喜欢 Saber,请考虑通过以下方式予以支持:
- 传播消息!
- 在 GitHub 上 Star 项目
- 在 [GitHub 赞助商](https://github.com/sponsors/adil192)上赞助我
- 通过 [PayPal](https://paypal.me/adilhanney) 捐款
- 在 Nextcloud 服务器上购买更多存储:请参阅 [定价](pricing.md)
## 开发注意事项
显示/隐藏开发说明
- 当更新**应用版本**时:
- 运行 `./scripts/bump_version.sh `
(运行 `./scripts/bump_version.sh --help` 获取更多信息)
- 更新 `metadata/en-US/changelogs/` 中的变更日志和 `flatpak/com.adilhanney.saber.metainfo.xml`,并按照剧本的指示运行 `dart scripts/translate_changelogs.dart`。
- 当更新**图标**时,运行以下命令:
- 概述:`dart run icons_launcher:create`
- Flatpak 图标:`cd assets/icon && ./resize-icon.sh`
- 当更新**翻译**时...
- 运行以下命令:
- 如果你需要应用 _missing_translations.yaml:`dart run slang apply --locale=XX`
- `dart run slang`
- `dart run slang analyze --full`
- 如果要添加新语言,请更新:
- `CFBundleLocalizations` 在 `ios/Runner/Info.plist`
- `CFBundleLocalizations` 在 `macos/Runner/Info.plist`
- `android/app/src/main/res/xml/locales_config.xml`
- `lib/data/locales.dart`
- `README.md` 上面的“翻译”部分。
- 并运行 `dart scripts/translate_changelogs.dart` 翻译更新日志。
[f-droid]: https://f-droid.org/packages/com.adilhanney.saber/
[flathub]: https://flathub.org/apps/details/com.adilhanney.saber
[google_play]: https://play.google.com/store/apps/details?id=com.adilhanney.saber
[snap]: https://snapcraft.io/saber
[app_store]: https://apps.apple.com/us/app/saber/id1671523739
[download_windows]: https://github.com/saber-notes/saber/releases/download/v0.25.4/SaberInstaller_v0.25.4.exe
[download_appimage]: https://github.com/saber-notes/saber/releases/download/v0.25.4/Saber-0.25.4-x86_64.AppImage
[nextcloud]: https://nc.saber.adil.hanney.org/
[privacy]: https://github.com/saber-notes/saber/blob/main/privacy_policy.md
[license]: https://github.com/saber-notes/saber/blob/main/LICENSE.md
[releases]: https://github.com/saber-notes/saber/releases
[issues]: https://github.com/saber-notes/saber/issues
[progress]: https://github.com/saber-notes/saber/discussions/1
[f-droid-manifest]: https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/com.adilhanney.saber.yml