Skip to content

Commit

Permalink
Use prettier 2.8.8 to match vs code
Browse files Browse the repository at this point in the history
  • Loading branch information
brentvollebregt committed Mar 25, 2024
1 parent a889918 commit 665a0a3
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 22 deletions.
1 change: 1 addition & 0 deletions .github/workflows/check-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ jobs:
if: success() || failure()
uses: creyD/prettier_action@v4.3
with:
prettier_version: '2.8.8'
dry: true
prettier_options: '--check .'
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ If you want to add a new or update an existing translation:

For Python, we use [Ruff](https://github.com/astral-sh/ruff) to format, lint and auto-sort imports. The easiest way to use Ruff is through the Visual Studio Code extension - formatting is run on save. You can also format using Ruff's CLI by first installing ruff using `pip install ruff` and then executing `ruff format .`.

For JavaScript, CSS, HTML, Markdown, JSON and YAML, we use [Prettier](https://prettier.io/). The easiest way to use Prettier is through the Visual Studio Code extension - formatting is run on save. You can also format using Prettier's CLI by executing `npx prettier --write .`.
For JavaScript, CSS, HTML, Markdown, JSON and YAML, we use [Prettier](https://prettier.io/). The easiest way to use Prettier is through the Visual Studio Code extension - formatting is run on save. You can also format using Prettier's CLI by executing `npx prettier@2.8.8 --write .`.

Formatting is checked using a GitHub Action workflow - all PRs are checked to comply with the formatters and linting.
2 changes: 1 addition & 1 deletion README-Bulgarian.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<a href="https://www.buymeacoffee.com/brentvollebregt"><img src="https://img.shields.io/badge/-buy_me_a%C2%A0beer-gray?logo=buy-me-a-coffee" alt="Donate"></a>
</p>

阅读中文版的README ,点击 [这里](./README-Chinese.md)
阅读中文版的 README ,点击 [这里](./README-Chinese.md)

Suomenkieliset käyttöohjeet löydät [täältä](./README-Finnish.md)

Expand Down
28 changes: 14 additions & 14 deletions README-Chinese.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@

- Python : 3.6-3.12

_要在图像中显示界面,您需要使用Chrome。如果未安装Chrome或提供了--no-chrome 参数,则将使用默认浏览器。_
_要在图像中显示界面,您需要使用 Chrome。如果未安装 Chrome 或提供了--no-chrome 参数,则将使用默认浏览器。_

> [PyInstaller 4.0](https://github.com/pyinstaller/pyinstaller/releases/tag/v4.0) 开始,不再支持Python 2.7。有关如何在Python2.7中使用此工具的步骤,请阅读下面的“[Python 2.7 支持](#python-27-支持)
> [PyInstaller 4.0](https://github.com/pyinstaller/pyinstaller/releases/tag/v4.0) 开始,不再支持 Python 2.7。有关如何在 Python2.7 中使用此工具的步骤,请阅读下面的“[Python 2.7 支持](#python-27-支持)
### 安装和使用

#### 通过 [PyPI](https://pypi.org/project/auto-py-to-exe/) 安装

您可以使用PyPI安装此项目
您可以使用 PyPI 安装此项目

```
$ pip install auto-py-to-exe
Expand Down Expand Up @@ -60,20 +60,20 @@ $ auto-py-to-exe
您可以通过以下步骤在本地运行此项目:

1. 克隆/下载 [该存储库](https://github.com/brentvollebregt/auto-py-to-exe)
2. 打开cmd 或终端并cd 到该项目
2. 打开 cmd 或终端并 cd 到该项目
3. 执行 `python -m pip install -r requirements.txt`

现在运行应用程序,执行 `python -m auto_py_to_exe`. 将在应用程序模式下打开一个Chrome窗口,并在其中运行本项目。
现在运行应用程序,执行 `python -m auto_py_to_exe`. 将在应用程序模式下打开一个 Chrome 窗口,并在其中运行本项目。

> 调用 `python -m auto_py_to_exe` 时,请确保您位于auto_py_to_exe下的目录中(在第3步之后),否则您将需要绝对/相对地将文件夹auto_py_to_exe引用到当前位置
> 调用 `python -m auto_py_to_exe` 时,请确保您位于 auto_py_to_exe 下的目录中(在第 3 步之后),否则您将需要绝对/相对地将文件夹 auto_py_to_exe 引用到当前位置
## 使用本程序

1. 选择您的脚本文件的位置(粘贴或使用文件浏览器)
- 文件存在时轮廓将变为蓝色
2. 选择其他选项并添加图标或其他文件之类的内容
3. 点击底部的蓝色大按钮进行转换
4. 完成后在目录 /output中找到转换后的文件
4. 完成后在目录 /output 中找到转换后的文件

_简单!_

Expand All @@ -84,29 +84,29 @@ _简单!_
| 参数 | 类型 | 描述 |
| ------------------------------ | ---------- | ---------------------------------------------------------------------- |
| filename | positional | 在用户界面中预先填写“脚本位置”字段。 |
| -nc, --no-chrome | optional | 使用默认浏览器(可能是Chrome)打开用户界面。 不会尝试寻找Chrome。 |
| -nc, --no-chrome | optional | 使用默认浏览器(可能是 Chrome)打开用户界面。 不会尝试寻找 Chrome。 |
| -nu, --no-ui | optional | 不要试图在浏览器中打开用户界面,而只是打印出可以访问该应用程序的地址。 |
| -c [CONFIG], --config [CONFIG] | optional | 提供配置文件(json)以预填充UI。 这些可以在设置选项卡中生成。 |
| -o [PATH], --output-dir [PATH] | optional | 设置默认输出目录。这仍然可以在UI中更改。 |
| -c [CONFIG], --config [CONFIG] | optional | 提供配置文件(json)以预填充 UI。 这些可以在设置选项卡中生成。 |
| -o [PATH], --output-dir [PATH] | optional | 设置默认输出目录。这仍然可以在 UI 中更改。 |

> 如果您在本地运行此软件包,则需要调用 `python -m auto_py_to_exe` 而不是 `auto-py-to-exe`
### 配置

您可以转到高级选项卡底部的“配置导入和导出”部分,并将JSON字符串导出到剪贴板或文件,从而导出UI的当前状态,而不是一遍又一遍地将相同的数据插入到UI中。然后可以再次将其导入到UI中,以重新填充所有字段。
您可以转到高级选项卡底部的“配置导入和导出”部分,并将 JSON 字符串导出到剪贴板或文件,从而导出 UI 的当前状态,而不是一遍又一遍地将相同的数据插入到 UI 中。然后可以再次将其导入到 UI 中,以重新填充所有字段。

## 演示视频

如果您需要可视化的东西来帮助您入门, [我为这个项目的最初版本制作了一段视频](https://youtu.be/OZSZHmWSOeM) ;有些事情可能有所不同,但相同的概念仍然适用。

## 使用该工具时出现的问题

如果您在打包的可执行文件或一般情况下使用此工具时遇到问题,建议您阅读 [我关于使用auto-py-to-exe时常见问题的博客文章](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/?utm_source=auto_py_to_exe&utm_medium=readme_link&utm_campaign=auto_py_to_exe_help)这篇文章涵盖了一些你应该知道的关于打包Python脚本和修复常见错误的内容
如果您在打包的可执行文件或一般情况下使用此工具时遇到问题,建议您阅读 [我关于使用 auto-py-to-exe 时常见问题的博客文章](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/?utm_source=auto_py_to_exe&utm_medium=readme_link&utm_campaign=auto_py_to_exe_help)这篇文章涵盖了一些你应该知道的关于打包 Python 脚本和修复常见错误的内容

## Python 2.7 支持

从2020年8月9日发布的 [PyInstaller V4.0](https://github.com/pyinstaller/pyinstaller/releases/tag/v3.6) 开始,不再支持Python2.7;不过,通过安装旧版本的PyInstaller,您仍然可以在Python2.7中使用该工具
[PyInstaller V3.6](https://github.com/pyinstaller/pyinstaller/releases/tag/v3.6) 是支持Python2.7的最后一个版本;要安装此版本,请先卸载任何现有版本的PyInstaller,然后执行 `python-m pip install pyinstaller==3.6`
从 2020 年 8 月 9 日发布的 [PyInstaller V4.0](https://github.com/pyinstaller/pyinstaller/releases/tag/v3.6) 开始,不再支持 Python2.7;不过,通过安装旧版本的 PyInstaller,您仍然可以在 Python2.7 中使用该工具
[PyInstaller V3.6](https://github.com/pyinstaller/pyinstaller/releases/tag/v3.6) 是支持 Python2.7 的最后一个版本;要安装此版本,请先卸载任何现有版本的 PyInstaller,然后执行 `python-m pip install pyinstaller==3.6`

## 测试

Expand Down
2 changes: 1 addition & 1 deletion README-Finnish.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<a href="https://www.buymeacoffee.com/brentvollebregt"><img src="https://img.shields.io/badge/-buy_me_a%C2%A0beer-gray?logo=buy-me-a-coffee" alt="Lahjoita"></a>
</p>

阅读中文版的README ,点击 [这里](./README-Chinese.md)
阅读中文版的 README ,点击 [这里](./README-Chinese.md)

Türkçe Talimatları [burada](./README-Turkish.md) bulabilirsiniz.

Expand Down
2 changes: 1 addition & 1 deletion README-Korean.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

To read README in English, press [here](./README.md)

阅读中文版的README ,点击 [这里](./README-Chinese.md)
阅读中文版的 README ,点击 [这里](./README-Chinese.md)

Suomenkieliset käyttöohjeet löydät [täältä](./README-Finnish.md)

Expand Down
2 changes: 1 addition & 1 deletion README-Persian.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<a href="https://www.buymeacoffee.com/brentvollebregt"><img src="https://img.shields.io/badge/-buy_me_a%C2%A0beer-gray?logo=buy-me-a-coffee" alt="Donate"></a>
</p>

阅读中文版的README ,点击 [这里](./README-Chinese.md)
阅读中文版的 README ,点击 [这里](./README-Chinese.md)

Suomenkieliset käyttöohjeet löydät [täältä](./README-Finnish.md)

Expand Down
2 changes: 1 addition & 1 deletion README-Turkish.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<a href="https://www.buymeacoffee.com/brentvollebregt"><img src="https://img.shields.io/badge/-buy_me_a%C2%A0beer-gray?logo=buy-me-a-coffee" alt="Donate"></a>
</p>

阅读中文版的README ,点击 [这里](./README-Chinese.md)
阅读中文版的 README ,点击 [这里](./README-Chinese.md)

Suomenkieliset käyttöohjeet löydät [täältä](./README-Finnish.md)

Expand Down
2 changes: 1 addition & 1 deletion auto_py_to_exe/web/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html>
<head>
<title>Auto Py To Exe</title>
Expand Down
4 changes: 3 additions & 1 deletion auto_py_to_exe/web/js/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ const getCurrentCommand = () => {
const entryScriptConfig = currentConfiguration.find((c) => c.optionDest === 'filenames');
const entryScript = entryScriptConfig === undefined ? '' : entryScriptConfig.value;

return `pyinstaller ${optionsAndValues.join(' ')} ${getNonPyinstallerConfiguration().manualArguments} "${entryScript}"`;
return `pyinstaller ${optionsAndValues.join(' ')} ${
getNonPyinstallerConfiguration().manualArguments
} "${entryScript}"`;
};

const updateCurrentCommandDisplay = () => {
Expand Down

0 comments on commit 665a0a3

Please sign in to comment.