-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
454 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.ico filter=lfs diff=lfs merge=lfs -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,3 +127,6 @@ dmypy.json | |
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# VSCode config | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[[source]] | ||
name = "pypi" | ||
url = "https://pypi.tuna.tsinghua.edu.cn/simple" | ||
verify_ssl = true | ||
|
||
[dev-packages] | ||
pyinstaller = "*" | ||
pylint = "*" | ||
yapf = "*" | ||
|
||
[packages] | ||
xlwings = "*" | ||
|
||
[requires] | ||
python_version = "3.8" | ||
|
||
[scripts] | ||
main="python nsf-gui.py" | ||
build="python build-release.py" | ||
clean="rm -rf *.spec build/ __pycache__/" | ||
cleanall="rm -rf *.spec build/ dist/ __pycache__/" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,62 @@ | ||
# excel-name-space-formatter | ||
A people name formatter in M$ Excle which can add or remove space in the center of a name. ONLY CHINESE USER NEED IT. | ||
# excel-name-space-formatter (nsf) | ||
|
||
A people name formatter in M$ Excel which can add or remove space in the center of a name. ONLY CHINESE USER NEED IT. | ||
|
||
## 下载安装 | ||
|
||
### GitHub Release | ||
|
||
二进制文件~~绿色无毒~~,下完即可运行,干净无依赖,不需要安装 Python。 | ||
|
||
Comming soon... | ||
|
||
### 源代码 | ||
|
||
```shell | ||
git clone --depth=1 https://github.com/Z4HD/excel-name-space-formatter.git | ||
``` | ||
|
||
安装依赖后即可运行 | ||
|
||
```shell | ||
pipenv install | ||
pipenv run main | ||
``` | ||
|
||
## 从源码构建EXE | ||
|
||
首先确保已经安装 `pipenv` | ||
|
||
```shell | ||
pip3 install pipenv | ||
``` | ||
|
||
### 安装依赖 | ||
|
||
进入源代码目录后执行 | ||
|
||
```shell | ||
pipenv install --dev | ||
``` | ||
|
||
### 构建可执行文件 | ||
|
||
```shell | ||
pipenv run build | ||
``` | ||
|
||
可以在 `dist\` 文件夹中找到构建完成的EXE。 | ||
|
||
### 清理 | ||
|
||
删除构建过程中产生的临时文件,**不包括** `dist\` 目录下的可执行文件。 | ||
|
||
```shell | ||
pipenv run clean | ||
``` | ||
|
||
删除构建过程中产生的所有临时文件,**包括 `dist\` 目录下的可执行文件。** | ||
|
||
```shell | ||
pipenv run cleanall | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import os | ||
import platform | ||
|
||
import PyInstaller.__main__ | ||
|
||
if platform.os.name == 'nt': | ||
split_prefix = ';' | ||
else: | ||
split_prefix = ':' | ||
|
||
PyInstaller.__main__.run([ | ||
'--name=nsf-gui', | ||
'--onefile', | ||
'--windowed', | ||
f'--add-data=icon.ico{split_prefix}.', # Add icon file into bundle | ||
'--icon=%s' % os.path.abspath('icon.ico'), | ||
os.path.abspath('nsf-gui.py') | ||
]) |
Oops, something went wrong.