Skip to content

Commit

Permalink
Remove jq
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-pennyworth committed Nov 29, 2020
1 parent 7e0b313 commit 1b3cfd8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
1 change: 0 additions & 1 deletion build-scripts/mkworkflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
WF_FILES = [
'icon.png',
'info.plist',
'jq',
'README.md',
]

Expand Down
18 changes: 14 additions & 4 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,25 @@
<key>escaping</key>
<integer>102</integer>
<key>script</key>
<string>./jq ".items[] |= if (.uid==\"$uid\") then . + {variables: {emoji: \"$emoji\"}, icon: {path: \"$iconfile\"}} else . end" alfreditems.json &gt; new.json
<string>import json
import os
mv new.json alfreditems.json</string>
with open('alfreditems.json') as f:
alfreditems = json.load(f)
for item in alfreditems['items']:
if item['uid'] == os.environ['uid']:
item['variables']['emoji'] = os.environ['emoji']
item['icon']['path'] = os.environ['iconfile']
with open('alfreditems.json', 'w') as f:
json.dump(alfreditems, f)</string>
<key>scriptargtype</key>
<integer>1</integer>
<key>scriptfile</key>
<string></string>
<key>type</key>
<integer>0</integer>
<integer>3</integer>
</dict>
<key>type</key>
<string>alfred.workflow.action.script</string>
Expand Down Expand Up @@ -330,7 +340,7 @@ mv new.json alfreditems.json</string>
</dict>
</dict>
<key>version</key>
<string>0.0.2</string>
<string>0.0.3</string>
<key>webaddress</key>
<string>https://github.com/mr-pennyworth/alfred-fastest-emoji</string>
</dict>
Expand Down
Binary file removed jq
Binary file not shown.

0 comments on commit 1b3cfd8

Please sign in to comment.