Revision 1000 tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/prototypes/InjectMetadataCSV.groovy

InjectMetadataCSV.groovy (revision 1000)
1
package org.txm.test;
1
package org.txm.scripts.test;
2 2
import org.txm.metadatas.*;
3 3

  
4 4
def txmfilesdir = new File("C:\\Documents and Settings\\alavrent\\xml\\metadata")
5 5
def outdir = new File("C:\\Documents and Settings\\alavrent\\xml\\metadata\\meta")
6 6
outdir.mkdir()
7
def allmetadatasfile = Metadatas.findMetadataFile(new File("C:\\Documents and Settings\\alavrent\\xml\\metadata"));
8
println "-- INJECT METADATA - from csv file: "+allmetadatasfile+" in directory: "+txmfilesdir
9
def metadatas = new Metadatas(allmetadatasfile, "UTF-8", ",","\"", 1)
7
def allMetadataFile = Metadatas.findMetadataFile(new File("C:\\Documents and Settings\\alavrent\\xml\\metadata"));
8
println "-- INJECT METADATA - from csv file: "+allMetadataFile+" in directory: "+txmfilesdir
9
def metadatas = new Metadatas(allMetadataFile, "UTF-8", ",","\"", 1)
10 10
if(metadatas != null)
11 11
{
12 12
	println("Injecting metadata: "+metadatas.getHeadersList()+" in texts of directory "+txmfilesdir)

Also available in: Unified diff