Skip to content

Commit 6b5d906

Browse files
committed
Add support for missing AppleScript API calls
1 parent 3297f8c commit 6b5d906

File tree

13 files changed

+642
-125
lines changed

13 files changed

+642
-125
lines changed

.github/workflows/run-tests.yml renamed to .github/workflows/continuous-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "build"
1+
name: "CI"
22

33
on:
44
push:

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ install:
2121
- pip install -r requirements-ci.txt
2222

2323
script:
24+
- ./run-tests.sh -l
2425
- ./run-tests.sh
2526

2627
after_success:
Binary file not shown.

docs/Alfred-Workflow.docset.zip

1.45 KB
Binary file not shown.

docs/api/notify.rst.inc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,3 @@ icon and then calls the application to post notifications.
2626
2727
.. autofunction:: notify
2828
29-
30-
Helper functions
31-
^^^^^^^^^^^^^^^^
32-
33-
These internal helper functions may also be useful in your workflow.
34-
35-
.. autofunction:: convert_image
36-
37-
.. autofunction:: png_to_icns
38-
39-
.. autofunction:: validate_sound

docs/api/util.rst.inc

Lines changed: 64 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
.. _api-util:
33

4-
Utilities & helpers
5-
-------------------
4+
Utility & helper functions
5+
--------------------------
66

77

88
.. currentmodule:: workflow.util
@@ -11,9 +11,10 @@ A collection of functions and classes for common workflow-related tasks, such
1111
as running AppleScript or JXA code, or calling an External Trigger.
1212

1313

14-
.. autofunction:: utf8ify
14+
Scripting
15+
^^^^^^^^^
1516

16-
.. autofunction:: applescriptify
17+
Functions to simplify running scripts, programs and applications.
1718

1819
.. autofunction:: run_command
1920

@@ -28,23 +29,67 @@ as running AppleScript or JXA code, or calling an External Trigger.
2829
.. autofunction:: appinfo
2930

3031

31-
Configuration
32-
^^^^^^^^^^^^^
32+
Text
33+
^^^^
34+
35+
Text encoding and formatting.
36+
37+
.. autofunction:: unicodify
38+
39+
.. autofunction:: utf8ify
40+
41+
.. autofunction:: applescriptify
3342

34-
Functions for manipulating the values of workflow variables in the
35-
`workflow configuration sheet`_/``info.plist``.
43+
44+
Alfred's API
45+
^^^^^^^^^^^^
46+
47+
Alfred-Workflow provides functions that enable you to call Alfred's AppleScript API directly from Python.
48+
49+
50+
Workflow stuff
51+
""""""""""""""
52+
53+
Manipulate the values of workflow variables in the `workflow configuration sheet`_/``info.plist``.
3654

3755
.. autofunction:: set_config
3856

3957
.. autofunction:: unset_config
4058

59+
Tell Alfred to reload a workflow from disk if it has changed. Normally, Alfred will notice when a workflow changes, but it won't if the workflow's directory is a symlink.
60+
61+
.. autofunction:: reload_workflow
62+
63+
64+
Alfred stuff
65+
""""""""""""
4166

42-
Other helpers
67+
You can open Alfred in normal or file navigation mode:
68+
69+
.. autofunction:: search_in_alfred
70+
71+
.. autofunction:: browse_in_alfred
72+
73+
Or tell Alfred to action one or more files/directories:
74+
75+
.. autofunction:: action_in_alfred
76+
77+
Finally, you can tell Alfred to use a specific theme:
78+
79+
.. autofunction:: set_theme
80+
81+
82+
Miscellaneous
4383
^^^^^^^^^^^^^
4484

4585
These utility classes and functions are used internally by Alfred-Workflow,
4686
but may also be useful in your workflow.
4787

88+
89+
Writing files
90+
"""""""""""""
91+
92+
4893
.. autoclass:: LockFile
4994
:members:
5095
@@ -54,6 +99,16 @@ but may also be useful in your workflow.
5499
.. autofunction:: atomic_writer
55100
56101
102+
Images & sounds
103+
"""""""""""""""
104+
105+
.. autofunction:: workflow.notify.convert_image
106+
107+
.. autofunction:: workflow.notify.png_to_icns
108+
109+
.. autofunction:: workflow.notify.validate_sound
110+
111+
57112
.. _api-util-exceptions:
58113

59114

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@
153153
'logo_name': True,
154154
'logo_text_align': 'center',
155155
'description': "A helper library for creating workflows for Alfred 2+.",
156-
# 'font_family': "Georgia, 'goudy old style', 'minion pro', 'bell mt', 'Hiragino Mincho Pro', serif",
156+
# 'font_family': ("Georgia, 'goudy old style', 'minion pro',"
157+
# "'bell mt', 'Hiragino Mincho Pro', serif"),
157158
}
158159

159160
# The name for this set of Sphinx documents. If None, it defaults to

0 commit comments

Comments
 (0)