Automatic import, group and export with command-line (CLI) Hi there for a while now we are building stuff on sketchup (cause we love the simplicity of the tool :o ) 

But we still use blender for exportation purpose on THREE.js

So the actual workflow is to export in .dae with SketchUp8 and then import in blender, group all the elements with ctrl+J (it avoids material duplication)

Sometimes we also have to slightly rename the materials (cause they are renamed MATERIAL_NAME.001, MATERIAL_NAME.002 and we don't want this)

Then we export the object as is in .js format with the THREE.js exporter plugin.

As you can see it's a pretty tedious task. Is there an easy way to automate this through the CLI ?

Thanks
You could prepare a Blender file with a text block that contains the python script with all the command you need (import, convert materials name, export...).
Then you can type:

your/blender/path/blender -b blendertemplate.blend --python-text pythontextname