Skip to content

Commit

Permalink
Improve example workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
deanishe committed Aug 4, 2020
1 parent 4427b40 commit 1ebd118
Show file tree
Hide file tree
Showing 23 changed files with 478 additions and 382 deletions.
31 changes: 24 additions & 7 deletions _examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,35 @@ workflow-install -s /path/to/example
which will symlink the workflow to Alfred's workflow directory.


## bookmarks ##
## fuzzy ##

Custom implementation of [`fuzzy.Sortable`][fuzzy-if], which enables fuzzy matching and sorting.
**Alfred 4+ only**

Displays and filters a list of your Safari bookmarks.
Basic demonstration of using fuzzy filtering.

Displays and filters contents of ~/Downloads in Alfred, and allows you to open files, reveal them or browse them in Alfred.

## fuzzy ##

Basic demonstration of using fuzzy filtering.
## reading-list ##

Demonstrates customised fuzzy sorting.

The standard fuzzy sort is only concerned with match quality. This workflow has a custom implementation of [`fuzzy.Sortable`][fuzzy-if] and fuzzy filtering to keep a list of books sorted by status ("unread", "unpublished", "read").

Regular fuzzy sorting only considers match quality, so with the query
"kingkiller", the Kingkiller Chronicle series would be sorted based on where
the term "kingkiller" appears in the title, i.e. shortest title wins:

The Doors of Stone (The Kingkiller Chronicle, #3) [unpublished]
The Wise Man's Fear (The Kingkiller Chronicle, #2) [unread]
The Name of the Wind (The Kingkiller Chronicle, #1) [read]

This custom implementation sorts by status then match quality, thus keeping
unread books before unpublished and read ones:

Displays and filters a list of subdirectories of ~/ in Alfred, and allows you to open the folders or browse them in Alfred.
The Wise Man's Fear (The Kingkiller Chronicle, #2) [unread]
The Doors of Stone (The Kingkiller Chronicle, #3) [unpublished]
The Name of the Wind (The Kingkiller Chronicle, #1) [read]


## update ##
Expand All @@ -46,4 +63,4 @@ Shows a list of repos from GitHub tagged `alfred-workflow`.

[caching]: https://godoc.org/github.com/deanishe/awgo#Cache
[installer]: https://gist.github.com/deanishe/35faae3e7f89f629a94e
[fuzzy-if]: https://godoc.org/github.com/deanishe/awgo/fuzzy#Sortable
[fuzzy-if]: https://godoc.org/go.deanishe.net/fuzzy#Sortable
2 changes: 0 additions & 2 deletions _examples/bookmarks/.gitignore

This file was deleted.

138 changes: 0 additions & 138 deletions _examples/bookmarks/bookmarks.go

This file was deleted.

Binary file removed _examples/bookmarks/icon.png
Binary file not shown.
88 changes: 0 additions & 88 deletions _examples/bookmarks/main.go

This file was deleted.

Binary file modified _examples/fuzzy/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 1ebd118

Please sign in to comment.