forked from ckh08045/AutoPercenty
parent
4025daeb2b
commit
65677c16ac
|
|
@ -1,5 +1,9 @@
|
||||||
Lib/
|
Lib/
|
||||||
|
libs/
|
||||||
Scripts/
|
Scripts/
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
Include/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.log
|
*.log
|
||||||
*.log.*
|
*.log.*
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ from selenium.webdriver.common.keys import Keys
|
||||||
import time
|
import time
|
||||||
from edit.action_elements import click_element, return_element
|
from edit.action_elements import click_element, return_element
|
||||||
from ai.deepl import trans
|
from ai.deepl import trans
|
||||||
from ai.compare import find_most_similar_image_by_one
|
# from ai.compare import find_most_similar_image_by_one
|
||||||
import re
|
import re
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
|
@ -77,8 +77,9 @@ def modify_option_page(driver, original_img):
|
||||||
option_images_urls.append(img_url)
|
option_images_urls.append(img_url)
|
||||||
|
|
||||||
# 유사도 비교로 적합한 이미지를 가진 옵션번호 저장
|
# 유사도 비교로 적합한 이미지를 가진 옵션번호 저장
|
||||||
similarity = find_most_similar_image_by_one(original_img, img_url)
|
# similarity = find_most_similar_image_by_one(original_img, img_url)
|
||||||
|
similarity = 0.7
|
||||||
|
|
||||||
if similarity > 0.6:
|
if similarity > 0.6:
|
||||||
selected_option_indexes.append(i)
|
selected_option_indexes.append(i)
|
||||||
logger.debug(f"옵션번호 {i}번이 이미지 유사도 {similarity}로 선택되었습니다.")
|
logger.debug(f"옵션번호 {i}번이 이미지 유사도 {similarity}로 선택되었습니다.")
|
||||||
|
|
|
||||||
25
main.spec
25
main.spec
|
|
@ -1,43 +1,36 @@
|
||||||
# -*- mode: python ; coding: utf-8 -*-
|
# -*- mode: python ; coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
a = Analysis(
|
a = Analysis(
|
||||||
['main.py'],
|
['main.py'],
|
||||||
pathex=[],
|
pathex=[],
|
||||||
binaries=[],
|
binaries=[],
|
||||||
datas=[],
|
datas=[('H:\\py\\per368\\Lib\\site-packages\\paddleocr', 'paddleocr')],
|
||||||
hiddenimports=[],
|
hiddenimports=['shapely'],
|
||||||
hookspath=[],
|
hookspath=[],
|
||||||
hooksconfig={},
|
hooksconfig={},
|
||||||
runtime_hooks=[],
|
runtime_hooks=[],
|
||||||
excludes=[],
|
excludes=[],
|
||||||
noarchive=False,
|
noarchive=False,
|
||||||
)
|
)
|
||||||
pyz = PYZ(a.pure)
|
pyz = PYZ(a.pure, a.zipped_data)
|
||||||
|
|
||||||
exe = EXE(
|
exe = EXE(
|
||||||
pyz,
|
pyz,
|
||||||
a.scripts,
|
a.scripts,
|
||||||
|
a.binaries,
|
||||||
|
a.datas,
|
||||||
[],
|
[],
|
||||||
exclude_binaries=True,
|
|
||||||
name='main',
|
name='main',
|
||||||
debug=False,
|
debug=False,
|
||||||
bootloader_ignore_signals=False,
|
bootloader_ignore_signals=False,
|
||||||
strip=False,
|
strip=False,
|
||||||
upx=True,
|
upx=True,
|
||||||
console=True,
|
upx_exclude=[],
|
||||||
|
runtime_tmpdir=None,
|
||||||
|
console=False,
|
||||||
|
onefile=True,
|
||||||
disable_windowed_traceback=False,
|
disable_windowed_traceback=False,
|
||||||
argv_emulation=False,
|
argv_emulation=False,
|
||||||
target_arch=None,
|
target_arch=None,
|
||||||
codesign_identity=None,
|
codesign_identity=None,
|
||||||
entitlements_file=None,
|
entitlements_file=None,
|
||||||
)
|
)
|
||||||
coll = COLLECT(
|
|
||||||
exe,
|
|
||||||
a.binaries,
|
|
||||||
a.datas,
|
|
||||||
strip=False,
|
|
||||||
upx=True,
|
|
||||||
upx_exclude=[],
|
|
||||||
name='main',
|
|
||||||
)
|
|
||||||
|
|
|
||||||
|
|
@ -269,12 +269,12 @@ def modify_products(driver, gemini, mongo_config, set_num_modify):
|
||||||
click_element(driver, 'CSS_SELECTOR', '.ant-tabs-tab:nth-child(4)', wait_time=10, click_type='normal')
|
click_element(driver, 'CSS_SELECTOR', '.ant-tabs-tab:nth-child(4)', wait_time=10, click_type='normal')
|
||||||
|
|
||||||
logger.debug("키워드 수정작업 시작")
|
logger.debug("키워드 수정작업 시작")
|
||||||
# edit_tag(driver, product_infos[i-1])
|
edit_tag(driver, product_infos[i-1])
|
||||||
logger.debug("키워드 수정작업 완료")
|
logger.debug("키워드 수정작업 완료")
|
||||||
# 여기에 상품 수정 관련 코드 추가
|
# 여기에 상품 수정 관련 코드 추가
|
||||||
|
|
||||||
logger.debug("옵션 수정작업 시작")
|
logger.debug("옵션 수정작업 시작")
|
||||||
# modify_option_page(driver, product_infos[i-1])
|
modify_option_page(driver, product_infos[i-1])
|
||||||
logger.debug("옵션 수정작업 완료")
|
logger.debug("옵션 수정작업 완료")
|
||||||
|
|
||||||
logger.debug("가격 수정작업 시작")
|
logger.debug("가격 수정작업 시작")
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,177 @@
|
||||||
|
import sys
|
||||||
|
from cx_Freeze import setup, Executable
|
||||||
|
|
||||||
|
# 실행 파일에 대한 정보
|
||||||
|
executables = [
|
||||||
|
Executable('main.py', # 패키징할 메인 스크립트 파일
|
||||||
|
base=None, # 실행 파일에 대한 기본 플랫폼. None으로 설정하여 기본값 사용
|
||||||
|
# targetName='AutoPercenty.exe'
|
||||||
|
), # 생성될 실행 파일의 이름
|
||||||
|
]
|
||||||
|
|
||||||
|
# 포함할 freeze 목록
|
||||||
|
freeze_list = [
|
||||||
|
'altgraph',
|
||||||
|
'annotated-types',
|
||||||
|
'ansicon',
|
||||||
|
'astor',
|
||||||
|
'attrdict',
|
||||||
|
'attrs',
|
||||||
|
'Babel',
|
||||||
|
'bce-python-sdk',
|
||||||
|
'beautifulsoup4',
|
||||||
|
'blessed',
|
||||||
|
'blinker',
|
||||||
|
'bs4',
|
||||||
|
'cachetools',
|
||||||
|
'certifi',
|
||||||
|
'cffi',
|
||||||
|
'chardet',
|
||||||
|
'charset-normalizer',
|
||||||
|
'click',
|
||||||
|
'colorama',
|
||||||
|
'contourpy',
|
||||||
|
'cryptography',
|
||||||
|
'cssselect',
|
||||||
|
'cssutils',
|
||||||
|
'cycler',
|
||||||
|
'Cython',
|
||||||
|
'decorator',
|
||||||
|
'dnspython',
|
||||||
|
'editor',
|
||||||
|
'et-xmlfile',
|
||||||
|
'fake-useragent',
|
||||||
|
'filelock',
|
||||||
|
'fire',
|
||||||
|
'Flask',
|
||||||
|
'flask-babel',
|
||||||
|
'fonttools',
|
||||||
|
'fsspec',
|
||||||
|
'future',
|
||||||
|
'google',
|
||||||
|
'google-ai-generativelanguage',
|
||||||
|
'google-api-core',
|
||||||
|
'google-auth',
|
||||||
|
'google-cloud',
|
||||||
|
'google-generativeai',
|
||||||
|
'googleapis-common-protos',
|
||||||
|
'googletrans',
|
||||||
|
'grpcio',
|
||||||
|
'grpcio-status',
|
||||||
|
'h11',
|
||||||
|
'h2',
|
||||||
|
'hpack',
|
||||||
|
'hstspreload',
|
||||||
|
'httpcore',
|
||||||
|
'httpx',
|
||||||
|
'hyperframe',
|
||||||
|
'idna',
|
||||||
|
'imageio',
|
||||||
|
'imgaug',
|
||||||
|
'importlib-metadata',
|
||||||
|
'importlib-resources',
|
||||||
|
'inquirer',
|
||||||
|
'install',
|
||||||
|
'itsdangerous',
|
||||||
|
'Jinja2',
|
||||||
|
'jinxed',
|
||||||
|
'kiwisolver',
|
||||||
|
'lazy_loader',
|
||||||
|
'lmdb',
|
||||||
|
'lxml',
|
||||||
|
'MarkupSafe',
|
||||||
|
'matplotlib',
|
||||||
|
'mpmath',
|
||||||
|
'networkx',
|
||||||
|
'numpy',
|
||||||
|
'opencv-contrib-python',
|
||||||
|
'opencv-python',
|
||||||
|
'opencv-python-headless',
|
||||||
|
'openpyxl',
|
||||||
|
'opt-einsum',
|
||||||
|
'outcome',
|
||||||
|
'packaging',
|
||||||
|
'paddleocr',
|
||||||
|
'paddlepaddle',
|
||||||
|
'pandas',
|
||||||
|
'pdf2docx',
|
||||||
|
'pefile',
|
||||||
|
'pillow',
|
||||||
|
'premailer',
|
||||||
|
'proto-plus',
|
||||||
|
'protobuf',
|
||||||
|
'psutil',
|
||||||
|
'pyasn1',
|
||||||
|
'pyasn1-modules',
|
||||||
|
'pyclipper',
|
||||||
|
'pycparser',
|
||||||
|
'pycryptodome',
|
||||||
|
'pydantic',
|
||||||
|
'pydantic_core',
|
||||||
|
'pyinstaller',
|
||||||
|
'pyinstaller-hooks-contrib',
|
||||||
|
'pymongo',
|
||||||
|
'PyMuPDF',
|
||||||
|
'pyparsing',
|
||||||
|
'PyQt5',
|
||||||
|
'PyQt5-Qt5',
|
||||||
|
'PyQt5-sip',
|
||||||
|
'PySocks',
|
||||||
|
'python-dateutil',
|
||||||
|
'python-docx',
|
||||||
|
'pytz',
|
||||||
|
'pywin32-ctypes',
|
||||||
|
'PyYAML',
|
||||||
|
'rapidfuzz',
|
||||||
|
'rarfile',
|
||||||
|
'readchar',
|
||||||
|
'requests',
|
||||||
|
'rfc3986',
|
||||||
|
'rsa',
|
||||||
|
'runs',
|
||||||
|
'safeIO',
|
||||||
|
'scikit-image',
|
||||||
|
'scipy',
|
||||||
|
'selenium',
|
||||||
|
'selenium-stealth',
|
||||||
|
'shapely',
|
||||||
|
'six',
|
||||||
|
'sniffio',
|
||||||
|
'sortedcontainers',
|
||||||
|
'soupsieve',
|
||||||
|
'sympy',
|
||||||
|
'termcolor',
|
||||||
|
'tifffile',
|
||||||
|
'torch',
|
||||||
|
'torchvision',
|
||||||
|
'tqdm',
|
||||||
|
'translatepy',
|
||||||
|
'trio',
|
||||||
|
'trio-websocket',
|
||||||
|
'typing_extensions',
|
||||||
|
'tzdata',
|
||||||
|
'urllib3',
|
||||||
|
'visualdl',
|
||||||
|
'wcwidth',
|
||||||
|
'Werkzeug',
|
||||||
|
'wsproto',
|
||||||
|
'xmod',
|
||||||
|
'zipp'
|
||||||
|
]
|
||||||
|
|
||||||
|
# 패키지 정보 설정
|
||||||
|
options = {
|
||||||
|
'build_exe': {
|
||||||
|
'includes': freeze_list, # 포함할 freeze 목록
|
||||||
|
'packages': ["annotated_types"] # 필요 시 여기에 추가 패키지를 포함
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# 실행 파일 생성
|
||||||
|
setup(
|
||||||
|
name='AutoPercenty', # 프로그램 이름
|
||||||
|
version='1.0', # 버전
|
||||||
|
description='퍼센티 자동화 프로그램', # 설명
|
||||||
|
executables=executables, # 실행 파일 정보
|
||||||
|
options=options # 패키지 정보
|
||||||
|
)
|
||||||
Loading…
Reference in New Issue