Browse Source

Merge branch 'release/v1.2.3'

liuyuqi-dellpc 8 months ago
parent
commit
cb9bdd338f
2 changed files with 36 additions and 24 deletions
  1. 9 4
      .github/workflows/build.yml
  2. 27 20
      scripts/start.bat

+ 9 - 4
.github/workflows/build.yml

@@ -33,15 +33,20 @@ jobs:
           cache: pip
           cache: pip
           cache-dependency-path: '**/requirements*.txt'
           cache-dependency-path: '**/requirements*.txt'
 
 
+      - name: Set up Python dependency cache
+        uses: actions/cache@v3
+        with:
+          path: ~/.cache/pypoetry
+          key: ${{ runner.os }}-poetry-${{ hashFiles('pyproject.toml') }}-${{ steps.get_date.outputs.date }}
+
       - name: Install Dependencies
       - name: Install Dependencies
         run: |
         run: |
-          python -m pip install --upgrade pip wheel setuptools
-          pip install -r requirements.txt
-          python -m pip install pyinstaller
+          python -m pip install --upgrade pip wheel setuptools poetry
+          poetry install
 
 
       - name: Build Package
       - name: Build Package
         run: |
         run: |
-          python -m PyInstaller -F -c  --name search_domain main.py
+          poetry run python -m PyInstaller -F -c --name search_domain main.py
 
 
       - name: Update to ali oss
       - name: Update to ali oss
         uses: yizhoumo/setup-ossutil@v1
         uses: yizhoumo/setup-ossutil@v1

+ 27 - 20
scripts/start.bat

@@ -13,39 +13,46 @@ REM ***************************************************************************
 
 
 REM 1. 打印help
 REM 1. 打印help
 :help
 :help
-echo 请输入相应的参数启动程序
 echo 1. 生成域名
 echo 1. 生成域名
 echo 2. 检索域名
 echo 2. 检索域名
-set /p input=请输入相应的参数:
+set /p input=请选择command:
 if "%input%"=="1" goto make_domain
 if "%input%"=="1" goto make_domain
 if "%input%"=="2" goto search_domain
 if "%input%"=="2" goto search_domain
 goto help
 goto help
 
 
 REM 2. 生成域名
 REM 2. 生成域名
 :make_domain
 :make_domain
-echo 请输入域名长度:
-set /p length=请输入域名长度:
-echo 请输入域名后缀:
-set /p ext_name=请输入域名后缀:
-echo 请输入替换字符:
-set /p characters=请输入替换字符:
-echo 请输入新字符:
-set /p new_characters=请输入新字符:
+echo.
+echo 1. 中文双拼
+echo 2. 英文单词
+set /p lang_tmp=请选择lang:
+if "%lang_tmp%"=="1" set lang=zh
+if "%lang_tmp%"=="2" set lang=en
+
+echo.
+set /p keyword=请输入关键词keyword,多个逗号分隔:
+
+echo.
+echo 1. prefix
+echo 2. suffix
+set /p position_tmp=请选择position:
+if "%position_tmp%"=="1" set position=prefix
+if "%position_tmp%"=="2" set position=suffix
+
+echo.
+set /p domain=请输入域名后缀,多个逗号分隔:
+
+echo.
 echo 生成域名中...
 echo 生成域名中...
-search_domain.exe make %ext_name% %characters% %new_characters% %length%
+search_domain.exe generate --lang %lang% --keyword %keyword% --position %position% --domain %domain%
+echo finish...
 pause
 pause
 goto help
 goto help
 
 
 REM 3. 检索域名
 REM 3. 检索域名
 :search_domain
 :search_domain
-echo 请输入域名后缀:
-set /p ext_name=请输入域名后缀:
-echo 请输入替换字符:
-set /p characters=请输入替换字符:
-echo 请输入新字符:
-set /p new_characters=请输入新字符:
+echo.
 echo 检索域名中...
 echo 检索域名中...
-search_domain.exe search %ext_name% %characters% %new_characters%
-
-
+search_domain.exe search
+echo finish...
 pause
 pause