Files
Pake/README.md
2023-01-17 19:10:16 +08:00

309 lines
16 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<h4 align="right"><strong>English</strong> | <a href="https://github.com/tw93/Pake/blob/master/README_CN.md">中文</a></h4>
<p align="center">
<img src=https://gw.alipayobjects.com/zos/k/fa/logo-modified.png width=138/>
</p>
<h1 align="center">Pake</h1>
<div align="center">
<a href="https://twitter.com/HiTw93" target="_blank">
<img alt="twitter" src="https://img.shields.io/twitter/follow/Hitw93?color=%231D9BF0&label=Pake%20%F0%9F%93%A2%20&logo=Twitter&style=flat-square"></a>
<a href="https://t.me/miaoyan" target="_blank">
<img alt="telegram" src="https://img.shields.io/badge/chat-telegram-blueviolet?style=flat-square&logo=Telegram"></a>
<a href="https://github.com/tw93/Pake/releases" target="_blank">
<img alt="GitHub downloads" src="https://img.shields.io/github/downloads/tw93/Pake/total.svg?style=flat-square"></a>
<a href="https://github.com/tw93/Pake/commits" target="_blank">
<img alt="GitHub commit" src="https://img.shields.io/github/commit-activity/m/tw93/Pake?style=flat-square"></a>
<a href="https://github.com/tw93/Pake/issues?q=is%3Aissue+is%3Aclosed" target="_blank">
<img alt="GitHub closed issues" src="https://img.shields.io/github/issues-closed/tw93/Pake.svg?style=flat-square"></a>
</div>
<div align="left"><b align="center">A simple way to package a web page to desktop application, support Mac / Windows / Linux</b>.<br/>App download、<a href="#Command line packing">command line packaging</a>、<a href="#Development">custom development</a> can be found in the following document. Welcome to <a href=https://github.com/tw93/Pake/discussions>Discussions</a> to see if there have anything you're interesting.</div>
## 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.
## Download
<table>
<tr>
<td>WeRead
<a href="https://github.com/tw93/Pake/releases/latest/download/WeRead.dmg">Mac</a>
<a href="https://github.com/tw93/Pake/releases/latest/download/WeRead_x64.msi">Windows</a>
<a href="https://github.com/tw93/Pake/releases/latest/download/WeRead_amd64.deb">Linux</a>
</td>
<td>Twitter
<a href="https://github.com/tw93/Pake/releases/latest/download/Twitter.dmg">Mac</a>
<a href="https://github.com/tw93/Pake/releases/latest/download/Twitter_x64.msi">Windows</a>
<a href="https://github.com/tw93/Pake/releases/latest/download/Twitter_amd64.deb">Linux</a>
</td>
</tr>
<tr>
<td><img src=https://cdn.fliggy.com/upic/17dC9I.jpg width=600/></td>
<td><img src=https://cdn.fliggy.com/upic/mc41xq.jpg width=600/></td>
</tr>
<tr>
<td>LiZhi
<a href="https://github.com/tw93/Pake/releases/latest/download/LiZhi.dmg">Mac</a>
<a href="https://github.com/tw93/Pake/releases/latest/download/LiZhi_x64.msi">Windows</a>
<a href="https://github.com/tw93/Pake/releases/latest/download/LiZhi_amd64.deb">Linux</a>
</td>
<td>YouTube
<a href="https://github.com/tw93/Pake/releases/latest/download/YouTube.dmg">Mac</a>
<a href="https://github.com/tw93/Pake/releases/latest/download/YouTube_x64.msi">Windows</a>
<a href="https://github.com/tw93/Pake/releases/latest/download/YouTube_amd64.deb">Linux</a>
</td>
</tr>
<tr>
<td><img src=https://cdn.fliggy.com/upic/DX3dfG.png width=600/></td>
<td><img src=https://cdn.fliggy.com/upic/Ea5ZRw.png width=600/></td>
</tr>
<tr>
<td>Qwerty
<a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty.dmg">Mac</a>
<a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty_x64.msi">Windows</a>
<a href="https://github.com/tw93/Pake/releases/latest/download/Qwerty_amd64.deb">Linux</a>
</td>
<td>Reference
<a href="https://github.com/tw93/Pake/releases/latest/download/Reference.dmg">Mac</a>
<a href="https://github.com/tw93/Pake/releases/latest/download/Reference_x64.msi">Windows</a>
<a href="https://github.com/tw93/Pake/releases/latest/download/Reference_amd64.deb">Linux</a>
</td>
</tr>
<tr>
<td><img src=https://cdn.fliggy.com/upic/CJjagn.jpg width=600/></td>
<td><img src=https://cdn.fliggy.com/upic/KFsZIY.png width=600/></td>
</tr>
<tr>
<td>Library
<a href="https://github.com/tw93/Pake/releases/latest/download/ZLibrary.dmg">Mac</a>
<a href="https://github.com/tw93/Pake/releases/latest/download/ZLibrary_x64.msi">Windows</a>
<a href="https://github.com/tw93/Pake/releases/latest/download/ZLibrary_amd64.deb">Linux</a>
</td>
<td>ChatGPT
<a href="https://github.com/tw93/Pake/releases/latest/download/ChatGPT.dmg">Mac</a>
<a href="https://github.com/tw93/Pake/releases/latest/download/ChatGPT_x64.msi">Windows</a>
<a href="https://github.com/tw93/Pake/releases/latest/download/ChatGPT_amd64.deb">Linux</a>
</td>
</tr>
<tr>
<td><img src=https://cdn.fliggy.com/upic/2vPptL.png width=600/></td>
<td><img src=https://cdn.fliggy.com/upic/sfnTXf.png width=600/></td>
</tr>
</table>
<details>
<summary>🏂More applications such as Flomo / YuQue / RunCode can be downloaded from <a href="https://github.com/tw93/Pake/releases">Release</a>, <b>click to expand shortcut descriptions</b></summary>
<br/>
| Mac | Windows/Linux | Function |
| --------------------------- | ------------------------------ | ----------------------------- |
| <kbd>⌘</kbd> + <kbd>[</kbd> | <kbd>Ctrl</kbd> + <kbd>←</kbd> | Return to the previous page |
| <kbd>⌘</kbd> + <kbd>]</kbd> | <kbd>Ctrl</kbd> + <kbd>→</kbd> | Go to the next page |
| <kbd>⌘</kbd> + <kbd>↑</kbd> | <kbd>Ctrl</kbd> + <kbd>↑</kbd> | Auto scroll to top of page |
| <kbd>⌘</kbd> + <kbd>↓</kbd> | <kbd>Ctrl</kbd> + <kbd>↓</kbd> | Auto scroll to bottom of page |
| <kbd>⌘</kbd> + <kbd>r</kbd> | <kbd>Ctrl</kbd> + <kbd>r</kbd> | Refresh Page |
| <kbd>⌘</kbd> + <kbd>w</kbd> | <kbd>Ctrl</kbd> + <kbd>w</kbd> | Hide window, not quite |
| <kbd>⌘</kbd> + <kbd>-</kbd> | <kbd>Ctrl</kbd> + <kbd>-</kbd> | Zoom out the page |
| <kbd>⌘</kbd> + <kbd>+</kbd> | <kbd>Ctrl</kbd> + <kbd>+</kbd> | Zoom in the page |
| <kbd>⌘</kbd> + <kbd>=</kbd> | <kbd>Ctrl</kbd> + <kbd>=</kbd> | Zoom in the Page |
| <kbd>⌘</kbd> + <kbd>0</kbd> | <kbd>Ctrl</kbd> + <kbd>0</kbd> | 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.
</details>
## Before you start
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.
## Command line packing
<kbd>
<img src="https://gw.alipayobjects.com/zos/k/zd/pake.gif" width="100%">
</kbd>
<br/><br/>
**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).**
```bash
// Install with npm
npm install -g pake-cli
// Command usage
pake url [options]
// Play casually, first time due to the installation environment will be a little slow
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).
## Development
Before starting, make sure that the computer has installed the Rust `>=1.63` and Node `>=16 as 16.18.1` environmentrefer 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.
```sh
// Install Dependencies
npm i
// Local development
npm run dev
// Local debug
npm run dev:debug
// Pack application
npm run build
```
## Advanced use
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).
## 开发者
Pake's development can not be separated from these Hackers, together contributed a lot of ability, also welcome to follow them ❤️
<!-- readme: contributors -start -->
<table>
<tr>
<td align="center">
<a href="https://github.com/tw93">
<img src="https://avatars.githubusercontent.com/u/8736212?v=4" width="90;" alt="tw93"/>
<br />
<sub><b>Tw93</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Tlntin">
<img src="https://avatars.githubusercontent.com/u/28218658?v=4" width="90;" alt="Tlntin"/>
<br />
<sub><b>Tlntin</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/pan93412">
<img src="https://avatars.githubusercontent.com/u/28441561?v=4" width="90;" alt="pan93412"/>
<br />
<sub><b>Pan93412</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/wanghanzhen">
<img src="https://avatars.githubusercontent.com/u/25301012?v=4" width="90;" alt="wanghanzhen"/>
<br />
<sub><b>Volare</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/liby">
<img src="https://avatars.githubusercontent.com/u/38807139?v=4" width="90;" alt="liby"/>
<br />
<sub><b>Bryan Lee</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/essesoul">
<img src="https://avatars.githubusercontent.com/u/58624474?v=4" width="90;" alt="essesoul"/>
<br />
<sub><b>Essesoul</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/m1911star">
<img src="https://avatars.githubusercontent.com/u/4948120?v=4" width="90;" alt="m1911star"/>
<br />
<sub><b>Horus</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/AielloChan">
<img src="https://avatars.githubusercontent.com/u/7900765?v=4" width="90;" alt="AielloChan"/>
<br />
<sub><b>Aiello</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/QingZ11">
<img src="https://avatars.githubusercontent.com/u/38887077?v=4" width="90;" alt="QingZ11"/>
<br />
<sub><b>Steam</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/2nthony">
<img src="https://avatars.githubusercontent.com/u/19513289?v=4" width="90;" alt="2nthony"/>
<br />
<sub><b>2nthony</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/nekomeowww">
<img src="https://avatars.githubusercontent.com/u/11081491?v=4" width="90;" alt="nekomeowww"/>
<br />
<sub><b>Ayaka Neko</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/turkyden">
<img src="https://avatars.githubusercontent.com/u/24560160?v=4" width="90;" alt="turkyden"/>
<br />
<sub><b>Dengju Deng</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Fechin">
<img src="https://avatars.githubusercontent.com/u/2541482?v=4" width="90;" alt="Fechin"/>
<br />
<sub><b>Fechin</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/princemaple">
<img src="https://avatars.githubusercontent.com/u/1329716?v=4" width="90;" alt="princemaple"/>
<br />
<sub><b>Po Chen</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/houhoz">
<img src="https://avatars.githubusercontent.com/u/19684376?v=4" width="90;" alt="houhoz"/>
<br />
<sub><b>Hyzhao</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/liusishan">
<img src="https://avatars.githubusercontent.com/u/33129823?v=4" width="90;" alt="liusishan"/>
<br />
<sub><b>Liusishan</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/piaoyidage">
<img src="https://avatars.githubusercontent.com/u/5135405?v=4" width="90;" alt="piaoyidage"/>
<br />
<sub><b>Ranger</b></sub>
</a>
</td></tr>
</table>
<!-- readme: contributors -end -->
## 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 <a href="https://miaoyan.app/cats.html?name=Pake" target="_blank">feed canned food 🥩🍤</a>.
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.