From d8bf0a92f4a4043913f577dce542a1daf5d5effc Mon Sep 17 00:00:00 2001 From: pan93412 Date: Fri, 20 Jan 2023 13:26:42 +0800 Subject: [PATCH 1/6] docs(cn): Correct the bash comment --- README_CN.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README_CN.md b/README_CN.md index 902c676..79df993 100644 --- a/README_CN.md +++ b/README_CN.md @@ -20,21 +20,21 @@ ## 特征 -🏂 **小**:相比传统的 Electron 套壳打包,要小将近 40 倍,不到 3M。 -😂 **快**:Pake 的底层使用的 Rust Tauri 框架,性能体验较 JS 框架要轻快不少,内存小很多。 -🩴 **特**:不是单纯打包,实现了快捷键的透传、沉浸式的窗口、拖动、样式改写、去广告、产品的极简风格定制。 +🏂 **小**:相比传统的 Electron 套壳打包,要小将近 40 倍,不到 3M。 +😂 **快**:Pake 的底层使用的 Rust Tauri 框架,性能体验较 JS 框架要轻快不少,内存小很多。 +🩴 **特**:不是单纯打包,实现了快捷键的透传、沉浸式的窗口、拖动、样式改写、去广告、产品的极简风格定制。 🐶 **玩**:只是一个很简单的小玩具,用 Rust 替代之前套壳网页打包的老思路,其实 PWA 也很好。 ## 常用包下载 - - - - - - - -
WeRead + WeRead Mac Windows Linux Twitter + Twitter Mac Windows Linux @@ -45,12 +45,12 @@
LiZhi + LiZhi Mac Windows Linux YouTube + YouTube Mac Windows Linux @@ -61,12 +61,12 @@
Qwerty + Qwerty Mac Windows Linux Reference + Reference Mac Windows Linux @@ -77,12 +77,12 @@
Library + Library Mac Windows Linux ChatGPT + ChatGPT Mac Windows Linux @@ -133,13 +133,13 @@ **Pake 提供了命令行工具,可以更快捷方便地一键自定义打你需要的包,详细可见 [文档](./bin/README.md)。** ```bash -// 使用 npm 进行安装 +# 使用 npm 进行安装 npm install -g pake-cli -// 命令使用 +# 命令使用 pake url [options] -// 随便玩玩,首次由于安装环境会有些慢,后面就快了 +# 随便玩玩,首次由于安装环境会有些慢,后面就快了 pake https://weekly.tw93.fun --name Weekly --transparent ``` @@ -150,16 +150,16 @@ pake https://weekly.tw93.fun --name Weekly --transparent 开始前请确保电脑已经安装了 Rust `>=1.63` 和 Node `>=16 如 16.18.1` 的环境,此外需参考 [Tauri 文档](https://tauri.app/v1/guides/getting-started/prerequisites) 快速配置好环境才可以开始使用,假如你太不懂,使用上面的命令行打包会更加合适。 ```sh -// 安装依赖 +# 安装依赖 npm i -// 本地开发 +# 本地开发 npm run dev -// 本地调试 +# 本地调试 npm run dev:debug -// 打包应用 +# 打包应用 npm run build ``` From ecbe22cc4c9fe8a282e93164db4f3550b5499767 Mon Sep 17 00:00:00 2001 From: pan93412 Date: Fri, 20 Jan 2023 13:55:46 +0800 Subject: [PATCH 2/6] docs(cn): Correct the newline of Features --- README_CN.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README_CN.md b/README_CN.md index 79df993..ebca89c 100644 --- a/README_CN.md +++ b/README_CN.md @@ -20,9 +20,9 @@ ## 特征 -🏂 **小**:相比传统的 Electron 套壳打包,要小将近 40 倍,不到 3M。 -😂 **快**:Pake 的底层使用的 Rust Tauri 框架,性能体验较 JS 框架要轻快不少,内存小很多。 -🩴 **特**:不是单纯打包,实现了快捷键的透传、沉浸式的窗口、拖动、样式改写、去广告、产品的极简风格定制。 +🏂 **小**:相比传统的 Electron 套壳打包,要小将近 40 倍,不到 3M。\ +😂 **快**:Pake 的底层使用的 Rust Tauri 框架,性能体验较 JS 框架要轻快不少,内存小很多。\ +🩴 **特**:不是单纯打包,实现了快捷键的透传、沉浸式的窗口、拖动、样式改写、去广告、产品的极简风格定制。\ 🐶 **玩**:只是一个很简单的小玩具,用 Rust 替代之前套壳网页打包的老思路,其实 PWA 也很好。 ## 常用包下载 From 4017dfee8e2d432886d6ac0b832e9f7496869c8e Mon Sep 17 00:00:00 2001 From: pan93412 Date: Fri, 20 Jan 2023 14:47:04 +0800 Subject: [PATCH 3/6] docs(cn): Correct the cmdline argument hint --- README_CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_CN.md b/README_CN.md index ebca89c..d678c13 100644 --- a/README_CN.md +++ b/README_CN.md @@ -137,7 +137,7 @@ npm install -g pake-cli # 命令使用 -pake url [options] +pake url [OPTIONS]... # 随便玩玩,首次由于安装环境会有些慢,后面就快了 pake https://weekly.tw93.fun --name Weekly --transparent From 7f077809c33ea4465ba54d7a087a78f2c2f37db7 Mon Sep 17 00:00:00 2001 From: pan93412 Date: Fri, 20 Jan 2023 13:47:41 +0800 Subject: [PATCH 4/6] docs(bin/cn): Use GitHub's Info Box --- bin/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/README.md b/bin/README.md index 79b5b02..7e37211 100644 --- a/bin/README.md +++ b/bin/README.md @@ -43,7 +43,8 @@ pake url [options] 打包完成后的应用程序默认为当前工作目录,首次打包由于需配置好环境,需要一些时间,请耐心等待即可。 -Note: 打包需要用 `Rust` 环境,如果没有 `Rust`,会提示确认安装。如遇安装失败或超时,可[自行安装](https://www.rust-lang.org/tools/install)。 +> **Note**: +> 打包需要用 `Rust` 环境,如果没有 `Rust`,会提示确认安装。如遇安装失败或超时,可[自行安装](https://www.rust-lang.org/tools/install)。 ### url From 93ef7a6fc7604f3b3f4a6864e49f810910e53988 Mon Sep 17 00:00:00 2001 From: pan93412 Date: Fri, 20 Jan 2023 13:44:35 +0800 Subject: [PATCH 5/6] docs(bin/en): Rewrite --- bin/README_EN.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/bin/README_EN.md b/bin/README_EN.md index cbb8982..f8b3825 100644 --- a/bin/README_EN.md +++ b/bin/README_EN.md @@ -1,16 +1,15 @@ ## Install -Please ensure that Node version>=16, such as 16.8, do not use sudo for installation. -If the npm report has no permission, you can refer to [How to fix npm throwing error without sudo](https://stackoverflow.com/questions/16151018/how-to-fix-npm-throwing-error-without-sudo). +Ensure your Node.js installation is greater than `16`, such as `16.8`. Do not use `sudo` to install. If `npm` reports that you don't have permission to install this, see [How to fix npm throwing error without sudo](https://stackoverflow.com/questions/16151018/how-to-fix-npm-throwing-error-without-sudo). ```bash npm install -g pake-cli ``` -## Windows and Linux considerations +## Notes for Windows & Linux users -- **Very important**, check out the dependency guide provided by Tauri [link](https://tauri.app/v1/guides/getting-started/prerequisites). -- For windows (at least installed `Win10 SDK (10.0.19041.0)` and `Visual Studio build tool 2022(>=17.2)`), additional installation is required: +- **VERY IMPORTANT**: Check out [the Tauri prerequisites](https://tauri.app/v1/guides/getting-started/prerequisites) before proceeding. +- For Windows users who had been installed `Win10 SDK (10.0.19041.0)` and `Visual Studio build tool 2022(>=17.2)`, you may need to install these additionally: 1. Microsoft Visual C++ 2015-2022 Redistributable (x64) 2. Microsoft Visual C++ 2015-2022 Redistributable (x86) @@ -18,7 +17,7 @@ npm install -g pake-cli 4. Microsoft Visual C++ 2013 Redistributable (x86) (optional) 5. Microsoft Visual C++ 2008 Redistributable (x86) (optional) -- In addition, Ubuntu can run the following command before starting to install the required dependencies in the early stage. +- For Ubuntu users, run the following commands to install the required libraries before compiling: ```bash sudo apt install libdbus-1-dev \ @@ -42,21 +41,22 @@ npm install -g pake-cli pake url [options] ``` -After the packaging, the application defaults to the current working directory. Since the environment needs to be configured for the first packaging, it will take some time. Please wait patiently. +The packaged application will be placed in the current working directory by default. Since the environment needs to be configured for the first packaging, it will take some time. Please wait patiently. -Note: The Rust environment is required for packaging. If you do not have Rust, you will be prompted to confirm the installation. If the installation fails or times out, you can [install](https://www.rust-lang.org/tools/install) it yourself. +> **Note**: +> The Rust environment is required for packaging. If you have not installed Rust, you will be prompted to confirm the installation. If the installation fails or times out, you can [install](https://www.rust-lang.org/tools/install) by yourself. ### url -The url🔗 is the webpage link you need to package, Must be provided. +The url🔗 is the link to the website you want to package. Required. ### [options] -Some specific options are provided. When packaging, corresponding parameters can be passed to achieve customized effects. +We provide some options for customization. When packaging, the corresponding arguments can be passed to configure your app. #### [name] -The application name, if not specified when entering, will prompt you to enter, input must be English. +The name of your application. We will prompt you to enter this if you do not provide it in this phase. Input must be in English. ```shell --name @@ -64,9 +64,9 @@ The application name, if not specified when entering, will prompt you to enter, #### [icon] -The application icon, support local and remote files, the default is brand icon of Pake. Customized product icon can go to [icon icons](https://icon-icons.com) Or [macOSicons](https://macosicons.com/#/) download it. +The application icon. Support local and remote files. By default, it is the brand icon of Pake. For customizing the icon of your product, go to [icon icons](https://icon-icons.com) or [macOSicons](https://macosicons.com/#/) to download it. -- MacOS must be `.icns` +- macOS must be `.icns` - Windows must be `.ico` - Linux must be `.png` @@ -100,7 +100,7 @@ Whether to enable the immersive header. The default is `false`. #### [resize] -Whether the size can be dragged. The default value is `true`. +Indicates if the window can be resized. The default value is `true`. ```shell --no-resizable @@ -108,7 +108,7 @@ Whether the size can be dragged. The default value is `true`. #### [fullscreen] -Whether to open the full screen after opening the application. The default is `false`. +Indicates if the window should be full screen on application launch. The default is `false`. ```shell --fullscreen From af23291f6a504ea5a112ab20d7354149a5eb3154 Mon Sep 17 00:00:00 2001 From: pan93412 Date: Fri, 20 Jan 2023 13:26:51 +0800 Subject: [PATCH 6/6] docs(en): Rewrite --- README.md | 94 ++++++++++++++++++++++++------------------------ bin/README_EN.md | 4 +-- 2 files changed, 48 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index 6102215..8312d41 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@

Pake

-

Simply make any web page a desktop application using rust.

+

Turn any webpage into a desktop app with Rust with ease.

twitter @@ -17,25 +17,25 @@ GitHub closed issues
-
Support Mac / Windows / Linux, about popular downloadscommand line packingcustom development can be found in readme. Welcome to discussions to see if there have anything you're interesting.
+
Pake supports Mac, Windows, and Linux. Check out README for Popular Packages, Command-Line Packaging, and Customized Development information. Feel free to share your suggestions in Discussions
## Features -🏂 **Small**:Nearly 40 times smaller than Electron package, less than 3M. -😂 **Fast**:Using the Rust Tauri, it`s much lighter and faster than JS. -🩴 **Special**:Not just packaged, with shortcut pass-through, immersive windows, minimalist customization. -🐶 **Toy**:Just a simple way to play with Rust instead of the old idea of shelling the web. +🏂 **Small**: Nearly 40 times smaller than an Electron package (less than 3M!) \ +😂 **Fast**: With Rust Tauri, Pake is much more lightweight and faster than JS-based frameworks. \ +🩴 **Special**: Battery-included package — shortcut pass-through, immersive windows, and minimalist customization. \ +🐶 **Toy**: Pake is just a simple tool — replace the old bundle approach with Rust (though PWA is good enough). -## Popular Downloads +## Popular Packages - - - - - - - -
WeRead + WeRead Mac Windows Linux Twitter + Twitter Mac Windows Linux @@ -46,12 +46,12 @@
LiZhi + LiZhi Mac Windows Linux YouTube + YouTube Mac Windows Linux @@ -62,12 +62,12 @@
Qwerty + Qwerty Mac Windows Linux Reference + Reference Mac Windows Linux @@ -78,12 +78,12 @@
Library + Library Mac Windows Linux ChatGPT + ChatGPT Mac Windows Linux @@ -96,7 +96,7 @@
-🏂More applications such as Flomo / YuQue / RunCode can be downloaded from Release, click to expand shortcut descriptions +🏂 You can download more applications (such as Flomo / YuQue / RunCode) from Releases. Click here to expand the shortcuts reference!
@@ -113,67 +113,65 @@ | + = | Ctrl + = | Zoom in the Page | | + 0 | Ctrl + 0 | Reset the page zoom | -In addition, it supports double-clicking the head to switch to full screen, Mac users support gesture mode to return and go to the next page, and dragging the head to move the window. +In addition, double-click the title bar to switch to full-screen mode. For Mac users, you can also use the gesture to go to the previous or next page and drag the title bar to move the window.
-## Before you start +## Before starting -1. **Beginner users**: Use the 「Download」 method to play with Pake's capabilities, go to discussion groups for help, or try the [Github Actions](https://github.com/tw93/Pake/wiki/GitHub-Actions-Online-Compilation-Multi-system-Version) method. -2. **Development users**: Use 「command line packing」, Mac friendly, Windows/Linux requires a bit of tinkering, but both require environment [configuration](https://tauri.app/v1/guides/getting-started/prerequisites). -3. **Hacker users**: If you know both front-end and rust, try the following custom development, which allows you to customize your features with deep secondary development. +1. **For beginners**: Play with Popular Packages to find out Pake's capabilities, or try to pack your application with [GitHub Actions](https://github.com/tw93/Pake/wiki/GitHub-Actions-Online-Compilation-Multi-system-Version). Don't hesitate to reach for assistance at [Discussion](https://github.com/tw93/Pake/discussions)! +2. **For developers**: Packaging with Command-Like Packaging fully supports macOS. For Windows/Linux users, it requires some tinkering. [Configure your environment](https://tauri.app/v1/guides/getting-started/prerequisites) before getting started. +3. **For hackers**: For people who are good at both front-end development and Rust, how about customizing your apps' function more with the following [Customized Development](#development)? -## Command line packing +## Command-Line Packaging - - - -

+![Pake](https://gw.alipayobjects.com/zos/k/zd/pake.gif) -**Pake provides a command line tool that makes it quicker and easier to customize the packages you need, as detailed in [documentation](./.github/workflows/docs/README_EN.md).** +**Pake provides a command line tool, making the flow of package customization quicker and easier. See [documentation](./bin/README_EN.md) for more information.** ```bash -// Install with npm +# Install with npm npm install -g pake-cli -// Command usage -pake url [options] +# Command usage +pake url [OPTIONS]... -// Play casually, first time due to the installation environment will be a little slow +# Feel free to play with Pake! It might take a while to prepare the environment the first time you launch Pake. pake https://weekly.tw93.fun --name Weekly --transparent ``` -If you are a little white who doesn't know how to use the command line, a good option is to use **GitHub Actions online compilation**, see the [tutorial](https://github.com/tw93/Pake/wiki/GitHub-Actions-Online-Compilation-Multi-system-Version). +If you are new to the command line, you can compile packages online with _GitHub Actions_. See the [Tutorial](https://github.com/tw93/Pake/wiki/GitHub-Actions-Online-Compilation-Multi-system-Version) for more information. ## Development -Before starting, make sure that the computer has installed the Rust `>=1.63` and Node `>=16 as 16.18.1` environment,refer to the [Tauri documentation](https://tauri.app/v1/guides/getting-started/prerequisites) to quickly configure your environment before you start. If you don't understand, it will be more appropriate to use the above command line to pack with one click. +Prepare your environment before starting. Make sure you have Rust `>=1.63` and Node `>=16` (e.g., `16.18.1`) installed on your computer. For installation guidance, see [Tauri documentation](https://tauri.app/v1/guides/getting-started/prerequisites). + +If you are unfamiliar with these, it is better to try out the above tool to pack with one click. ```sh -// Install Dependencies +# Install Dependencies npm i -// Local development +# Local development npm run dev -// Local debug +# Local debug npm run dev:debug -// Pack application +# Pack application npm run build - ``` -## Advanced use +## Advanced Usage -1. The code structure can be referred to [Here](https://github.com/tw93/Pake/wiki/Description-of-Pake's-code-structure), it is convenient for you to learn more before development. -2. Modify the `tauri.conf.json` and `tauri.xxx.conf.json` in the `src-tauri` directory to include 4 fields `url, productName, icon, identifier`, icon can be selected from the `icons` directory or downloaded from [macOSicons](https://macosicons.com/#/) to match the product. -3. For window property settings, you can modify the `width/height` of the `windows` property in `tauri.conf.json`, whether it is `fullscreen`, whether it is `resizable`, If you want to adapt the immersive header under Mac, you can set `transparent` to `true` and then find header element and add the `padding-top` style. -4. About style rewriting, advertising shielding, js injection, container message communication, and user-defined shortcut keys, you can see [Advanced Usage of Make](https://github.com/tw93/Pake/wiki/Advanced-Usage-of-Make). +1. You can refer to the [codebase structure](https://github.com/tw93/Pake/wiki/Description-of-Pake's-code-structure) before working on Pake, which will help you much in development. +2. Add four fields (`url`, `productName`, `icon`, and `identifier`) to the `tauri.conf.json` and `tauri.xxx.conf.json` in the `src-tauri` directory. You can select a `icon` from the `icons` directory or download one from [macOSicons](https://macosicons.com/#/) to match your product needs. +3. For configurations on window properties, you can modify the `tauri.conf.json` file to change the value of `width`, `height`, `fullscreen` (or not), `resizable` (or not) of the `windows` property. To adapt to the immersive header on Mac, change `transparent` to `true`, look for the `Header` element, and add the `padding-top` property. +4. For advanced usages such as style rewriting, advertisement removal, JS injection, container message communication, and user-defined shortcut keys, see [Advanced Usage of Make](https://github.com/tw93/Pake/wiki/Advanced-Usage-of-Make). ## Developer -Pake's development can not be separated from these Hackers, together contributed a lot of ability, also welcome to follow them ❤️ +Pake's development can not be without these Hackers. They contributed a lot of capabilities for Pake. Also, welcome to follow them! ❤️ @@ -304,7 +302,7 @@ Pake's development can not be separated from these Hackers, together contributed ## Support -1. I have two cats, one is called TangYuan, and one is called Coke, If you think Pake makes your life better, you can give my cats feed canned food 🥩🍤. -2. If you like Pake, you can star it in Github. Also welcome to [recommend Pake](https://twitter.com/intent/tweet?url=https://github.com/tw93/Pake&text=%23Pake%20-%20A%20simple%20Rust%20packaged%20web%20pages%20to%20generate%20Mac%20App%20tool,%20compared%20to%20traditional%20Electron%20package,%20the%20size%20of%20nearly%2040%20times%20smaller,%20generally%20about%202M,%20the%20underlying%20use%20of%20Tauri,%20performance%20experience%20than%20the%20JS%20framework%20is%20much%20lighter~) to your friends. -3. You can follow my [Twitter](https://twitter.com/HiTw93) to get the latest news of Pake, or join [Telegram](https://t.me/miaoyan) chat group. -4. I hope that you will enjoy playing with it. If you find a page that would be great for a Mac App, please let me know. +1. I have two cats, TangYuan and Coke. If you think Pake delights your life, you can feed my cats some canned food 🥩🍤. +2. If you like Pake, you can star it on GitHub. Also, welcome to [recommend Pake](https://twitter.com/intent/tweet?url=https://github.com/tw93/Pake&text=%23Pake%20-%20A%20simple%20Rust%20packaged%20web%20pages%20to%20generate%20Mac%20App%20tool,%20compared%20to%20traditional%20Electron%20package,%20the%20size%20of%20nearly%2040%20times%20smaller,%20generally%20about%202M,%20the%20underlying%20use%20of%20Tauri,%20performance%20experience%20than%20the%20JS%20framework%20is%20much%20lighter~) to your friends. +3. You can follow my [Twitter](https://twitter.com/HiTw93) to get the latest news of Pake or join our [Telegram](https://t.me/miaoyan) chat group. +4. I hope that you enjoy playing with it. Let us know if you find a website that would be great for a Mac App! diff --git a/bin/README_EN.md b/bin/README_EN.md index f8b3825..530e8bf 100644 --- a/bin/README_EN.md +++ b/bin/README_EN.md @@ -1,6 +1,6 @@ ## Install -Ensure your Node.js installation is greater than `16`, such as `16.8`. Do not use `sudo` to install. If `npm` reports that you don't have permission to install this, see [How to fix npm throwing error without sudo](https://stackoverflow.com/questions/16151018/how-to-fix-npm-throwing-error-without-sudo). +Ensure the version of your installed Node.js is greater than `16.0` such as `16.8`. Do not use `sudo` to install. If you encountered permission issues/problems while installing using npm, see [How to fix npm throwing error without sudo](https://stackoverflow.com/questions/16151018/how-to-fix-npm-throwing-error-without-sudo). ```bash npm install -g pake-cli @@ -64,7 +64,7 @@ The name of your application. We will prompt you to enter this if you do not pro #### [icon] -The application icon. Support local and remote files. By default, it is the brand icon of Pake. For customizing the icon of your product, go to [icon icons](https://icon-icons.com) or [macOSicons](https://macosicons.com/#/) to download it. +The application icon. Supports local and remote files. By default, it is the brand icon of Pake. For customizing the icon of your product, go to [icon icons](https://icon-icons.com) or [macOSicons](https://macosicons.com/#/) to download it. - macOS must be `.icns` - Windows must be `.ico`