Monday, June 15, 2009

CD and DVD Label Design Software for Ubuntu Linux

I've recently needed to print out some circular CD labels. I purchased the blank labels from Tesco and they come branded as PressIt. After a bit of Googling I found this article titled Three applications for making disk labels. I settled for glabels which I installed in Ubuntu by opening a terminal and executing the following:

sudo aptitude install glabels

Thursday, June 11, 2009

Jslint rhino and custom global options

Jslint is a tool developed by Douglas Crockford which analyses javascript and reports problems with syntax and ensures code quality. Here are my instructions that will enable you to use jslint from the command line with rhino. The problem that I ran into was that I didn't want to have to add the /*jslint eqeqeq:true */ to each of the 400+ files in our pr0ject. By using the following technique it means default options can be supplied to jslint on a global basis.

Download these files
Concatenate them together and save as a new file fulljslintrhino.js

Download Rhino

Extract js.jar

Put fulljslintrhino.js and js.jar in the same directory.

Providing that your java installation has been added to the path it should now be possible to execute the following

java -jar js.jar fulljslintrhino.js YourFileToBeTested.js

To customise the options you need to edit the fulljslintrhino.js file and find the section that you pasted in from rhino.js. Edit the section that looks like this: -

if (!JSLINT(input, {bitwise: true, eqeqeq: true, immed: true,
newcap: true, nomen: true, onevar: true, plusplus: true,
regexp: true, rhino: true, undef: true, white: true})) {