alfred-workflow-tools
is a collection of Go tools that should be invoked by Alfred in a workflow.
The results are returned using the Alfred Script Filter JSON Format so they can automatically be consumed by a workflow.
cmd/twitch
fetches Follows (or only Live Follows) for a specific Twitch User or a list of Live Streams for a specific Game (and optionally in a specific Language).
cmd/twitch
can be executed in a Run Script Action to return Twitch Follows:
$ twitch
{
"items": [
{
"title": "Streamer 1",
"subtitle": "Science & Technology - 8625 viewers - Coding things",
"arg": "https://www.twitch.tv/streamer1"
},
{
"title": "Streamer 2",
"subtitle": "Just Chatting - 2811 viewers - Chatting about things",
"arg": "https://www.twitch.tv/streamer2"
},
…
]
}
You can also use the --live
option to only return Twitch Follows that are currently live or alternatively the --game
option to only return Twitch Live Streams for a specific Game ID (and optionally in a specific Language by using the --gameLang
option with an ISO 639-1 two-letter language code).
cmd/twitch
consumes various environment variables that should be provided by Alfred when invoking the script in a workflow:
Environment variable | Description |
---|---|
TWITCH_CLIENT_ID |
A Twitch application client ID. |
TWITCH_OAUTH_TOKEN |
A Twitch User access token with the user:read:follows scope. |
cmd/betaseries
fetches Shows with Unwatched Episode(s) for a specific BetaSeries User.
cmd/betaseries
can be executed in a Run Script Action to return BetaSeries Shows:
$ betaseries
{
"items": [
{
"title": "Show 1",
"subtitle": "2 episodes remaining (90 total)",
"arg": "123456"
},
{
"title": "Show 2",
"subtitle": "3 episodes remaining (5 total)",
"arg": "456789"
},
…
]
}
You can also use the --watched
option to mark all Aired Unwatched Episodes of a BetaSeries Shows as watched.
cmd/betaseries
consumes various environment variables that should be provided by Alfred when invoking the script in a workflow:
Environment variable | Description |
---|---|
BETASERIES_CLIENT_ID |
A BetaSeries application client ID. |
BETASERIES_OAUTH_TOKEN |
A BetaSeries User access token. |
cmd/github
fetches Repositories and Recent Contributions for a specific GitHub User. Repositories are cached if the alfred_workflow_cache
environment variable (automatically provided by Alfred) is set.
cmd/github
can be executed in a Run Script Action to return GitHub Repositories:
$ github
{
"items": [
{
"title": "user/repo1",
"subtitle": "Last activity 2 hours ago",
"arg": "https://www.github.com/user/repo1"
},
{
"title": "org/repo2",
"subtitle": "Last activity 5 days ago",
"arg": "https://www.github.com/org/repo2"
},
…
]
}
You can use the --clear
option to clear the cached GitHub Repositories.
cmd/github
consumes an environment variables that should be provided by Alfred when invoking the script in a workflow:
Environment variable | Description |
---|---|
GITHUB_OAUTH_TOKEN |
A GitHub personal access token. |
- Fork & clone this repository.
- Build & run the development version using
go run
for the desired tool.
Licensed under the MIT License, Copyright © HiDeoo.
See LICENSE for more information.