Convert applescript to plain text format

So that it's readable and diffable from the web interface

[ci skip]
This commit is contained in:
Mislav Marohnić
2014-08-06 07:50:59 -07:00
parent 7d416739ba
commit 0bb789e3e6
3 changed files with 14 additions and 1 deletions

13
db/aliases.applescript Normal file
View File

@@ -0,0 +1,13 @@
set jsCode to "document.getElementById('output').value"
set json to missing value
tell application "Safari"
repeat
set json to (do JavaScript jsCode in current tab of window 1)
if (json is not missing value) then exit repeat
delay 0.5
end repeat
close current tab of window 1
end tell
return json

View File

Binary file not shown.

View File

@@ -25,7 +25,7 @@ bundle exec rake db:dump > db/emoji2.json
mv db/emoji2.json db/emoji.json
open -g -a Safari db/aliases.html
osascript db/aliases.scpt | sed '/^$/d' > db/emoji2.json
osascript db/aliases.applescript | sed '/^$/d' > db/emoji2.json
mv db/emoji2.json db/emoji.json
if git diff --exit-code --stat -- db/emoji.json; then