Skip to content

Commit 1ffd3da

Browse files
committed
init: first commit
0 parents  commit 1ffd3da

76 files changed

Lines changed: 3845 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.js linguist-language=python
2+
*.html linguist-language=python
3+
*.vue linguist-language=python
4+
*.sql linguist-language=python

.gitignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
25+
26+
pyenv
27+
__pycache__
28+
pyapp/spec
29+
/build
30+
/buildCEF
31+
32+
# /pyapp/test/
33+
package-lock.json
34+
pyflow_data.json
35+
36+
.vscode
37+
*@bak.py
38+
*@notok.py

FAQ常见问题.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# FAQ常见问题
2+
3+
# 待解决
4+
5+
- cef兼容模式下打包,monaco-editor报错 -- ReferenceError: queueMicrotask is not defined @tofix
6+
- https://apidocs.cn/blog/front/nodejs/queueMicrotaskIsNotDefined.html
7+
8+
![](https://luo0412.oss-cn-hangzhou.aliyuncs.com/1655412225995-MZ4iFANKsaNb.png)
9+
10+
- Python脚本同时运行多个上传任务的时候报错 @tofix
11+
12+
# 已解决
13+
14+
- pip安装paramiko失败 -- Could not build wheels for pycuda which use PEP 517 and cannot be installed directly @fix
15+
- https://visualstudio.microsoft.com/downloads/
16+
- https://blog.csdn.net/weixin_43400774/article/details/124042243
17+
18+
```
19+
主要原因是pip(pyenv)版本问题 可以升级版本或指定路径单独安装
20+
21+
python -m pip install -U --force-reinstall pip
22+
23+
pip install paramiko --target=./pyenv/pyenv/Lib/site-packages
24+
# pip install paramiko --target=./pyenv/pyenvCEF/Lib/site-packages
25+
26+
===
27+
// 其他
28+
cryptography
29+
rust环境
30+
Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools"
31+
```
32+
33+
---
34+
35+
# 参考 @ref

README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# README
2+
3+
![](https://luo0412.oss-cn-hangzhou.aliyuncs.com/1655816632094-ar3Y7TQpWfyb-image.png)
4+
5+
![](https://luo0412.oss-cn-hangzhou.aliyuncs.com/1655554208030-tmEMTBPnJxPa-image.png)
6+
7+
![](https://luo0412.oss-cn-hangzhou.aliyuncs.com/1655739959000-YkeRskXaafmy-image.png)
8+
9+
---
10+
11+
# 技术选型 @stack
12+
13+
- pywebview + pyinstaller
14+
- https://pywebview.flowrl.com/guide/
15+
- https://github.com/cztomczak/cefpython
16+
17+
```
18+
pywebview -- JavaScript的界面+Python的脚本, 同时薅两个生态的羊毛
19+
```
20+
21+
- vue3 + vite + arco-design-vue
22+
- https://arco.design/vue/docs/start
23+
24+
```
25+
arco -- 设计风格沉稳中又带着些许风骚
26+
```
27+
28+
- tinydb
29+
- https://tinydb.readthedocs.io/en/latest/usage.html
30+
31+
```
32+
tinydb -- 本地json数据的增删改查(但它不抗揍)
33+
34+
===
35+
// 后期考虑改成
36+
lowdb
37+
sqlite
38+
```
39+
40+
# 本地启动 @run
41+
42+
```bash
43+
npm run init
44+
# npm run initfix # paramiko等安装失败时可单独安装
45+
46+
npm run init:cef # 或者兼容模式初始化
47+
# npm run initfix:cef # paramiko等安装失败时可单独安装
48+
49+
npm run dev # 启动前端
50+
51+
npm run start # 启动客户端
52+
npm run start:cef # 或者兼容模式启动客户端
53+
```
54+
55+
# 软件打包 @build
56+
57+
```bash
58+
npm run build
59+
npm run build:cef # 或者兼容模式打包
60+
```
61+
62+
# 运行环境 @env
63+
64+
正常打包运行需要先下载[EdgeWebView2Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/)环境, 这比兼容模式下打包的体积要少60M
65+
66+
但如果懒得安装环境, 也可以直接用CEF兼容模式的安装包, 不过在功能和样式上有很多的小bug要兼容处理...
67+
68+
---
69+
70+
# 参考 @ref
71+
72+
- https://github.com/pangao1990/vue-pywebview-pyinstaller

index.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8" />
6+
<link rel="icon" href="/favicon.ico" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8+
<title>PyFlow</title>
9+
10+
</head>
11+
12+
<body>
13+
14+
<div id="app"></div>
15+
<script type="module" src="/src/main.js"></script>
16+
17+
</body>
18+
19+
</html>

package.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"name": "pyflow",
3+
"private": true,
4+
"version": "1.0.0",
5+
"description": "pyflow(常用Python脚本集的界面执行器, 没啥大用...)",
6+
"author": "luo0412",
7+
"scripts": {
8+
"init": "npm install && run-script-os",
9+
"init:macos": "python3 pyapp/spec/getSpec.py && python3 -m venv pyenv && ./pyenv/bin/pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r ./pyapp/requirements.txt",
10+
"init:windows": "python pyapp\\spec\\getSpec.py && python -m venv pyenv\\pyenv && .\\pyenv\\pyenv\\Scripts\\pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r .\\pyapp\\requirements.txt",
11+
"init:cef": "npm install && python pyapp\\spec\\getSpec.py && python -m venv pyenv\\pyenvCEF && .\\pyenv\\pyenvCEF\\Scripts\\pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r .\\pyapp\\requirements.txt && .\\pyenv\\pyenvCEF\\Scripts\\pip install -i https://pypi.tuna.tsinghua.edu.cn/simple cefpython3 && shx cp .\\pyapp\\hook-cefpython3.py .\\pyenv\\pyenvCEF\\Lib\\site-packages\\PyInstaller\\hooks",
12+
"initfix": "pip install paramiko --target=./pyenv/pyenv/Lib/site-packages",
13+
"initfix:cef": "pip install paramiko --target=./pyenv/pyenvCEF/Lib/site-packages",
14+
"start": "run-script-os",
15+
"start:macos": "./pyenv/bin/python -X dev ./pyapp/main.py",
16+
"start:windows": ".\\pyenv\\pyenv\\Scripts\\python -X dev .\\pyapp\\main.py",
17+
"start:cef": ".\\pyenv\\pyenvCEF\\Scripts\\python -X dev .\\pyapp\\mainCEF.py",
18+
"dev": "vite",
19+
"pre": "shx rm -rf build && vite build && run-script-os",
20+
"pre:macos": "./pyenv/bin/pyinstaller -w --clean ./pyapp/spec/macos-pre.spec",
21+
"pre:windows": ".\\pyenv\\pyenv\\Scripts\\pyinstaller -w --clean .\\pyapp\\spec\\windows-pre.spec",
22+
"pre:cef": "shx rm -rf buildCEF && vite build && .\\pyenv\\pyenvCEF\\Scripts\\pyinstaller -w --clean .\\pyapp\\spec\\windows-pre-cef.spec && shx mv .\\build\\windows-pre-cef .\\buildCEF\\windows-pre-cef",
23+
"pre:folder": "shx rm -rf build && vite build && .\\pyenv\\pyenv\\Scripts\\pyinstaller -w --clean .\\pyapp\\spec\\windows-folder-pre.spec",
24+
"pre:folder:cef": "shx rm -rf buildCEF && vite build && .\\pyenv\\pyenvCEF\\Scripts\\pyinstaller -w --clean .\\pyapp\\spec\\windows-folder-pre-cef.spec && shx mv .\\build\\windows-folder-pre-cef .\\buildCEF\\windows-folder-pre-cef",
25+
"build": "shx rm -rf build && vite build && run-script-os",
26+
"build:macos": "./pyenv/bin/pyinstaller -w --clean ./pyapp/spec/macos.spec",
27+
"build:windows": ".\\pyenv\\pyenv\\Scripts\\pyinstaller -w --clean .\\pyapp\\spec\\windows.spec",
28+
"build:cef": "shx rm -rf buildCEF && vite build && .\\pyenv\\pyenvCEF\\Scripts\\pyinstaller -w --clean .\\pyapp\\spec\\windows-cef.spec && shx mv .\\build\\windows-pre-cef .\\buildCEF\\windows-pre-cef",
29+
"build:folder": "shx rm -rf build && vite build && .\\pyenv\\pyenv\\Scripts\\pyinstaller -w --clean .\\pyapp\\spec\\windows-folder.spec",
30+
"build:folder:cef": "shx rm -rf buildCEF && vite build && .\\pyenv\\pyenvCEF\\Scripts\\pyinstaller -w --clean .\\pyapp\\spec\\windows-folder-cef.spec && shx mv .\\build\\windows-folder-cef .\\buildCEF\\windows-folder-cef"
31+
},
32+
"dependencies": {
33+
"ali-oss": "^6.17.1",
34+
"moment": "^2.29.3",
35+
"monaco-editor": "^0.33.0",
36+
"nanoid": "^4.0.0",
37+
"unplugin-vue-components": "^0.19.6",
38+
"vditor": "^3.8.15",
39+
"vue": "^3.2.25",
40+
"vue-router": "4"
41+
},
42+
"devDependencies": {
43+
"@arco-design/web-vue": "^2.30.2",
44+
"@vitejs/plugin-vue": "^2.2.0",
45+
"run-script-os": "^1.1.6",
46+
"shx": "^0.3.4",
47+
"vite": "^2.8.0"
48+
}
49+
}

public/logo.ico

66.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)