No commit activity in last 3 years
No release in over 3 years
Support for pulling/pushing wiki content from source repository to elexis.wiki
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0
>= 0

Runtime

 Project Readme

Elexis::Wiki::Interface

A Ruby Gem to allow pulling and pushing between Elexis source code repositories and the mediawiki installation

Use it at your own risk, as it is just a small utility gem to help for some release engineering for the Elexis-RCP. See http://elexis.info.

But I have an open ear for suggestions for improvements, especially if they come with a patch including specs.

License: GPLv3 or later

Copyright: 2014 © by Niklaus Giger <niklaus.giger@member.fsf.org>

Installation

Ensure that you use Ruby 1.9.2 or higher. Mediawiki 1.19 does not work. Mediawiki 1.25.2 works. Don’t know how the versions between score.

Add this line to your application’s Gemfile:

$ gem 'elexis-wiki-interface'

And then execute:

$ bundle

Or install it yourself as:

$ gem install elexis-wiki-interface

Usage

using some built-in helpers (mainly for the jenkins-CI)

Each of the helper script below should work if you have a ruby installation >= 1.9.2 and executed gem install bundler && bundle install in directory where

wiki_pull
  wiki_pull_and_commit
  wiki_push

in a ruby script

require 'elexis/wiki/interface/workspace'
require 'pp'
workspace =  Elexis::Wiki::Interface::Workspace.new('.')
workspace.pull # get actual mediawiki content and place it under doc inside the plugin
workspace.info.show
pp workspace.views_missing_documentation            # returns an array of plugin-ids
pp workspace.perspectives_missing_documentation     # returns an array of plugin-ids
workspace.push # push doc/*.mediwiki files to the wiki

Or you can inspire you from the spec/*_spec.rb files to see tested examples.

Username/password to access your wiki

The username and password is fetched from a config.yml, which may be either

  • /etc/elexis-wiki-interface/config.yml
  • /config.yml

Here is an example:

---
  wiki: http://wiki.elexis.info/api.php
  password: topsecrect
  user: elexis

This user must have the privilege to access the wiki via the API interface.

Conventions

  • You must create a directory config with a file hosts.yml containing the mediawiki-gateway configuration (host, username, password)
  • Use tag File
    We decided to use only the tag file as https://www.mediawiki.org/wiki/Help:Images/de recommends, even when the legacy tag Image is still supported.
    Also we don’t use the tag Datei, as this one is not supported by the Mylin Wikitext extension of Eclipse.
  • The push/pull methods use the convention
    • in page names all ‘.’ are removed
    • a plugin plugin.name has a page plugin.name
    • a view view.name with a localized name localized_name has a page Views
    • a perspective perspective.name with a localized name localized_name has a page P_
    • an image file must be lowercase (files which differ only by the case will be deleted)
    • use syntax [[File:, not [[Datei: or [[Image:
    • png files should start with a name derived from their symbolic name, eg, molemax followed by ‘-’ by a name or a globally unique name
    • png files resides inside the ‘doc’ sub-directory of each plugin/feature

Limitations/TODO

Contributing

  1. Fork it ( http://github.com/ngiger/elexis-wiki-interface/fork )
  2. Create your feature branch (`git checkout -b my-new-feature`)
  3. Commit your changes (`git commit -am ‘Add some feature’`)
  4. Push to the branch (`git push origin my-new-feature`)
  5. Create new Pull Request