Skip to content

Commit

Permalink
add wonderpen
Browse files Browse the repository at this point in the history
  • Loading branch information
pugaizai committed Dec 20, 2024
1 parent bbcf0de commit f5182e2
Show file tree
Hide file tree
Showing 6 changed files with 189 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
run: |
git config --global protocol.file.allow always
flatpak-builder build-dir manifests/com.tominlab.wonderpen/com.tominlab.wonderpen.yaml --repo=repo --arch=x86_64 --default-branch=stable --force-clean --user --install-deps-from=flathub --gpg-sign=${{ secrets.GPG_KEY_FINGERPRINT }} --ccache --disable-rofiles-fuse
flatpak-builder build-dir manifests/io.github.venera_app.venera/io.github.venera_app.venera.yaml --repo=repo --arch=x86_64 --default-branch=stable --force-clean --user --install-deps-from=flathub --gpg-sign=${{ secrets.GPG_KEY_FINGERPRINT }} --ccache --disable-rofiles-fuse
flatpak-builder build-dir manifests/com.hoppscotch.hoppscotch/com.hoppscotch.hoppscotch.yaml --repo=repo --arch=x86_64 --default-branch=stable --force-clean --user --install-deps-from=flathub --gpg-sign=${{ secrets.GPG_KEY_FINGERPRINT }} --ccache --disable-rofiles-fuse
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- com.larksuite.Lark
- com.qq.qq
- io.github.venera_app.venera
- com.tominlab.wonderpen

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion manifests/com.cursor.cursor/com.cursor.cursor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ modules:
- type: extra-data
filename: cursor.AppImage
only-arches: [aarch64]
url: https://download.todesktop.com/230313mzl4w4u92/cursor-0.44.2-build-241218ntls52u8v-arm64.AppImage
url: https://download.todesktop.com/230313mzl4w4u92/cursor-0.44.5-build-241220s3ux0e1tv-arm64.AppImage
sha256: 680489d8860fc8426350ca29d09e43cee96e680f2aabf44765bc9a1e902df246
size: 166088771
# x-checker-data:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>com.tominlab.wonderpen</id>
<launchable type="desktop-id">com.tominlab.wonderpen.desktop</launchable>
<name>WonderPen</name>
<name xml:lang="zh_CN">妙笔</name>
<developer_name>TominLab</developer_name>
<summary>Write novels and essays</summary>
<summary xml:lang="zh_CN">强大易用的写作软件</summary>
<metadata_license>CC0-1.0</metadata_license>
<project_license>LicenseRef-proprietary=https://www.tominlab.com/en/terms/service</project_license>
<url type="homepage">https://www.tominlab.com/en/wonderpen</url>
<url type="contact">https://www.tominlab.com/en/contact</url>
<url type="faq">https://help.tominlab.com/en/wonderpen/guides</url>
<description>
<p>Note: If you want to place the library in a different path, please grant access to the relevant folder through flatseal or other tools.</p>
<p xml:lang="zh_CN">注意:如果你要将库放在不同的路径,请通过 flatseal 或其他工具给予相关文件夹访问权限。</p>
<p>WonderPen is a powerful and easy-to-use writing app, whether you are a writer, a student or a writing enthusiast, you can use it to complete your writing.</p>
<p xml:lang="zh_CN">妙笔是一个强大且易用的写作工具,无论您是作家、学生还是写作爱好者,都可以使用它完成您的作品。</p>
<p>Features:</p>
<p xml:lang="zh_CN">功能特性:</p>
<ul>
<li>Tree-like multi-level directory, you can drag and drop to sort or change the nesting relationship at will, so that the directory structure of the long book is clear at a glance.</li>
<li xml:lang="zh_CN">树状多级目录,可随意拖拽排序或改变嵌套关系,让长篇巨著的目录结构一目了然。</li>
<li>An easy-to-use text editor that supports Markdown syntax.</li>
<li xml:lang="zh_CN">简单易用的文本编辑器,支持 Markdown 语法。</li>
<li>It can be switched to a full-screen composition mode to eliminate distractions and concentrate on writing.</li>
<li xml:lang="zh_CN">可切换为全屏专注模式,排除干扰,专心写作。</li>
<li>Easily export to image, PDF, Epub, Word, HTML and other formats.</li>
<li xml:lang="zh_CN">便捷地导出为图片、PDF、Epub、Word、HTML 等多种格式。</li>
<li>Supports whiteboard mode, where you can add notes, images, checklist, tables, kanban and other content arbitrarily.</li>
<li xml:lang="zh_CN">支持白板模式,可在其中任意添加便笺、表格、看板等内容。</li>
<li>Individual memos can be added to each document.</li>
<li xml:lang="zh_CN">每个文档都可以添加单独的备注。</li>
<li>At the same time, it supports global note cards, which is convenient for reference when writing across documents.</li>
<li xml:lang="zh_CN">同时支持全局备注卡片,方便跨文档写作时参考。</li>
<li>When there are too many documents, it can focus on a node in the document tree and hide others.</li>
<li xml:lang="zh_CN">当文档太多时,可聚焦于文档树中的一个节点,隐匿其余细节。</li>
<li>Support full-text search and replace.</li>
<li xml:lang="zh_CN">支持全文搜索及替换。</li>
<li>Support chapter splitting and merging.</li>
<li xml:lang="zh_CN">支持章节切分以及合并。</li>
<li>Documents are automatically saved after modification.</li>
<li xml:lang="zh_CN">文档修改后自动保存。</li>
<li>Support document snapshot and full library backup, support automatic backup, to ensure data security without losing manuscripts.</li>
<li xml:lang="zh_CN">支持文档快照以及全库备份,支持自动备份,确保数据安全不丢稿。</li>
<li>Supports dark mode, and has built-in multiple themes such as green, yellow, and gray.</li>
<li xml:lang="zh_CN">支持夜间模式,还内置了浅绿、淡黄、深灰等多个主题。</li>
<li>Provides a large number of personalized settings, and can also add custom CSS to meet various usage habits.</li>
<li xml:lang="zh_CN">提供大量个性化设置,还可自定义 CSS,满足多种使用习惯。</li>
</ul>
<p>Hope you enjoy this app as much as we do. If you have any questions or suggestions during use, you can contact us through the "Feedback" option in the "Help" menu, or send us an email: [email protected] .</p>
<p xml:lang="zh_CN">希望您像我们一样,喜爱这个应用。使用过程中有任何问题或建议,都可以通过「帮助」菜单中的「意见反馈」选项联系我们,或者也可以给我们发送邮件:[email protected]。</p>
</description>

<screenshots>
<screenshot type="default">
<image>https://cdn.tominlab.com/upload/2023/08/12/wonderpen-en.png</image>
<image xml:lang="zh_CN">https://cdn.tominlab.com/upload/2023/11/19/wonderpen.png</image>
<caption>Homepage</caption>
<caption xml:lang="zh_CN">主页</caption>
</screenshot>
</screenshots>

<releases>
<release version="2.5.5" date="2024-09-17">
<description></description>
</release>
<release version="2.5.4" date="2024-09-15">
<description/>
</release>
<release version="2.5.1" date="2024-07-09">
<description/>
</release>
<release version="2.5.0" date="2024-06-21">
<description/>
</release>
<release version="2.5.0" date="2024-06-21">
<description/>
</release>
<release version="2.4.7" date="2024-05-29">
<description/>
</release>
<release version="2.4.6" date="2024-05-13"/>
<release version="2.4.5" date="2024-05-10"/>
<release version="2.4.4" date="2024-02-28"/>
<release version="2.4.3" date="2024-01-25"/>
</releases>
<content_rating type="oars-1.1"/>
<update_contact>[email protected]</update_contact>
</component>
93 changes: 93 additions & 0 deletions manifests/com.tominlab.wonderpen/com.tominlab.wonderpen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
app-id: com.tominlab.wonderpen
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
base: org.electronjs.Electron2.BaseApp
base-version: '24.08'
separate-locales: false
rename-icon: wonderpen
rename-desktop-file: wonderpen.desktop
command: wonderpen
finish-args:
- --share=ipc
- --socket=wayland
- --socket=fallback-x11
- --device=dri
- --share=network
- --filesystem=xdg-documents
# required to fix cursor scaling on wayland
- --env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons

add-extensions:
org.freedesktop.Platform.Electron:
version: '24.08'
directory: electron

modules:
- name: wonderpen
buildsystem: simple
build-options:
no-debuginfo: true
build-commands:
- bsdtar --to-stdout -xf wonderpen.deb data.* | bsdtar -xf -
- rm -r usr/share/doc
- rm -r opt/WonderPen/resources/app.asar.unpacked/node_modules/better-sqlite3
- mkdir -p ${FLATPAK_DEST}/electron
- cp -a opt/WonderPen/resources ${FLATPAK_DEST}/WonderPen
- cp -a usr/share ${FLATPAK_DEST}/
- desktop-file-edit --set-key="Exec" --set-value="wonderpen %U" ${FLATPAK_DEST}/share/applications/wonderpen.desktop
- desktop-file-edit --set-key="Name[zh_CN]" --set-value="妙笔" ${FLATPAK_DEST}/share/applications/wonderpen.desktop
- desktop-file-edit --set-key="Name[zh_TW]" --set-value="妙筆" ${FLATPAK_DEST}/share/applications/wonderpen.desktop
- install -Dm644 com.tominlab.wonderpen.metainfo.xml -t /app/share/metainfo
- install -Dm755 wonderpen.sh /app/bin/wonderpen
- install -Dm755 better_sqlite3.node -t ${FLATPAK_DEST}/WonderPen/app.asar.unpacked/node_modules/better-sqlite3/build/Release
sources:
- type: archive
only-arches: [x86_64]
url: https://github.com/pugaizai/better-sqlite3/releases/download/v11.7.0/better-sqlite3-v11.7.0-electron-v130-linux-x64.tar.gz
sha256: 682a396367e4c20fd7040febb699ea5fe49d88f60ae475ff42806227707a0e7c
strip-components: 2
x-checker-data:
type: json
url: https://api.github.com/repos/pugaizai/better-sqlite3/releases/latest
version-query: .tag_name | sub("^v"; "")
url-query: >-
.assets[] | select(.name | "better-sqlite3-v" + $version + "-electron-v130-linux-x64.tar.gz")
|
.browser_download_url
- type: archive
only-arches: [aarch64]
url: https://github.com/pugaizai/better-sqlite3/releases/download/v11.7.0/better-sqlite3-v11.7.0-electron-v130-linux-arm64.tar.gz
sha256: c6e5a5ccd77dcd7be1d8742f26923ca80435745238d29f4257f807bce23227b9
strip-components: 2
x-checker-data:
type: json
url: https://api.github.com/repos/pugaizai/better-sqlite3/releases/latest
version-query: .tag_name | sub("^v"; "")
url-query: >-
.assets[] | select(.name | "better-sqlite3-v" + $version + "-electron-v130-linux-arm64.tar.gz")
|
.browser_download_url
- type: file
dest-filename: wonderpen.deb
url: https://file.tominlab.com/WonderPen/2.5/WonderPen_linux_amd64_2.5.8(7566).deb
sha256: d776212650f30dafcf942fbee54b883133c09d06c7ac870c0f44a207b1a9dbbe
x-checker-data:
type: json
url: https://app.tominlab.com/api/product/wonderpen/downloads/latest
version-query: .data[0] | .version
url-query: .data[] | select(.format=="linux_deb" and (.url | contains("amd64")))
| "https://file.tominlab.com/" + .url
- type: file
path: com.tominlab.wonderpen.metainfo.xml
- type: script
dest-filename: wonderpen.sh
commands:
- export TMPDIR=${XDG_RUNTIME_DIR}/app/${FLATPAK_ID}
- WAYLAND_SOCKET=${WAYLAND_DISPLAY:-"wayland-0"}
- |
if [[ -e "${XDG_RUNTIME_DIR}/${WAYLAND_SOCKET}" || -e "${WAYLAND_DISPLAY}" ]]
then
FLAGS="--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime --wayland-text-input-version=3"
fi
- exec zypak-wrapper "/app/electron/electron" "/app/WonderPen/app.asar" $FLAGS "$@"
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,4 @@ modules:
then
FLAGS="--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime --wayland-text-input-version=3"
fi
- exec zypak-wrapper "/app/electron/electron" "/app/bilibili/app.asar" $FLAGS
"$@"

- exec zypak-wrapper "/app/electron/electron" "/app/bilibili/app.asar" $FLAGS "$@"

0 comments on commit f5182e2

Please sign in to comment.