Skip to content

Commit

Permalink
Merge pull request #1836 from AfiMaameDufie/main
Browse files Browse the repository at this point in the history
Fix  #1771 Add documentation for document type extension field
  • Loading branch information
freakboy3742 committed May 22, 2024
2 parents 7552b9e + 05485f6 commit da7241b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
1 change: 1 addition & 0 deletions changes/1771.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added documentation for document type id, corrected placement of extension under the Document Types section and fixed typos.
27 changes: 16 additions & 11 deletions docs/reference/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -468,17 +468,17 @@ starting from least to most specific, with the most specific taking priority.

Briefcase maintains a set of cross-platform permissions:

* ``permission.camera`` - permission to access to the camera to take photos or video.
* ``permission.camera`` - permission to access the camera to take photos or video.
* ``permission.microphone`` - permission to access the microphone.
* ``permission.coarse_location`` - permission to determine a rough GPS location.
* ``permission.fine_location`` - permission to determine a precise GPS location.
* ``permission.background_location`` - permission to track GPS location while in the background.
* ``permission.photo_library`` - permission to access to the user's photo library.
* ``permission.photo_library`` - permission to access the user's photo library.

If a cross-platform permission is used, it will be mapped to platform-specific values in
whatever files are used to define permissions on that platform.

Permissions can also be configured by adding platform-specific configuration items. See the documentation for the the platform backends to see the options that are available.
Permissions can also be configured by adding platform-specific configuration items. See the documentation for the platform backends to see the available options.

The value for each permission is a short description of why that permission is required.
If the platform requires, the value may be displayed to the user as part of an
Expand All @@ -496,15 +496,14 @@ handlers for specific document types by adding a ``document_type``
configuration section for each document type the application can support. This
section follows the format:

``[tool.briefcase.app.<app name>.document_type.<extension>]``
``[tool.briefcase.app.<app name>.document_type.<document type id>]``

or, for a platform specific definition:
or, for a platform-specific definition:

``[tool.briefcase.app.<app name>.<platform>.document_type.<extension>]``
``[tool.briefcase.app.<app name>.<platform>.document_type.<document type id>]``

The ``document type id`` is an identifier, in alphanumeric format. It is appended to the app id of an application to identify documents of the same type.

where ``extension`` is the file extension to register. For example, ``myapp``
could register as a handler for PNG image files by defining the configuration
section ``[tool.briefcase.app.myapp.document_type.png]``.

The document type declaration requires the following settings:

Expand All @@ -513,13 +512,19 @@ The document type declaration requires the following settings:

A short, one-line description of the document format.

``extension``
---------------

The ``extension`` is the file extension to register. For example, ``myapp``
could register as a handler for PNG image files by defining the configuration
section ``[tool.briefcase.app.myapp.document_type.png]``.

``icon``
--------

A path, relative to the directory where the ``pyproject.toml`` file is located,
to an image for an icon to register for use with documents of this type. The
path should *exclude* the extension; Briefcase will append a platform
appropriate extension when configuring the application. For example, an icon
path should *exclude* the extension; Briefcase will append a platform-appropriate extension when configuring the application. For example, an icon
specification of::

icon = "resources/icon"
Expand Down

0 comments on commit da7241b

Please sign in to comment.