blob: ecd86c162f92369559b1a0b81be97c61a064be7c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package scruf.conversion;
import java.io.*;
import java.util.regex.*;
import scruf.status.*;
public class CreateHtmlFile {
private Pattern pattern = Pattern.compile("(.+?\\.)scruffy");
private Matcher matcher;
public File create() {
File htmlFile=null;
matcher = pattern.matcher(PresentFile.file.getName());
if(matcher.find()) {
htmlFile = new File(PresentFile.file.getParentFile(),
matcher.group(1)+"html");
}else {
System.err.println("ERROR: something wrong with scruf: unable to create html file"+
" for "+PresentFile.file.getName());
}
return htmlFile;
}
}
|