Revision 479 tmp/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/Transana2TRS.groovy

Transana2TRS.groovy (revision 479)
21 21

  
22 22
package org.txm.macro.transcription
23 23

  
24
import javax.xml.stream.*
24
import org.kohsuke.args4j.*
25 25

  
26
import org.kohsuke.args4j.*
27
import org.txm.doc.*
28
import org.txm.importer.*
29
import org.txm.importer.filters.*
30
import org.txm.rcp.swt.widget.parameters.*
26
import groovy.transform.Field
27

  
28
import org.txm.rcpapplication.swt.widget.parameters.*
29
import org.txm.utils.xml.DomUtils;
31 30
import org.w3c.tidy.Tidy
31
import org.txm.doc.*;
32 32

  
33
import javax.xml.stream.*;
34

  
35
import java.util.HashMap;
36
import java.util.List;
37

  
38
import org.txm.importer.*;
39
import org.xml.sax.Attributes;
40
import org.txm.importer.filters.*;
41
import org.txm.macro.transcription.FixTransanaTimings;
42
import org.txm.macro.transcription.HTML2TRS;
43

  
44
import java.io.File;
45
import java.io.IOException;
46
import java.util.ArrayList;
47

  
48
import javax.xml.parsers.SAXParserFactory;
49
import javax.xml.parsers.ParserConfigurationException;
50
import javax.xml.parsers.SAXParser;
51

  
52
import java.net.URL;
53

  
54
import org.xml.sax.InputSource;
55
import org.xml.sax.helpers.DefaultHandler;
56

  
57
import java.text.DecimalFormat;
58
import java.text.ParseException;
59
import java.text.SimpleDateFormat;
60
import java.util.Date;
61

  
33 62
class Transana2TRS {
34 63
	boolean debug = false;
35 64
	boolean isDirectory = false;
......
106 135
		int delta = work / 5
107 136
		println "** Processing $docFile file"
108 137
		String filename = docFile.getName()
109
		int idx = filename.indexOf(".")
138
		int idx = filename.lastIndexOf(".")
110 139
		if (idx < 0) return false;
111 140
		String ext = filename.substring(idx)
112 141
		filename = filename.substring(0, idx)

Also available in: Unified diff