ulpp 1.3.1__py3-none-any.whl
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.
- ulpp/__init__.py +10 -0
- ulpp/__main__.py +52 -0
- ulpp/assets/light/560/tray_f00.png +0 -0
- ulpp/assets/light/560/tray_f01.png +0 -0
- ulpp/assets/light/560/tray_f02.png +0 -0
- ulpp/assets/light/560/tray_f03.png +0 -0
- ulpp/assets/light/560/tray_f04.png +0 -0
- ulpp/assets/light/560/tray_f05.png +0 -0
- ulpp/assets/light/560/tray_f06.png +0 -0
- ulpp/assets/light/560/tray_f07.png +0 -0
- ulpp/assets/light/560/tray_f08.png +0 -0
- ulpp/assets/light/560/tray_f09.png +0 -0
- ulpp/assets/light/560/tray_f10.png +0 -0
- ulpp/assets/light/560/tray_f11.png +0 -0
- ulpp/assets/light/560/tray_hold.png +0 -0
- ulpp/assets/light/560/tray_plain.png +0 -0
- ulpp/assets/light/980/tray_f00.png +0 -0
- ulpp/assets/light/980/tray_f01.png +0 -0
- ulpp/assets/light/980/tray_f02.png +0 -0
- ulpp/assets/light/980/tray_f03.png +0 -0
- ulpp/assets/light/980/tray_f04.png +0 -0
- ulpp/assets/light/980/tray_f05.png +0 -0
- ulpp/assets/light/980/tray_f06.png +0 -0
- ulpp/assets/light/980/tray_f07.png +0 -0
- ulpp/assets/light/980/tray_f08.png +0 -0
- ulpp/assets/light/980/tray_f09.png +0 -0
- ulpp/assets/light/980/tray_f10.png +0 -0
- ulpp/assets/light/980/tray_f11.png +0 -0
- ulpp/assets/light/980/tray_hold.png +0 -0
- ulpp/assets/light/980/tray_plain.png +0 -0
- ulpp/assets/mono/560/tray_f00.png +0 -0
- ulpp/assets/mono/560/tray_f01.png +0 -0
- ulpp/assets/mono/560/tray_f02.png +0 -0
- ulpp/assets/mono/560/tray_f03.png +0 -0
- ulpp/assets/mono/560/tray_f04.png +0 -0
- ulpp/assets/mono/560/tray_f05.png +0 -0
- ulpp/assets/mono/560/tray_f06.png +0 -0
- ulpp/assets/mono/560/tray_f07.png +0 -0
- ulpp/assets/mono/560/tray_f08.png +0 -0
- ulpp/assets/mono/560/tray_f09.png +0 -0
- ulpp/assets/mono/560/tray_f10.png +0 -0
- ulpp/assets/mono/560/tray_f11.png +0 -0
- ulpp/assets/mono/560/tray_hold.png +0 -0
- ulpp/assets/mono/560/tray_plain.png +0 -0
- ulpp/assets/mono/980/tray_f00.png +0 -0
- ulpp/assets/mono/980/tray_f01.png +0 -0
- ulpp/assets/mono/980/tray_f02.png +0 -0
- ulpp/assets/mono/980/tray_f03.png +0 -0
- ulpp/assets/mono/980/tray_f04.png +0 -0
- ulpp/assets/mono/980/tray_f05.png +0 -0
- ulpp/assets/mono/980/tray_f06.png +0 -0
- ulpp/assets/mono/980/tray_f07.png +0 -0
- ulpp/assets/mono/980/tray_f08.png +0 -0
- ulpp/assets/mono/980/tray_f09.png +0 -0
- ulpp/assets/mono/980/tray_f10.png +0 -0
- ulpp/assets/mono/980/tray_f11.png +0 -0
- ulpp/assets/mono/980/tray_hold.png +0 -0
- ulpp/assets/mono/980/tray_plain.png +0 -0
- ulpp/assets/testpage.pg +0 -0
- ulpp/builder.py +581 -0
- ulpp/calibration.py +215 -0
- ulpp/cli.py +263 -0
- ulpp/config.py +74 -0
- ulpp/gui.py +460 -0
- ulpp/i18n.py +192 -0
- ulpp/imagex.py +51 -0
- ulpp/locales/en_US.json +246 -0
- ulpp/locales/zh_CN.json +246 -0
- ulpp/parser.py +373 -0
- ulpp/partial_gui.py +837 -0
- ulpp/presets.py +122 -0
- ulpp/sheets.py +363 -0
- ulpp/textlabel.py +220 -0
- ulpp/wizard.py +647 -0
- ulpp-1.3.1.dist-info/METADATA +314 -0
- ulpp-1.3.1.dist-info/RECORD +80 -0
- ulpp-1.3.1.dist-info/WHEEL +5 -0
- ulpp-1.3.1.dist-info/entry_points.txt +2 -0
- ulpp-1.3.1.dist-info/licenses/LICENSE +21 -0
- ulpp-1.3.1.dist-info/top_level.txt +1 -0
ulpp/__init__.py
ADDED
ulpp/__main__.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""python -m ulpp:无参数(或只给 --lang)时开图形界面,其余参数走命令行。"""
|
|
3
|
+
|
|
4
|
+
import sys
|
|
5
|
+
from typing import Optional, Tuple
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def _parse_gui_args(argv) -> Tuple[bool, Optional[str]]:
|
|
9
|
+
"""判断参数是否“只指定了语言”。是则返回 (True, lang),否则 (False, None)。"""
|
|
10
|
+
lang: Optional[str] = None
|
|
11
|
+
i = 0
|
|
12
|
+
while i < len(argv):
|
|
13
|
+
arg = argv[i]
|
|
14
|
+
if arg == "--lang":
|
|
15
|
+
if i + 1 >= len(argv) or argv[i + 1].startswith("-"):
|
|
16
|
+
return False, None
|
|
17
|
+
lang = argv[i + 1]
|
|
18
|
+
i += 2
|
|
19
|
+
elif arg.startswith("--lang="):
|
|
20
|
+
lang = arg.split("=", 1)[1]
|
|
21
|
+
i += 1
|
|
22
|
+
else:
|
|
23
|
+
return False, None
|
|
24
|
+
return True, lang
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def main() -> int:
|
|
28
|
+
from .i18n import set_language
|
|
29
|
+
|
|
30
|
+
argv = sys.argv[1:]
|
|
31
|
+
if not argv:
|
|
32
|
+
set_language(None)
|
|
33
|
+
from .gui import main as gui_main
|
|
34
|
+
|
|
35
|
+
gui_main()
|
|
36
|
+
return 0
|
|
37
|
+
|
|
38
|
+
gui_only, lang = _parse_gui_args(argv)
|
|
39
|
+
if gui_only:
|
|
40
|
+
set_language(lang)
|
|
41
|
+
from .gui import main as gui_main
|
|
42
|
+
|
|
43
|
+
gui_main()
|
|
44
|
+
return 0
|
|
45
|
+
|
|
46
|
+
from .cli import main as cli_main
|
|
47
|
+
|
|
48
|
+
return cli_main(argv)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
if __name__ == "__main__":
|
|
52
|
+
raise SystemExit(main())
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
ulpp/assets/testpage.pg
ADDED
|
Binary file
|