From 8a52c6174daebab0068a4692fd7aee4f3c0ef452 Mon Sep 17 00:00:00 2001
From: Bryan Tong Minh <bryan.tongminh@gmail.com>
Date: Fri, 23 Jan 2009 21:32:18 +0000
Subject: [PATCH] Add action=parse. Modified patch by Brian Mingus

---
 mwclient/client.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/mwclient/client.py b/mwclient/client.py
index 21fe95f..84fa24c 100644
--- a/mwclient/client.py
+++ b/mwclient/client.py
@@ -394,6 +394,12 @@ class Site(object):
 				return
 			file.seek(0, 0)
 			
+	def parse(self, text, title = None):
+		kwargs = {'text': text}
+		if title is not None: kwargs['title'] = title
+		result = self.api('parse', **kwargs)
+		return result['parse']
+			
 	# Lists
 	def allpages(self, start = None, prefix = None, namespace = '0', filterredir = 'all',
 			minsize = None, maxsize = None, prtype = None, prlevel = None,
-- 
GitLab