开发者

Is there a way to post content to a Drupal site using Perl or Java?

I'm setting up a Drupal 7 website. Currently, the website is running inside a VM over which I have complete control (a Bitnami appliance based on Ubuntu to be precise).

Some content will be added the usual way by approved users,开发者_开发问答 that's fine. Some content that will need to be added on a regular basis could actually be sent just fine by a Perl/Java/Groovy program. It involves getting a file from some other place, formatting the content, posting to a well-defined location (a specific "book" for example) inside the website.

I spent the evening searching for something that could give me a lead, but I found nothing really convincing. I did find the Blog API module that is almost what I was looking for, but not quite. One on the comments talks about using the "Service" module which should allow adding a node using XML-RPC.

Is that all there is out there for such (simple?) task? Anyone aware of some Perl module or Java library to ease this process? Should I just roll my sleeves and start writing a Groovy script for that?

Any ideas are welcome!


This sounds like a rather easy task for a WWW::Mechanize script in Perl.


An option if you'd like to use Groovy is Selenium I've used this from Groovy to write basic web UI tests and it works well. It could also be used to fill in forms on a Drupal site. One nice feature it has that I haven't been able to find with WWW::Mechanize is the ability to record actions in Firefox to use as a base for creating tests. For more info on this see the Selenium IDE page. One thing to be aware of is the current GA version of Selenium needs to drive an actual browser so it won't work on a server with out a GUI. The Selenium 2.0 beta can use HTML Unit as a browser which works around this limitation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜