Skip to content

Commit

Permalink
Add support for missing AppleScript API calls
Browse files Browse the repository at this point in the history
  • Loading branch information
deanishe committed May 22, 2020
1 parent 3297f8c commit 6b5d906
Show file tree
Hide file tree
Showing 13 changed files with 642 additions and 125 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "build"
name: "CI"

on:
push:
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ install:
- pip install -r requirements-ci.txt

script:
- ./run-tests.sh -l
- ./run-tests.sh

after_success:
Expand Down
Binary file not shown.
Binary file modified docs/Alfred-Workflow.docset.zip
Binary file not shown.
11 changes: 0 additions & 11 deletions docs/api/notify.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,3 @@ icon and then calls the application to post notifications.
.. autofunction:: notify
Helper functions
^^^^^^^^^^^^^^^^
These internal helper functions may also be useful in your workflow.
.. autofunction:: convert_image
.. autofunction:: png_to_icns
.. autofunction:: validate_sound
73 changes: 64 additions & 9 deletions docs/api/util.rst.inc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

.. _api-util:

Utilities & helpers
-------------------
Utility & helper functions
--------------------------


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


.. autofunction:: utf8ify
Scripting
^^^^^^^^^

.. autofunction:: applescriptify
Functions to simplify running scripts, programs and applications.

.. autofunction:: run_command

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


Configuration
^^^^^^^^^^^^^
Text
^^^^

Text encoding and formatting.

.. autofunction:: unicodify

.. autofunction:: utf8ify

.. autofunction:: applescriptify

Functions for manipulating the values of workflow variables in the
`workflow configuration sheet`_/``info.plist``.

Alfred's API
^^^^^^^^^^^^
Alfred-Workflow provides functions that enable you to call Alfred's AppleScript API directly from Python.


Workflow stuff
""""""""""""""

Manipulate the values of workflow variables in the `workflow configuration sheet`_/``info.plist``.

.. autofunction:: set_config

.. autofunction:: unset_config

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.

.. autofunction:: reload_workflow


Alfred stuff
""""""""""""

Other helpers
You can open Alfred in normal or file navigation mode:

.. autofunction:: search_in_alfred

.. autofunction:: browse_in_alfred

Or tell Alfred to action one or more files/directories:

.. autofunction:: action_in_alfred

Finally, you can tell Alfred to use a specific theme:

.. autofunction:: set_theme


Miscellaneous
^^^^^^^^^^^^^

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


Writing files
"""""""""""""
.. autoclass:: LockFile
:members:
Expand All @@ -54,6 +99,16 @@ but may also be useful in your workflow.
.. autofunction:: atomic_writer
Images & sounds
"""""""""""""""

.. autofunction:: workflow.notify.convert_image

.. autofunction:: workflow.notify.png_to_icns

.. autofunction:: workflow.notify.validate_sound


.. _api-util-exceptions:


Expand Down
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@
'logo_name': True,
'logo_text_align': 'center',
'description': "A helper library for creating workflows for Alfred 2+.",
# 'font_family': "Georgia, 'goudy old style', 'minion pro', 'bell mt', 'Hiragino Mincho Pro', serif",
# 'font_family': ("Georgia, 'goudy old style', 'minion pro',"
# "'bell mt', 'Hiragino Mincho Pro', serif"),
}

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

0 comments on commit 6b5d906

Please sign in to comment.