Skip to content

Commit

Permalink
Update Alfred-Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
deanishe committed Apr 19, 2017
1 parent fc4e73b commit e67efe0
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 26 deletions.
Binary file not shown.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Generate secure random passwords from Alfred. Uses `/dev/urandom` as source of e
- Shows the strength of each generated password.
- More convenient that 1Password or the like.
- More dependable than online generators.
- Copies passwords as "concealed" data by default (so clipboard managers don't record them)
- Copies passwords as "concealed" data by default (so clipboard managers don't record them).


## Contents ##
Expand Down Expand Up @@ -414,7 +414,7 @@ Initial release

### Version 2.1 (2017-04-02) ###

- Default to "concealed" copy. Clipboard managers will ignore the passwords
- Default to "concealed" copy so clipboard managers will ignore the passwords


[demo]: https://github.com/deanishe/alfred-pwgen/raw/master/demo.gif "Alfred Password Generator Demo"
Expand Down
2 changes: 1 addition & 1 deletion src/info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ Comes with a bunch of useful generators (recipes) built in, and you can easily a
</dict>
</dict>
<key>version</key>
<string>2.1</string>
<string>2.1.1</string>
<key>webaddress</key>
<string>https://github.com/deanishe/alfred-pwgen</string>
</dict>
Expand Down
4 changes: 2 additions & 2 deletions src/workflow/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ def download_workflow(url):
"""
filename = url.split("/")[-1]

if (not url.endswith('.alfredworkflow') or
not filename.endswith('.alfredworkflow')):
if (not filename.endswith('.alfredworkflow') and
not filename.endswith('.alfred3workflow')):
raise ValueError('Attachment `{0}` not a workflow'.format(filename))

local_path = os.path.join(tempfile.gettempdir(), filename)
Expand Down
2 changes: 1 addition & 1 deletion src/workflow/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.25
1.25.2
48 changes: 28 additions & 20 deletions src/workflow/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1974,26 +1974,30 @@ def filter(self, query, items, key=lambda x: x, ascending=False,
By default, :meth:`filter` uses all of the following flags (i.e.
:const:`MATCH_ALL`). The tests are always run in the given order:
1. :const:`MATCH_STARTSWITH` : Item search key startswith
``query``(case-insensitive).
2. :const:`MATCH_CAPITALS` : The list of capital letters in item
search key starts with ``query`` (``query`` may be
lower-case). E.g., ``of`` would match ``OmniFocus``,
``gc`` would match ``Google Chrome``.
3. :const:`MATCH_ATOM` : Search key is split into "atoms" on
non-word characters (.,-,' etc.). Matches if ``query`` is
one of these atoms (case-insensitive).
4. :const:`MATCH_INITIALS_STARTSWITH` : Initials are the first
characters of the above-described "atoms" (case-insensitive).
5. :const:`MATCH_INITIALS_CONTAIN` : ``query`` is a substring of
the above-described initials.
6. :const:`MATCH_INITIALS` : Combination of (4) and (5).
7. :const:`MATCH_SUBSTRING` : Match if ``query`` is a substring
of item search key (case-insensitive).
8. :const:`MATCH_ALLCHARS` : Matches if all characters in
``query`` appear in item search key in the same order
1. :const:`MATCH_STARTSWITH`
Item search key starts with ``query`` (case-insensitive).
2. :const:`MATCH_CAPITALS`
The list of capital letters in item search key starts with
``query`` (``query`` may be lower-case). E.g., ``of``
would match ``OmniFocus``, ``gc`` would match ``Google Chrome``.
3. :const:`MATCH_ATOM`
Search key is split into "atoms" on non-word characters
(.,-,' etc.). Matches if ``query`` is one of these atoms
(case-insensitive).
9. :const:`MATCH_ALL` : Combination of all the above.
4. :const:`MATCH_INITIALS_STARTSWITH`
Initials are the first characters of the above-described
"atoms" (case-insensitive).
5. :const:`MATCH_INITIALS_CONTAIN`
``query`` is a substring of the above-described initials.
6. :const:`MATCH_INITIALS`
Combination of (4) and (5).
7. :const:`MATCH_SUBSTRING`
``query`` is a substring of item search key (case-insensitive).
8. :const:`MATCH_ALLCHARS`
All characters in ``query`` appear in item search key in
the same order (case-insensitive).
9. :const:`MATCH_ALL`
Combination of all the above.
:const:`MATCH_ALLCHARS` is considerably slower than the other
Expand Down Expand Up @@ -2432,7 +2436,11 @@ def update_available(self):
:returns: ``True`` if an update is available, else ``False``
"""
update_data = self.cached_data('__workflow_update_status', max_age=0)
# Create a new workflow object to ensure standard serialiser
# is used (update.py is called without the user's settings)
update_data = Workflow().cached_data('__workflow_update_status',
max_age=0)

self.logger.debug('update_data : {0}'.format(update_data))

if not update_data or not update_data.get('available'):
Expand Down

0 comments on commit e67efe0

Please sign in to comment.