cppgolf 0.1.2__tar.gz → 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cppgolf-0.1.2 → cppgolf-0.1.3}/PKG-INFO +5 -5
- {cppgolf-0.1.2 → cppgolf-0.1.3}/README.md +2 -2
- {cppgolf-0.1.2 → cppgolf-0.1.3}/cppgolf/__main__.py +1 -2
- {cppgolf-0.1.2 → cppgolf-0.1.3}/cppgolf.egg-info/PKG-INFO +5 -5
- {cppgolf-0.1.2 → cppgolf-0.1.3}/pyproject.toml +3 -3
- {cppgolf-0.1.2 → cppgolf-0.1.3}/cppgolf/__init__.py +0 -0
- {cppgolf-0.1.2 → cppgolf-0.1.3}/cppgolf/golf_rename.py +0 -0
- {cppgolf-0.1.2 → cppgolf-0.1.3}/cppgolf/merge.py +0 -0
- {cppgolf-0.1.2 → cppgolf-0.1.3}/cppgolf/strip_comments.py +0 -0
- {cppgolf-0.1.2 → cppgolf-0.1.3}/cppgolf/transforms.py +0 -0
- {cppgolf-0.1.2 → cppgolf-0.1.3}/cppgolf/whitespace.py +0 -0
- {cppgolf-0.1.2 → cppgolf-0.1.3}/cppgolf.egg-info/SOURCES.txt +0 -0
- {cppgolf-0.1.2 → cppgolf-0.1.3}/cppgolf.egg-info/dependency_links.txt +0 -0
- {cppgolf-0.1.2 → cppgolf-0.1.3}/cppgolf.egg-info/entry_points.txt +0 -0
- {cppgolf-0.1.2 → cppgolf-0.1.3}/cppgolf.egg-info/requires.txt +0 -0
- {cppgolf-0.1.2 → cppgolf-0.1.3}/cppgolf.egg-info/top_level.txt +0 -0
- {cppgolf-0.1.2 → cppgolf-0.1.3}/setup.cfg +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cppgolf
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: C++ multi-file merge & code golf / minifier tool
|
|
5
5
|
License: MIT
|
|
6
|
-
Project-URL: Homepage, https://github.com/
|
|
7
|
-
Project-URL: Issues, https://github.com/
|
|
6
|
+
Project-URL: Homepage, https://github.com/KnCRJVirX/cppgolf
|
|
7
|
+
Project-URL: Issues, https://github.com/KnCRJVirX/cppgolf/issues
|
|
8
8
|
Keywords: cpp,c++,golf,minify,code-golf,competitive-programming
|
|
9
9
|
Classifier: Development Status :: 3 - Alpha
|
|
10
10
|
Classifier: Environment :: Console
|
|
@@ -40,7 +40,7 @@ pip install cppgolf
|
|
|
40
40
|
cppgolf solution.cpp # 输出到 stdout
|
|
41
41
|
cppgolf solution.cpp -o golf.cpp # 输出到文件
|
|
42
42
|
cppgolf solution.cpp -I include/ -o out.cpp
|
|
43
|
-
cppgolf solution.cpp --rename
|
|
43
|
+
cppgolf solution.cpp --no-rename # 不压缩符号
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
### 选项
|
|
@@ -59,7 +59,7 @@ cppgolf solution.cpp --rename # 符号压缩
|
|
|
59
59
|
| `--keep-inline` | 保留 `inline` 关键字 |
|
|
60
60
|
| `--aggressive` | 去除单语句 if/for/while 花括号 |
|
|
61
61
|
| `--shortcuts` | 高频 cout/cin → `#define` 缩写 |
|
|
62
|
-
| `--rename` |
|
|
62
|
+
| `--no-rename` | 不对变量/成员名进行压缩 |
|
|
63
63
|
| `--stats` | 显示压缩率统计 |
|
|
64
64
|
|
|
65
65
|
## Python API
|
|
@@ -14,7 +14,7 @@ pip install cppgolf
|
|
|
14
14
|
cppgolf solution.cpp # 输出到 stdout
|
|
15
15
|
cppgolf solution.cpp -o golf.cpp # 输出到文件
|
|
16
16
|
cppgolf solution.cpp -I include/ -o out.cpp
|
|
17
|
-
cppgolf solution.cpp --rename
|
|
17
|
+
cppgolf solution.cpp --no-rename # 不压缩符号
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
### 选项
|
|
@@ -33,7 +33,7 @@ cppgolf solution.cpp --rename # 符号压缩
|
|
|
33
33
|
| `--keep-inline` | 保留 `inline` 关键字 |
|
|
34
34
|
| `--aggressive` | 去除单语句 if/for/while 花括号 |
|
|
35
35
|
| `--shortcuts` | 高频 cout/cin → `#define` 缩写 |
|
|
36
|
-
| `--rename` |
|
|
36
|
+
| `--no-rename` | 不对变量/成员名进行压缩 |
|
|
37
37
|
| `--stats` | 显示压缩率统计 |
|
|
38
38
|
|
|
39
39
|
## Python API
|
|
@@ -87,6 +87,7 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
87
87
|
g.add_argument('--no-compress-ws', action='store_true', help='保留空白格式')
|
|
88
88
|
g.add_argument('--no-std-ns', action='store_true', help='不添加 using namespace std')
|
|
89
89
|
g.add_argument('--no-typedefs', action='store_true', help='不添加 ll/ld 等类型宏')
|
|
90
|
+
g.add_argument('--no-rename', action='store_true', help='不将用户变量/成员名压缩为短名')
|
|
90
91
|
g.add_argument('--keep-main-return', action='store_true', help='保留 main 末尾 return 0')
|
|
91
92
|
g.add_argument('--keep-endl', action='store_true', help='保留 endl')
|
|
92
93
|
g.add_argument('--keep-inline', action='store_true', help='保留 inline 关键字')
|
|
@@ -96,8 +97,6 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
96
97
|
help='单语句 if/for/while 去花括号')
|
|
97
98
|
g2.add_argument('--shortcuts', dest='define_shortcuts', action='store_true',
|
|
98
99
|
help='高频 cout/cin 用 #define 缩写')
|
|
99
|
-
g2.add_argument('-no-rename', dest='no_rename_symbols', action='store_true',
|
|
100
|
-
help='不将用户变量/成员名压缩为短名(需要 tree-sitter-cpp)')
|
|
101
100
|
|
|
102
101
|
p.add_argument('--stats', action='store_true', help='显示压缩率统计')
|
|
103
102
|
return p
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cppgolf
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: C++ multi-file merge & code golf / minifier tool
|
|
5
5
|
License: MIT
|
|
6
|
-
Project-URL: Homepage, https://github.com/
|
|
7
|
-
Project-URL: Issues, https://github.com/
|
|
6
|
+
Project-URL: Homepage, https://github.com/KnCRJVirX/cppgolf
|
|
7
|
+
Project-URL: Issues, https://github.com/KnCRJVirX/cppgolf/issues
|
|
8
8
|
Keywords: cpp,c++,golf,minify,code-golf,competitive-programming
|
|
9
9
|
Classifier: Development Status :: 3 - Alpha
|
|
10
10
|
Classifier: Environment :: Console
|
|
@@ -40,7 +40,7 @@ pip install cppgolf
|
|
|
40
40
|
cppgolf solution.cpp # 输出到 stdout
|
|
41
41
|
cppgolf solution.cpp -o golf.cpp # 输出到文件
|
|
42
42
|
cppgolf solution.cpp -I include/ -o out.cpp
|
|
43
|
-
cppgolf solution.cpp --rename
|
|
43
|
+
cppgolf solution.cpp --no-rename # 不压缩符号
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
### 选项
|
|
@@ -59,7 +59,7 @@ cppgolf solution.cpp --rename # 符号压缩
|
|
|
59
59
|
| `--keep-inline` | 保留 `inline` 关键字 |
|
|
60
60
|
| `--aggressive` | 去除单语句 if/for/while 花括号 |
|
|
61
61
|
| `--shortcuts` | 高频 cout/cin → `#define` 缩写 |
|
|
62
|
-
| `--rename` |
|
|
62
|
+
| `--no-rename` | 不对变量/成员名进行压缩 |
|
|
63
63
|
| `--stats` | 显示压缩率统计 |
|
|
64
64
|
|
|
65
65
|
## Python API
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cppgolf"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.3"
|
|
8
8
|
description = "C++ multi-file merge & code golf / minifier tool"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
@@ -38,8 +38,8 @@ dev = [
|
|
|
38
38
|
cppgolf = "cppgolf.__main__:main"
|
|
39
39
|
|
|
40
40
|
[project.urls]
|
|
41
|
-
Homepage = "https://github.com/
|
|
42
|
-
Issues = "https://github.com/
|
|
41
|
+
Homepage = "https://github.com/KnCRJVirX/cppgolf"
|
|
42
|
+
Issues = "https://github.com/KnCRJVirX/cppgolf/issues"
|
|
43
43
|
|
|
44
44
|
[tool.setuptools.packages.find]
|
|
45
45
|
where = ["."]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|