Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
whyliam committed May 5, 2015
0 parents commit c758a4f
Show file tree
Hide file tree
Showing 13 changed files with 4,248 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

*.pyc
Binary file added com.whyliam.workflows.youdao.alfredworkflow
Binary file not shown.
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon_basic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon_web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
106 changes: 106 additions & 0 deletions info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>bundleid</key>
<string>com.whyliam.workflows.youdao</string>
<key>category</key>
<string>Tools</string>
<key>connections</key>
<dict>
<key>91C343E7-50D8-4B0D-9034-1C16C20DA8D4</key>
<array>
<dict>
<key>destinationuid</key>
<string>E5E934DB-DBAC-4D0C-9AB0-ADAF62C5640B</string>
<key>modifiers</key>
<integer>0</integer>
<key>modifiersubtext</key>
<string></string>
</dict>
</array>
</dict>
<key>createdby</key>
<string>whyliam</string>
<key>description</key>
<string>使用有道翻译你想知道的单词和语句</string>
<key>disabled</key>
<false/>
<key>name</key>
<string>Youdao</string>
<key>objects</key>
<array>
<dict>
<key>config</key>
<dict>
<key>argumenttype</key>
<integer>0</integer>
<key>escaping</key>
<integer>127</integer>
<key>keyword</key>
<string>yd</string>
<key>queuedelaycustom</key>
<integer>3</integer>
<key>queuedelayimmediatelyinitially</key>
<true/>
<key>queuedelaymode</key>
<integer>0</integer>
<key>queuemode</key>
<integer>1</integer>
<key>runningsubtext</key>
<string>正在获取中...</string>
<key>script</key>
<string>/usr/bin/python youdao.py "{query}"</string>
<key>subtext</key>
<string>使用有道翻译你想知道的单词和语句 {query}</string>
<key>title</key>
<string>有道翻译</string>
<key>type</key>
<integer>0</integer>
<key>withspace</key>
<true/>
</dict>
<key>type</key>
<string>alfred.workflow.input.scriptfilter</string>
<key>uid</key>
<string>91C343E7-50D8-4B0D-9034-1C16C20DA8D4</string>
<key>version</key>
<integer>0</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>plusspaces</key>
<false/>
<key>url</key>
<string>{query}</string>
<key>utf8</key>
<true/>
</dict>
<key>type</key>
<string>alfred.workflow.action.openurl</string>
<key>uid</key>
<string>E5E934DB-DBAC-4D0C-9AB0-ADAF62C5640B</string>
<key>version</key>
<integer>0</integer>
</dict>
</array>
<key>readme</key>
<string></string>
<key>uidata</key>
<dict>
<key>91C343E7-50D8-4B0D-9034-1C16C20DA8D4</key>
<dict>
<key>ypos</key>
<real>10</real>
</dict>
<key>E5E934DB-DBAC-4D0C-9AB0-ADAF62C5640B</key>
<dict>
<key>ypos</key>
<real>10</real>
</dict>
</dict>
<key>webaddress</key>
<string>youdao.com</string>
</dict>
</plist>
108 changes: 108 additions & 0 deletions workflow/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
#!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2014 Dean Jackson <[email protected]>
#
# MIT Licence. See http://opensource.org/licenses/MIT
#
# Created on 2014-02-15
#

"""
A Python helper library for `Alfred 2 <http://www.alfredapp.com/>`_ Workflow
authors.
"""

import os

__title__ = 'Alfred-Workflow'
__version__ = open(os.path.join(os.path.dirname(__file__), 'version')).read()
__author__ = 'Dean Jackson'
__licence__ = 'MIT'
__copyright__ = 'Copyright 2014 Dean Jackson'


# Workflow objects
from .workflow import Workflow, manager

# Exceptions
from .workflow import PasswordNotFound, KeychainError

# Icons
from .workflow import (
ICON_ACCOUNT,
ICON_BURN,
ICON_CLOCK,
ICON_COLOR,
ICON_COLOUR,
ICON_EJECT,
ICON_ERROR,
ICON_FAVORITE,
ICON_FAVOURITE,
ICON_GROUP,
ICON_HELP,
ICON_HOME,
ICON_INFO,
ICON_NETWORK,
ICON_NOTE,
ICON_SETTINGS,
ICON_SWIRL,
ICON_SWITCH,
ICON_SYNC,
ICON_TRASH,
ICON_USER,
ICON_WARNING,
ICON_WEB,
)

# Filter matching rules
from .workflow import (
MATCH_ALL,
MATCH_ALLCHARS,
MATCH_ATOM,
MATCH_CAPITALS,
MATCH_INITIALS,
MATCH_INITIALS_CONTAIN,
MATCH_INITIALS_STARTSWITH,
MATCH_STARTSWITH,
MATCH_SUBSTRING,
)

__all__ = [
'Workflow',
'manager',
'PasswordNotFound',
'KeychainError',
'ICON_ACCOUNT',
'ICON_BURN',
'ICON_CLOCK',
'ICON_COLOR',
'ICON_COLOUR',
'ICON_EJECT',
'ICON_ERROR',
'ICON_FAVORITE',
'ICON_FAVOURITE',
'ICON_GROUP',
'ICON_HELP',
'ICON_HOME',
'ICON_INFO',
'ICON_NETWORK',
'ICON_NOTE',
'ICON_SETTINGS',
'ICON_SWIRL',
'ICON_SWITCH',
'ICON_SYNC',
'ICON_TRASH',
'ICON_USER',
'ICON_WARNING',
'ICON_WEB',
'MATCH_ALL',
'MATCH_ALLCHARS',
'MATCH_ATOM',
'MATCH_CAPITALS',
'MATCH_INITIALS',
'MATCH_INITIALS_CONTAIN',
'MATCH_INITIALS_STARTSWITH',
'MATCH_STARTSWITH',
'MATCH_SUBSTRING',
]
Loading

0 comments on commit c758a4f

Please sign in to comment.