This commit is contained in:
2022-05-24 17:28:29 +02:00
parent c0b06ea837
commit 79791b395c
16 changed files with 1084 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,53 @@
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Conversion {
public static void main(String[] args) {
try (BufferedReader br = new BufferedReader(new FileReader(args[0]))) {
String fullContent = "";
String htmlContent = "";
{
int i = 0;
boolean canRead = true;
while (canRead) {
String content = br.readLine();
if (content != null) {
if (i == 0) {
fullContent += content;
} else {
fullContent += "<br>" + content;
}
i++;
} else canRead = false;
}
}
System.out.println(fullContent);
br.close();
try (BufferedReader br2 = new BufferedReader(new FileReader("base.html"))) {
htmlContent = br2.readLine();
br2.close();
} catch (Exception e) {
}
htmlContent = htmlContent.replaceAll("TOREPLACE", fullContent);
System.out.println(htmlContent);
try (BufferedWriter bw = new BufferedWriter(new FileWriter(args[0] + ".html"))) {
bw.write(htmlContent);
bw.close();
} catch (IOException e) {
}
} catch (IOException e) {
}
}
}

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html lang="fr"><head><meta charset="utf-8"><title>OwO</title></head><body><p>TOREPLACE</p></body></html>

View File

@@ -0,0 +1,9 @@
jiGJIOPAEJIOGOJIEAGJIOAEIO
ZFIAJPIFPJIAZJPF
AQG
AQGAZ
GAZ
GAZAZ
GAZAZ
GAZ

View File

@@ -0,0 +1 @@
<!DOCTYPE html><html lang="fr"><head><meta charset="utf-8"><title>OwO</title></head><body><p>jiGJIOPAEJIOGOJIEAGJIOAEIO<br>ZFIAJPIFPJIAZJPF<br><br>AQG<br>AQGAZ<br>GAZ<br>GAZAZ<br>GAZAZ<br>GAZ</p></body></html>