This commit is contained in:
Simoes Lukas
2025-03-31 17:29:54 +02:00
parent fe693705bf
commit 2f94e24111
16 changed files with 952 additions and 3 deletions

Binary file not shown.

View File

@@ -0,0 +1,58 @@
import java.awt.*;
import java.io.*;
public class Main {
public static void main(String[] args) {
String chaine = "";
// Lecture
try {
BufferedReader lecture = new BufferedReader(new FileReader(args[0]));
try {
String texte = lecture.readLine();
while (texte != null) {
chaine += texte;
chaine += "\n";
texte = lecture.readLine();
}
} catch (IOException e2) {
System.err.println("Erreur de lecture.");
}
try {
lecture.close();
} catch(IOException e3) {
System.err.println("Erreur de fermeture.");
}
} catch(IOException e) {
System.err.println("Erreur d'ouverture");
}
//Ecriture
try {
BufferedWriter ecriture = new BufferedWriter(new FileWriter(args[0].split("[.]")[0] + ".html"));
String html = "<!DOCTYPE html>\n <html>\n <body><p>";
String finHtml = "</p>\n </body>\n </html>";
try {
ecriture.write(html);
ecriture.write(chaine);
ecriture.write(finHtml);
} catch (IOException e2) {
}
try {
ecriture.close();
} catch (IOException e3) {
}
} catch (IOException e) {
}
}
}

View File

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<body><p>Mathias
Le
Goat
De
L'IUT
De
Fontainebleau
Je
Lui
Lèche
Les
Pieds
</p>
</body>
</html>

View File

@@ -0,0 +1,12 @@
Mathias
Le
Goat
De
L'IUT
De
Fontainebleau
Je
Lui
Lèche
Les
Pieds