Skip to content

Commit

Permalink
upgrade to v1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
candywater committed May 7, 2024
1 parent cd15ea3 commit af232b8
Show file tree
Hide file tree
Showing 10 changed files with 505 additions and 684 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/python-dry-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: python3 with iSearch

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.11"

steps:
- uses: actions/checkout@v4
- name: Set up Python v3/v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test install and Run
run: |
pip install .
s
echo 0 | s apple
- name: Lint with flake8
run: |
# to allow py2 run
# stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# no pytest now....
# - name: Test with pytest
# run: |
# pytest
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
内容来自[网易有道词典](http://dict.youdao.com/)


- v1.0.0 兼容 Python2、Python3
- v1.0.2 优化查询流程:查询后会自动提示是否存入本地
- v1.0.0 [#9b5bd2b](https://github.com/candywater/iSearch/commit/9b5bd2b477a57a65da749ace015b09ba1adc6908) 兼容 Python2、Python3
- v1.0.2 [#4ffdeee](https://github.com/candywater/iSearch/commit/4ffdeee88533adf34209113cc8ad1de48e94e62a) 优化查询流程:查询后会自动提示是否存入本地
- v1.0.2 with readme [#06013d6](https://github.com/candywater/iSearch/commit/06013d610338397f8cdd69f330b43e1ee8d29f1b)
- v1.0.4 [#bc6c27c](https://github.com/candywater/iSearch/commit/bc6c27c666e465b0fdfde8def79f9811bf943101) 追加config file功能

---

Expand Down Expand Up @@ -97,13 +99,15 @@ function s(){
>
>-t --time 列出最近加入的n个单词
>
>-l --catalog 列出A-Z开头的单词目录
>
>-s --set 设置单词的优先级
>
>-v --verbose 查看详细信息
>
>-o -output 输出模式
>-ca --card 显示单词名和基本信息




Expand Down
2 changes: 1 addition & 1 deletion iSearch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# coding=utf-8

__version__ = '1.0.3'
__version__ = '1.0.4'
10 changes: 5 additions & 5 deletions iSearch/config.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import os

SKIP_SAVE_DB_CONFIRM_MESSAGE = "skipSaveDbConfirmMessage"
DEFAULT_SAVE_DB_LEVEL = "defaultSaveDbLevel"
SHOW_SAVE_DB_CONFIRM_MESSAGE = "SHOW_SAVE_DB_CONFIRM_MESSAGE"
DEFAULT_SAVE_DB_LEVEL = "DEFAULT_SAVE_DB_LEVEL"

DEFAULT_CONFIG = {
SKIP_SAVE_DB_CONFIRM_MESSAGE : False,
SHOW_SAVE_DB_CONFIRM_MESSAGE : False,
DEFAULT_SAVE_DB_LEVEL: "3"
}

Expand Down Expand Up @@ -38,8 +38,8 @@ def parseConfigFile(configFile):
value = False
config[key] = value

if SKIP_SAVE_DB_CONFIRM_MESSAGE not in config:
config[SKIP_SAVE_DB_CONFIRM_MESSAGE] = DEFAULT_CONFIG[SKIP_SAVE_DB_CONFIRM_MESSAGE]
if SHOW_SAVE_DB_CONFIRM_MESSAGE not in config:
config[SHOW_SAVE_DB_CONFIRM_MESSAGE] = DEFAULT_CONFIG[SHOW_SAVE_DB_CONFIRM_MESSAGE]
if DEFAULT_SAVE_DB_LEVEL not in config:
config[DEFAULT_SAVE_DB_LEVEL] = DEFAULT_CONFIG[DEFAULT_SAVE_DB_LEVEL]
return config
Expand Down
127 changes: 0 additions & 127 deletions iSearch/display.py

This file was deleted.

Loading

0 comments on commit af232b8

Please sign in to comment.