Posts about technology and arts.
Some time ago I was asked by my boss to get all the images out of a Word document and save them in a separated directory. In this site the author gives you several different ways of extracting images from a Word document. However what I wanted was a quick and dirt way of having these images extracted without macros or having to open and save the document in HTML format.
So I wrote this quick and dirt word images extractor. It has two versions, one where you need to pass the .doc file as parameter and another one that gives you an input dialog box to point out where is the file. You can get the VBScripts from http://github.com/kinow/word-images-extractor.
Behind the scenes, this VBScript uses Word to save your .doc as .html and then copies the saved images into the same directory as your word file. So yes, you do have to have Word installed. If somebody gets interested in improving it, he/she could find a way of extracting multiple files at once. In this version some files are overridden. He/she could add to the beginning of the image name the word file name. Or it could be required to pass the output directory together with the input word file.
That’s it, I hope it might be helpful to somebody as it was - and still is - to me. :-)
A month ago I started a project to help me in my new version of the TestLink Hudson plug-in. The plugin now relies heavily on Apache Maven for test execution. After reading a post on TestLink forum about an automation done using TAP, I googled to learn what that acronym stood for.
TAP is the abbreviation of Test Anything Protocol.It is a protocol to produce information about test execution and used mainly by the Perl community. For instance, you can test your system using PHPUnit, JUnit, Selenium or even a C class and produce what they call a TAP Stream. This stream’s content is like follows:
TAP version 13 1..2 ok 1 Test 1 ok 2
The text above tells us that we are using the version 13 of TAP. That we have 2 tests (1..’2’) and that both tests were executed without errors. TAP is a human readable text that can be interpreted by a software for audit, report or whatever. Another tool can then parse this TAP Stream and prepare Reports, update Database among other uses (this is what TestLink Hudson plug-in is going to do on its new version ;-).
tap4j is a simple Java implementation of the TAP protocol (sorry to repeat the protocol part of the acronym right after it, but sounds cool :-). The project is built with Java 1.5 and Maven and hosted on SourceForge. The artifacts are published on Maven Central Repository but the jar is also uploaded into SourceForge. Up to now the project has only two members. Apart from me, there is CÃ©sar Fernandes Almeida, a friend from university that is helping me with the ideas, tests and code. But we really need more help, specially from people that know Perl (Harness, Simple, etc) to help us make integration tests using TAP Streams generated by these tools.
The 1.0 version supports Header, Plan, Footer, Test Results, Comments and Bail Out expressions. All these supported elements can be retrieved through the API, even the comments list. Any invalid text is ignored but you can also retrieve this information using the API.
We are already working on a new version, 1.1. This version will support YAML diagnostics, letting you put a whole Exception stack trace on your TAP Stream. Nice uhn? Check how YAML looks like.
file: foo.t line: 45 description: an important test found: this wanted: that raw_test: is( "this", "that", "an important test" ); extensions: THAC0: 16
When I started working in the TestLink java api with Daniel Padilla, he mentioned in some of his mails a tool called Jacobe. After I googled for this tool I found it in TIOBE’s website. Jacobe is a tool of TIOBE that beautifies your Java code, according to some rules that you can specify in one configuration file.
This is what Jacobe does, basically.
Jacobe itself is an executable but TIOBE provides an Ant task that lets you call Jacobe from an Ant build file. But wait a minute! What about Maven? Yeah, exactly. Jacobe lacked of Maven support. I talked to the guys from TIOBE and they kindly let me implement a Maven Plugin for Jacobe.
The plugin source code is hosted at SourceForge.net, and you can find a quick Introduction about it in http://maven-jacobe.sourceforge.net/. The maven plugin version 1.0 artifact was released on Wednesday to Sonatype’s release repository and Sonatype already enabled Maven Central Repository synchronization. However it may take some time for them update the repository index.
With the help of Francisco Mancardi I wrote a code that was merged into the TestLink repository trunk. Now you’re going to be able to upload attachments such as, for instance, test evidences to your TestLink :-). I hope you like it.
I decided to contribute with this code because I needed something similar for the TestLink Hudson plug-in. Hopefully the plug-in new version will be released before October.