Python

Drupal bulkpub sample Python script

I have created a sample of a Python script to use some of the APIs provided by the Drupal 7 bulkpub module.
The script uploads and then deletes an Article, an image file, and some vocabulary terms.
You can find a zip file containing the script on the Downloads page.
A copy of the script can also be found in the scripts directory of the bulkpub project.
Here is a link to the sandbox http://drupal.org/sandbox/rjohnson42/1278058.

Downloads (free resources)

This page contains the following kinds of free resources:

  • Scripting code written in Python or PHP
  • Information and training material about DITA/XML and the DITA Open Toolkit
  • DITA sample projects and source files

Code

Notes:

Does "XML transform" = "XSLT"? (Try Python instead!)

I see many job postings that ask for a person with skills writing XML transforms. The posts almost always end up assuming that such a person needs to be an XSLT expert. This need not always be the case! While it it is true that XSLT can be used to transform XML, there are reasons why you might want to consider doing XML transform using another programming language. My favorite language for transforms is Python.

Here is why I often choose to script in Python or PHP instead of using XSLT:

Automated WSDL documentation for CMIS

I have used my wsdl2dita Python script to generate DITA source files from the WSDL file describing CMIS (Content Management Interoperability Standard), which is sponsored by OASIS (Organization for the Advancement of Structured Information Standards), the same organization that sponsors the DITA standard.

Using the DITA Open Toolkit I generated a PDF file, which is posted on this site's download page. For those curious, you can browse through this PDF (also available on the Downloads page) to get an overview of the web services and operations that make up the CMIS standard.

Subscribe to RSS - Python