crystal-alfred
alfred
Utility lib to create items in JSON format for Alfred
Installation
Add this to your application's shard.yml
:
dependencies:
alfred:
github: International/crystal-alfred
Usage
At this moment, the only supported format is JSON.
require "alfred"
response = Alfred::Response.new
response << Alfred::Item.new("title", "subtitle", "arg", Alfred::Icon.new("icon","icon.png"))
puts response.to_json
# {"items":[{"title":"title","subtitle":"subtitle","arg":"arg","icon":{"type":"icon","path":"icon.png"}}]}
When using Alfred::Item
, probably the parameter you'll most likely be interested in is arg
. This is the parameter that gets sent further when you select an item from the list.
Contributing
- Fork it ( https://github.com/International/crystal-alfred/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- International George Opritescu - creator, maintainer
Repository
crystal-alfred
Owner
Statistic
- 2
- 1
- 0
- 0
- 0
- about 8 years ago
- October 18, 2016
License
MIT License
Links
Synced at
Sun, 22 Dec 2024 20:02:42 GMT
Languages