[c09aa8]: / templates / booleanizedtemplates / scripts / TemplateMaker.java

Download this file

23 lines (21 with data), 517 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
import java.util.*;
import java.io.*;
public class TemplateMaker {
public static void main(String[] args) throws FileNotFoundException{
Scanner in = new Scanner(new File("booltemps"));
String s;
PrintWriter out = new PrintWriter(new File("tmp.txt"));
while (in.hasNextLine()) {
s = in.nextLine();
if (s.equals("SEPARATOR123")) {
s = in.nextLine();
out.close();
out = new PrintWriter(new File("../" + s + ".txt"));
} else {
out.println(s);
}
}
out.close();
in.close();
}
}