Skip to content

Commit

Permalink
Semantic versioning, and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeboers committed May 8, 2013
1 parent fff0d43 commit c2e6a63
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.pyc
.DS_Store
._*
*.egg-info

# Makefile sentinels.
*.make-sentinel
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ This Python package is a wrapper around `ActionMenuItems` in [Shotgun](http://ww
![Icons and headings](https://raw.github.com/westernx/sgactions/master/docs/_static/icons-screenshot.png)

[Read the docs](http://sgactions.readthedocs.org/), and good luck!

This project uses [semantic versioning](http://semver.org/).
2 changes: 0 additions & 2 deletions TODO.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

- Stub for people without shotgun_api3_registry.

- Logging via `logging` instead of via stdout.

- sgactions rich ACL
Expand Down
33 changes: 32 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,28 @@ This Python package is a wrapper around ``ActionMenuItems`` in `Shotgun <http://
Installation
------------

Shotgun API Keys
^^^^^^^^^^^^^^^^

There are two ways to provide Shotgun API keys to the dispatcher: environment
variables or a ``shotgun_api3_registry.connect()`` function.

For the first, set ``SHOTGUN_SERVER``, ``SHOTGUN_SCRIPT_NAME``, and
``SHOTGUN_SCRIPT_KEY`` in your execution environment.

For the second, create a ``shotgun_api3_registry`` module with a ``connect``
function that returns a ``shotgun_api3.Shotgun`` instance.


Python
^^^^^^

The ``agaction`` package must be importable from the environment that your browser runs in. Check ``~/.xsession-errors`` on Linux or the Console.app on OS X if your commands seems to be vanishing into a black hole.


Protocol Handlers and Chrome Extensions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Shotgun action menu items allow for execution of your code in two ways: via a ``POST`` to another webserver under your control, or navigating to an arbitrary URI. We hook into the second method via protocol handers on OS X and Linux by responding to the ``sgaction`` protocol. We have unified both cases into a single script::

python -m sgactions.register
Expand Down Expand Up @@ -47,7 +69,16 @@ We can specify the rest of the standard ``ActionMenuItem`` fields in a similar w
list_order: 1
selection_required: true
Rich fields are added seperately to give you the oppourtunity to specify a different title for those browsers which will not render them richly. For example, one of the actions from the screenshot above are specified via::
A special title syntax will also be interpreted by the browser plugin in order to
create headings and icons. For example, one of the actions from the screenshot above are specified via::

- entrypoint: sgfs.commands.launch_maya:sgaction
title: "Toolbox / Launch Maya [application-osx-terminal]"
list_order: 11
entity_types: [Task]
selection_required: true

These rich fields may be added seperately to give you the oppourtunity to specify a different title for those browsers which will not render them richly. ::

- entrypoint: sgfs.commands.launch_maya:sgaction
title: "Toolbox: Launch Maya"
Expand Down
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='sgactions',
version='0.1-dev',
version='1.0.0',
description='Shotgun ActionMenuItem enrichment.',
url='http://github.com/westernx/sgactions',

Expand All @@ -12,6 +12,10 @@
author_email='[email protected]',
license='BSD-3',

install_requires='''
pyyaml
''',

classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
Expand Down

0 comments on commit c2e6a63

Please sign in to comment.