Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Z4HD committed Feb 11, 2020
1 parent 5c285e8 commit 7bfd79d
Show file tree
Hide file tree
Showing 8 changed files with 454 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.ico filter=lfs diff=lfs merge=lfs -text
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,6 @@ dmypy.json

# Pyre type checker
.pyre/

# VSCode config
.vscode/
21 changes: 21 additions & 0 deletions Pipfile
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__/"
169 changes: 169 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 62 additions & 2 deletions README.md
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
```
18 changes: 18 additions & 0 deletions build-release.py
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')
])
3 changes: 3 additions & 0 deletions icon.ico
Git LFS file not shown
Loading

0 comments on commit 7bfd79d

Please sign in to comment.