Loading...
 
Development

Development


Python client for editing wiki pages

posts: 2 Germany

Hi TW Community,

like the Mail-In function I think about a python client for offline work on wiki pages.

What is the best way to communicate with TW to GET and PUT pages to and from my notebook?

Is there an API like the XML-API for the blogs? How can I use the send-object / receive object XMLRPC functions?

Which way goes w.Bloggar?

(Sorry for my bad english redface)

Andreas

posts: 2881 United Kingdom

Cool stuff :-)

Im working on a PHP-GTK offline editor/image uploader for TikiWiki. Im planning on using the Communications feature of TikiWiki with options to connect directly to the database if you have permission.

XMLRPC.php contains all the current exposed routines.

Damian


posts: 2 Germany

Hi Damian,

I won't connect directly to the database. That's a way to make entries in the database without controll about the permission for a wikipage.

The client should do the following:

  • login at the client (with the same login as for TW)
  • request a wiki page over XMLRPC (or SOAP???)
  • TW looks at the permissions for the requested page, if ok, TW sends the wiki page to the client.
  • the client stores this page local in a file or maybe in a database table (sqllite???)
  • then I can edit the page local on my notebook
  • after editing I can put the page back to TW
  • TW is sending a warning back to the client, if there was another revision of this page created while I was editing this page localy (conflict management)
  • now I decide what is to do:
    • stop sending my local changed page, get the page again and solve the conflict
    • send the page to TW and solove the conflict in TW
  • conflict handling is another, important point of discussion!


My opinion is, that we should create a good working API based on XMLRPC / SOAP to use the TW functions that already exist in TW.

The use of w.Bloggar is a good way.

Andreas

posts: 2881 United Kingdom

Sounds like what you want is already implemented within TikiWiki.

Setup a Local TikiWiki on your notebook. Then enable the communications feature on both the notebook and the server installations.

If you expand the :: Wiki menu you'll see options for sending and received pages.

This is basically what your trying to implement in a python client.

Damian