Project

wiki_lib

0.0
No commit activity in last 3 years
No release in over 3 years
A simple library to wrap around some common wiki operations Currently only PMWiki is supported, but more will be added as and when.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

~> 1.0
 Project Readme

wiki-lib¶ ↑

A simple library for easing interaction with wikis (currently just PMWiki) in ruby, in essence, a wrapper around the mechanize gem.

require 'rubygems'
require 'wiki_lib'

@pm_wiki = WikiLib::PMWiki.new('http://www.pmwiki.org/wiki', 'auser', 'apassword')

# get the page
@page = @pm_wiki.get_page('PmWiki/FAQ')

# get the current sandbox text
@sandbox = @pm_wiki.get_edit_text('Main/WikiSandbox')

# upload the reversed sandbox text back to the sandbox
@pm_wiki.upload_page('Main/WikiSandbox', @sandbox.reverse, "You're in backwards land, today".reverse)