Skip to content

Commit 1ebd118

Browse files
committed
Improve example workflows
1 parent 4427b40 commit 1ebd118

23 files changed

+478
-382
lines changed

_examples/README.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,35 @@ workflow-install -s /path/to/example
1616
which will symlink the workflow to Alfred's workflow directory.
1717

1818

19-
## bookmarks ##
19+
## fuzzy ##
2020

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

23-
Displays and filters a list of your Safari bookmarks.
23+
Basic demonstration of using fuzzy filtering.
2424

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

26-
## fuzzy ##
2727

28-
Basic demonstration of using fuzzy filtering.
28+
## reading-list ##
29+
30+
Demonstrates customised fuzzy sorting.
31+
32+
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").
33+
34+
Regular fuzzy sorting only considers match quality, so with the query
35+
"kingkiller", the Kingkiller Chronicle series would be sorted based on where
36+
the term "kingkiller" appears in the title, i.e. shortest title wins:
37+
38+
The Doors of Stone (The Kingkiller Chronicle, #3) [unpublished]
39+
The Wise Man's Fear (The Kingkiller Chronicle, #2) [unread]
40+
The Name of the Wind (The Kingkiller Chronicle, #1) [read]
41+
42+
This custom implementation sorts by status then match quality, thus keeping
43+
unread books before unpublished and read ones:
2944

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

3249

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

4764
[caching]: https://godoc.org/github.com/deanishe/awgo#Cache
4865
[installer]: https://gist.github.com/deanishe/35faae3e7f89f629a94e
49-
[fuzzy-if]: https://godoc.org/github.com/deanishe/awgo/fuzzy#Sortable
66+
[fuzzy-if]: https://godoc.org/go.deanishe.net/fuzzy#Sortable

_examples/bookmarks/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

_examples/bookmarks/bookmarks.go

Lines changed: 0 additions & 138 deletions
This file was deleted.

_examples/bookmarks/icon.png

-72.5 KB
Binary file not shown.

_examples/bookmarks/main.go

Lines changed: 0 additions & 88 deletions
This file was deleted.

_examples/fuzzy/icon.png

421 KB
Loading

0 commit comments

Comments
 (0)