Skip to content

Commit

Permalink
Refine codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuniz committed May 7, 2023
1 parent 9950366 commit 91f3a89
Show file tree
Hide file tree
Showing 20 changed files with 164 additions and 10,263 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/test-daum-ac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,12 @@ on:
- '**.py'

jobs:
test-daum-ac-python2:
test-daum-ac-python3:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- uses: actions/setup-python@v3
with:
python-version: '2.x'
- run: (cd workflow; python -m unittest test_workflow.MyTestCase; )
test-daum-ac-python3:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.x'
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "alfred-workflow"]
path = alfred-workflow
url = https://github.com/deanishe/alfred-workflow.git
[submodule "alfred-pyworkflow"]
path = alfred-pyworkflow
url = git@github.com:harrtho/alfred-pyworkflow.git
1 change: 1 addition & 0 deletions alfred-pyworkflow
Submodule alfred-pyworkflow added at 710861
1 change: 0 additions & 1 deletion alfred-workflow
Submodule alfred-workflow deleted from 55886c
3 changes: 0 additions & 3 deletions workflow/certifi/__init__.py

This file was deleted.

12 changes: 0 additions & 12 deletions workflow/certifi/__main__.py

This file was deleted.

4,362 changes: 0 additions & 4,362 deletions workflow/certifi/cacert.pem

This file was deleted.

60 changes: 0 additions & 60 deletions workflow/certifi/core.py

This file was deleted.

11 changes: 5 additions & 6 deletions workflow/daum_dic.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@

import sys

if sys.version[0] == "2":
from workflow import web, Workflow
else:
from workflow3 import web, Workflow
from workflow import web, Workflow


# lan : all
Expand All @@ -48,13 +45,14 @@ def main(wf):
dic_req = wf.args[0]
args = wf.args[1]

wf.add_item(title='Searching Daum%s for \'%s\'' % (dic_req, args),
it = wf.add_item(title='Searching Daum%s for \'%s\'' % (dic_req, args),
autocomplete=args,
arg=args,
copytext=args,
largetext=args,
quicklookurl='https://dic.daum.net/search.do?dic=%s&q=%s' % (dic_req, args),
valid=True)
it.setvar('lang', dic_req)

def wrapper():
return get_data(dic_req, args)
Expand All @@ -64,7 +62,7 @@ def wrapper():
for txt in res_json['items'][dic_req]:
if len(txt['item']) > 0:
stxt = txt['item'].split('|')
wf.add_item(
it = wf.add_item(
title='%s %s' % (stxt[1], stxt[2]),
subtitle='Searching Daum%s for \'%s\'' % (dic_req, stxt[1]),
autocomplete=stxt[1],
Expand All @@ -73,6 +71,7 @@ def wrapper():
largetext=stxt[1],
quicklookurl='https://dic.daum.net/search.do?dic=%s&q=%s' % (dic_req, stxt[1]),
valid=True)
it.setvar('lang', dic_req)

wf.send_feedback()

Expand Down
5 changes: 1 addition & 4 deletions workflow/daum_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@

import sys

if sys.version[0] == "2":
from workflow import web, Workflow
else:
from workflow3 import web, Workflow
from workflow import web, Workflow

def get_data(word):
url = 'https://suggest.search.daum.net/sushi/pc/get'
Expand Down
Loading

0 comments on commit 91f3a89

Please sign in to comment.