Skip to content

Commit

Permalink
update version and fix utf-8 in file paths issue
Browse files Browse the repository at this point in the history
  • Loading branch information
danielecook committed Jan 11, 2020
1 parent 1309bc1 commit 1e53332
Show file tree
Hide file tree
Showing 15 changed files with 470 additions and 476 deletions.
2 changes: 1 addition & 1 deletion codebox.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from collections import Counter
import difflib

__version__ = '0.2'
__version__ = '0.3'

def main(wf):
arg = ' '.join(wf.args)
Expand Down
5 changes: 2 additions & 3 deletions set_source.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/python
# encoding: utf-8
#!/usr/bin/env python

import sys
import os
Expand All @@ -10,8 +9,8 @@ def main(wf):
wf.add_item("To ensure your file is found, make sure it ends in '.cbxml'", icon="info.png")
out, err = Popen(["mdfind","-name",".cbxml"], stdout=PIPE, stderr=PIPE).communicate()
out = out.split("\n")
log.debug(out)
for i in out:
i = i.decode("utf-8")
wf.add_item(os.path.split(i)[1],i, arg=i, valid=True)

wf.send_feedback()
Expand Down
2 changes: 1 addition & 1 deletion workflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
__version__ = open(os.path.join(os.path.dirname(__file__), 'version')).read()
__author__ = 'Dean Jackson'
__licence__ = 'MIT'
__copyright__ = 'Copyright 2014-2017 Dean Jackson'
__copyright__ = 'Copyright 2014-2019 Dean Jackson'

__all__ = [
'Variables',
Expand Down
Binary file modified workflow/__init__.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions workflow/background.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
# Created on 2014-04-06
#

"""
This module provides an API to run commands in background processes.
"""This module provides an API to run commands in background processes.
Combine with the :ref:`caching API <caching-data>` to work from cached data
while you fetch fresh data in the background.
Expand Down
Binary file modified workflow/background.pyc
Binary file not shown.
9 changes: 5 additions & 4 deletions workflow/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
# TODO: Exclude this module from test and code coverage in py2.6

"""
Post notifications via the macOS Notification Center. This feature
is only available on Mountain Lion (10.8) and later. It will
silently fail on older systems.
Post notifications via the macOS Notification Center.
This feature is only available on Mountain Lion (10.8) and later.
It will silently fail on older systems.
The main API is a single function, :func:`~workflow.notify.notify`.
Expand Down Expand Up @@ -198,7 +199,7 @@ def notify(title='', text='', sound=None):
env = os.environ.copy()
enc = 'utf-8'
env['NOTIFY_TITLE'] = title.encode(enc)
env['NOTIFY_MESSAGE'] = text.encode(enc)
env['NOTIFY_MESSAGE'] = text.encode(enc)
env['NOTIFY_SOUND'] = sound.encode(enc)
cmd = [n]
retcode = subprocess.call(cmd, env=env)
Expand Down
Loading

0 comments on commit 1e53332

Please sign in to comment.