Skip to content

Commit

Permalink
Update Alfred-Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
deanishe committed Jul 31, 2020
1 parent 5354681 commit 28b5af2
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
Binary file added Fixum-0.11.alfredworkflow
Binary file not shown.
4 changes: 2 additions & 2 deletions src/info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ It is primarily a workaround to fix bugs that are preventing the workflows from
</dict>
</dict>
<key>version</key>
<string>0.10</string>
<string>0.11</string>
<key>webaddress</key>
<string></string>
<string>https://github.com/deanishe/alfred-fixum</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion src/workflow/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.39.0
1.40.0
2 changes: 1 addition & 1 deletion src/workflow/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ def request(method, url, params=None, data=None, headers=None, cookies=None,
socket.setdefaulttimeout(timeout)

# Default handlers
openers = []
openers = [urllib2.ProxyHandler(urllib2.getproxies())]

if not allow_redirects:
openers.append(NoRedirectHandler())
Expand Down
22 changes: 16 additions & 6 deletions src/workflow/workflow3.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,16 @@ class Variables(dict):
information.
Args:
arg (unicode, optional): Main output/``{query}``.
arg (unicode or list, optional): Main output/``{query}``.
**variables: Workflow variables to set.
In Alfred 4.1+ and Alfred-Workflow 1.40+, ``arg`` may also be a
:class:`list` or :class:`tuple`.
Attributes:
arg (unicode): Output value (``{query}``).
arg (unicode or list): Output value (``{query}``).
In Alfred 4.1+ and Alfred-Workflow 1.40+, ``arg`` may also be a
:class:`list` or :class:`tuple`.
config (dict): Configuration for downstream workflow element.
"""
Expand All @@ -68,7 +72,7 @@ def __init__(self, arg=None, **variables):

@property
def obj(self):
"""Return ``alfredworkflow`` `dict`."""
"""``alfredworkflow`` :class:`dict`."""
o = {}
if self:
d2 = {}
Expand All @@ -92,10 +96,10 @@ def __unicode__(self):
"""
if not self and not self.config:
if self.arg:
return self.arg
else:
if not self.arg:
return u''
if isinstance(self.arg, unicode):
return self.arg

return json.dumps(self.obj)

Expand Down Expand Up @@ -328,6 +332,9 @@ def add_modifier(self, key, subtitle=None, arg=None, valid=None, icon=None,
:meth:`Workflow.add_item() <workflow.Workflow.add_item>`
for valid values.
In Alfred 4.1+ and Alfred-Workflow 1.40+, ``arg`` may also be a
:class:`list` or :class:`tuple`.
Returns:
Modifier: Configured :class:`Modifier`.
Expand Down Expand Up @@ -568,6 +575,9 @@ def add_item(self, title, subtitle='', arg=None, autocomplete=None,
turned on for your Script Filter, Alfred (version 3.5 and
above) will filter against this field, not ``title``.
In Alfred 4.1+ and Alfred-Workflow 1.40+, ``arg`` may also be a
:class:`list` or :class:`tuple`.
See :meth:`Workflow.add_item() <workflow.Workflow.add_item>` for
the main documentation and other parameters.
Expand Down

0 comments on commit 28b5af2

Please sign in to comment.