Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2011-01-18 16:52:16
- progo
- Member
- Registered: 2009-12-11
- Posts: 11
XML-RPC broken or am I missing something here?
Hello everyone.
I want to expand my blogging a bit and make it possible to blog from command line. The XML-RPC will help me there awesomely.
The only thing is, I can’t seem to get it to work. I first went with Python to poke around but when I couldn’t get anything to show, I installed BloGTK to see if it works at all.
It doesn’t work very well. I can get a connection with BloGTK to my site but any of the article listing options don’t work. I can get a list of my categories so that indicates that I’m able to get through. I also can’t post a new article. Blogtk gives the following error:
<type ‘exceptions.Exception’> <Fault -32602: ‘server error. invalid method parameters’>
I’m not very familiar with the XML-RPC way of communication. How should I proceed? I have this terrible feeling that the documentation is outdated.
E: can some of you name a desktop blogger utility that is known to work with current interfaces well? Preferably open source, so I can take a peek :)
E^2: I couldn’t get anything work, but finally when I went lower level, skipped the higher abstractioned blogger libraries, I did manage to get my message through. I don’t know, something must have changed but it’s not in the documents. The third party libraries probably have some hacks in them, I’ll attach a simple Python code for help if someone wants to play around.
import xmlrpclib
srvr = xmlrpclib.Server("http://your-textpattern-installation/rpc/")
username = ""
password = ""
section = ""
to_publish = True
post = {'title': 'title of your article',
'description': 'content of the post'}
srvr.metaWeblog.newPost(section, username, password, post, to_publish)
This is the bare minimum. The post
structure can take a lot of modifiers, this site has some coverage on the subject.
Last edited by progo (2011-01-19 15:32:00)
Offline