Context Navigation

Screenshots Plugin

Description

Provides screenshots upload and viewing subsystem for Trac. Uploaded screenshots can be described with short name, longer description and custom tags (if TracTags plugin is installed) and assigned to any number of components and versions registered in Trac. Screenshot uploads can be listed in timeline and screenshots can be referenced or embender in wiki pages. Plugin internally defines few interfaces for further extension.

Value of mainnav_title variable sets caption of item in Trac's main navigation menu and metanav_title sets caption of meta navigation menu item. Appropriate item will be hidden if its title is empty. path is location of directory where plugin should store uploaded and generated images and ext is list of allowed file extension which can be uploaded. Using formats option you can set in wich formats can be images downloaded and default_format is format which will be returned if no format is specified in request. It must be one of formats supported by your PIL library installation. There are two meta formats: raw denotes original format of uploaded image and html is image embended in HTML page. default_components and default_versions options sets default values for component and version filter. Set these variables according your Trac setup, otherwise, you would't see any screenshots with default filter.

If you run Trac in environment which needs to enable plugins explicitly put in trac.ini these lines:

Create directory you have specified with path config option and make sure it is accessible by Trac server. The next step is to upgrade your environment:

# trac-admin <path_to_environment> upgrade

Permissions

Screenshots plugin defines three permissions. With SCREENSHOTS_VIEW permission you can browse screenshots and see screenshot uploads in timeline. SCREENSHOTS_ADMIN adds you rights to uplad screenshots and SCREENSHOTS_FILTER allows you to modify component and version filter. You can add these permissions by typing following commands from commandline or you can use WebAdminPlugin to do it for you:

Macros

There is a macro [screenshot:<screenshot_id>] for screenshots referencing.

For screenshot embending in wiki page use [[Screenshot(<screenshot_id>, [<attribute>=<value>, ...])]]. First mandatory argument is ID of the screenshot. Number or image attributes
can be specified next. This is a list of them: