archive_me1Add my vote for this tag create new tag
, view all tags
My idea is developing an AddOn API to make it easy to create, change and delete TWiki pages from programs. That would make it possible to write TWiki extensions like automatic mailing list archivers, intelligent TWiki-aware bots (think Jabber or IRC), etc.

The current implementation is object-oriented, although is based in the DolphinToTWikiAddOn. The file TWiki/Node.pm contains the class Node, which represents a topic in a given TWiki web. The class text can be read and written, and one can get locks for it.

It seems that using OO follows the current TWikiOO trend, and will make life easier for both developers and AddonAPI maintainers. The bad side is that some functionality in modules Twiki and TWiki::Store had to be cloned, because their use of global variables, which are not very clean for object orientation (think more than one node object instantiated at a time).

-- EstebanManchado - 23 Sep 2002


The general idea is having a Perl class to manage single TWiki nodes. One would normally create an object of the class TWiki::Node, retrieve its text and/or modify it. To modify the text a lock on the node is needed.

The class interface is very simple. It has the following methods:

The class constructor. It accepts as parameters the Web, the Node name (topic) and, optionally, the user to connect as and the TWiki root directory.
Returns the node text.
Returns the lock user if locked, and "" if not.
Stores the given text in the Node object.
Gets a lock.
Releases the lock.
Saves the current topic status to disk.


Updated progress fields with values from old manual "Nice to Have" table. Don't know how accurate they are.

-- SamHasler - 08 Sep 2004

The first pass over such an API will be there in DakarRelease, when the core functions are more generally documented and published. Add-on authors can use these functions on a caveat emptor basis.

-- CrawfordCurrie - 15 Feb 2005

Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivezip TWiki-Node-0.0.1.zip r1 manage 2.2 K 2002-09-25 - 09:39 EstebanManchado Initial TWiki::Node class implementation
Compressed Zip archivezip TWiki-Node-0.0.2.zip r1 manage 2.7 K 2002-09-26 - 11:44 EstebanManchado TWiki::Node class implementation
Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r12 - 2008-08-14 - RafaelAlvarez
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.