Extensions:SVN Repository
From SensorDataLab
This is a Loc:Help page which explains the SVNRepository Extension Version 0.3 by User:Andreas Wombacher.
This is free software licensed under the GNU General Public License. Please see http://www.gnu.org/copyleft/gpl.html for further details, including the full text and terms of the license.
Contents |
Overview
SVNRepository is an extension to MediaWiki that changes the image file handling in the wiki. Instead of the standard behavior of retrieving the image files out of the local file system, this extension supports to retrieve the image files out of a SVN repository supporting to address each individual revision of each file.
Requirements
This version of the SVNRepository extension requires MediaWiki 1.11 or higher.
Download
The file is available The file is available
Installation
- Extract the archive to obtain the directory SvnRepository that contains all relevant files. Copy this directory (or extract/download it) to [wikipath]/extensions/.
- Create a directory svntmp at [wikipath] and make it writable for the user running the web server
- Configure the extension in the file [wikipath]/extensions/SvnRepository/includes/SvnRepository.php:
- adapt the url of the SVN repository: $svnrSvnUrl = 'http://www.sensordatalab.org/svn/myproject/trunk';
- adapt the project name used for this wiki; the addition of trunk is advised: $svnrSvnProject = 'myproject/trunk';
- adatpt the svn username and password granting read access to the svn: $svnrUsername = 'user'; $svnrPassword = 'password';
- Insert the following line into the file [wikipath]/LocalSettings.php: include_once('extensions/SvnRepository/includes/SvnRepository.php');
- Protection of images is possible by protecting the directory where the images are downloaded in the apache web server using web server specific protection mechanisms. Usage of an LDAP may enable to have passwords synchronized and a single point of user management.
- Setup of the wiki templates for visualizing the exif data
Template:Exif header {|border=1 !Exif property !value
Template:Exif footer
|}
Template:Exif_property |- | {{{name}}} | [[{{{property}}}::{{{value}}}]]
- Setup the semantic properties for Exif. These are determined by the exif information contained
in the used images. (ยป http://exif.org/Exif2-2.PDF, page 20).
Usage
The extension allows to use SVN content in the wiki. The details on how to do it are described in Extensions:How to add images from SVN to your wiki page 21-07-2008.
All images are supposed to be maintained and provided in the SVN. An image can then be addressed via its path and filename in the SVN and the revision number used in the SVN. The revision used for the specified file is encoded in the filename directly before the file extension, which is the last dot in the complete path.
As an example the floorplan available in the SVN at /pictures/vl3.jpg at the revision number 65 can be addressed with [[Image:pictures/vl3_REV_65.jpg|600px|floorplan]]
resulting in the following image:
To address the HEAD revision either use the word HEAD as revision or leave the revision out of the filename. For example the [[Image:pictures/vl3_REV_HEAD.jpg|600px|floorplan]] and [[Image:pictures/vl3.jpg|600px|floorplan]] are referring to the same entry in the SVN, i.e., the HEAD revision of the file.
pros
- The file is immediately available once it has been committed to the repository.
- The MediaWiki way of embedding images, image size and a description can be specified.
- The file is accessible in different revisions.
cons
- The file is available after the first time the [[Image:....]] has been called. Otherwise the file may not have been copied in the svntmp directory.
- The same file is accessible via the different revision numbers in case the file has not been changed in between. However, the corresponding links might be different. This may result in confusion with the linking, but does not result in any problems with displaying the files.
Contact
Comments, questions, suggestions and bug reports are welcome, and can be placed on the Talk page for the extension, or sent to Andreas at a.wombacher AT utwente dot nl.
