Statistics
| Revision:

root / tmp / org.txm.core / src / groovy / org / txm / macro / xml / XMLStatisticsMacro.groovy @ 187

History | View | Annotate | Download (1.2 kB)

1
package org.txm.macro.xml
2

    
3
import org.txm.scripts.*
4
import org.kohsuke.args4j.*
5
import groovy.transform.Field
6
import org.txm.rcpapplication.swt.widget.parameters.*
7

    
8
@Field @Option(name="inputDirectory", usage="Dossier qui contient les fichiers à parser", widget="Folder", required=true, def="src")
9
File inputDirectory;
10

    
11
@Field @Option(name="tsvFile", usage="FichierTSV résultat", widget="File", required=true, def="file.tsv")
12
File tsvFile;
13

    
14
@Field @Option(name="usePaths", usage="FichierTSV résultat", widget="Boolean", required=true, def="false")
15
def usePaths = true
16
@Field @Option(name="useAttributes", usage="FichierTSV résultat", widget="Boolean", required=true, def="false")
17
def useAttributes = true
18
@Field @Option(name="useAttributeValues", usage="FichierTSV résultat", widget="Boolean", required=true, def="false")
19
def useAttributeValues = true
20

    
21
if (!ParametersDialog.open(this)) return;
22
println "Input directory: "+inputDirectory
23
println "TSV file: "+tsvFile
24
println "use paths $usePaths"
25
println "use attributes $useAttributes"
26
println "use attributes values $useAttributeValues"
27

    
28
XMLStatistics.processDirectory(inputDirectory, tsvFile, ".xml", usePaths, useAttributes, useAttributeValues);