Skip to content

Commit

Permalink
Decode formats #2
Browse files Browse the repository at this point in the history
  • Loading branch information
deanishe committed Oct 4, 2018
1 parent 10626d4 commit ffebaa0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
Binary file removed I-Sheet-You-Not-0.2.3.alfredworkflow
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion src/info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ It specifies no value, so you can't action results.</string>
<string>DEV</string>
</array>
<key>version</key>
<string>0.3.1</string>
<string>0.3.2</string>
<key>webaddress</key>
<string>http://www.deanishe.net/i-sheet-you-not/</string>
</dict>
Expand Down
5 changes: 3 additions & 2 deletions src/isheetyounot/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,17 @@ def parse_args():
evars = {}
formats = {}
for k in os.environ:
k = k.decode('utf-8')
if k.startswith('VAR_'):
v = os.environ[k]
v = os.environ[k].decode('utf-8')
if v and v.isdigit():
evars[k[4:]] = int(v)
else:
log('invalid value for "%s": %r', k, v)

elif k.startswith('FMT_'):
key = k[4:]
v = os.environ[k]
v = os.environ[k].decode('utf-8')
if v and key.isdigit():
formats[int(key)] = v
else:
Expand Down
4 changes: 3 additions & 1 deletion src/isheetyounot/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from xlrd.xldate import xldate_as_datetime

# Workflow version number
version = '0.3.1'
version = '0.3.2'

# Fallback/default values
BUNDLE_ID = 'net.deanishe.alfred-i-sheet-you-not'
Expand Down Expand Up @@ -108,6 +108,7 @@ def cache_key(o):
Returns:
str: MD5 hex digest of options.
"""
# Cache key of full path and *all* variables to ensure uniqueness
p = os.path.abspath(o.docpath)
Expand All @@ -131,6 +132,7 @@ def _cache_path(key):
Returns:
unicode: Filepath in cache directory with ".json" extension.
"""
root = av.get('workflow_cache', CACHE_DIR)
# log('cache_dir=%r', root)
Expand Down

0 comments on commit ffebaa0

Please sign in to comment.