Convert testing/{awsy,condprofile,docs,geckodriver,marionette,
mozbase,mozharness,perfdocs,performance,raptor,talos,web-platform}
RST documentation files to MyST-flavored Markdown.
Skips testing/perfdocs/generated/* (auto-generated by mach perfdocs)
and testing/web-platform/tests/* (third-party test trees).
- Move treeherder-try frontmatter substitutions under the new myst
topmatter key.
- Allow the pre-existing autodoc Unknown target warning for
mozprofile.permissions to keep the build clean.
- Refresh allowed-warnings glob for manifest-sandbox download from
.rst to .md.
Differential Revision: https://phabricator.services.mozilla.com/D304228
2.9 KiB
{mod}mozprofile --- Create and modify Mozilla application profiles
Mozprofile is a python tool for creating and managing profiles for Mozilla's applications (Firefox, Thunderbird, etc.). In addition to creating profiles, mozprofile can install addons and set preferences. Mozprofile can be utilized from the command line or as an API.
The preferred way of setting up profile data (addons, permissions, preferences etc) is by passing them to the [profile] constructor.
Addons
.. automodule:: mozprofile.addons
:members:
Addons may be installed individually or from a manifest.
Example:
from mozprofile import FirefoxProfile
# create new profile to pass to mozmill/mozrunner
profile = FirefoxProfile(addons=["adblock.xpi"])
Command Line Interface
.. automodule:: mozprofile.cli
:members:
The profile to be operated on may be specified with the --profile
switch. If a profile is not specified, one will be created in a
temporary directory which will be echoed to the terminal:
(mozmill)> mozprofile
/tmp/tmp4q1iEU.mozrunner
(mozmill)> ls /tmp/tmp4q1iEU.mozrunner
user.js
To run mozprofile from the command line enter:
mozprofile --help for a list of options.
Permissions
.. automodule:: mozprofile.permissions
:members:
You can set permissions by creating a ServerLocations object that you pass
to the Profile constructor. Hosts can be added to it with
add_host(host, port). port can be 0.
Preferences
.. automodule:: mozprofile.prefs
:members:
Preferences can be set in several ways:
- using the API: You can make a dictionary with the preferences and pass it to
the
Profileconstructor. You can also add more preferences with theProfile.set_preferencesmethod. - using a JSON blob file:
mozprofile --preferences myprefs.json - using a
.inifile:mozprofile --preferences myprefs.ini - via the command line:
mozprofile --pref key:value --pref key:value [...]
When setting preferences from an .ini file or the --pref switch,
the value will be interpolated as an integer or a boolean
(true/false) if possible.
Profile
.. automodule:: mozprofile.profile
:members:
Resources
Other Mozilla programs offer additional and overlapping functionality for profiles. There is also substantive documentation on profiles and their management.
- profile documentation