summaryrefslogtreecommitdiff
path: root/src/files.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/files.php')
-rw-r--r--src/files.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/files.php b/src/files.php
index 9e1a3f5..2d12280 100644
--- a/src/files.php
+++ b/src/files.php
@@ -7,6 +7,19 @@ function makeFile($path, $file_name, $data)
7{ 7{
8 file_put_contents($path. $file_name, $data); 8 file_put_contents($path. $file_name, $data);
9 chmod($path . $file_name, 0644); // droits en octal 9 chmod($path . $file_name, 0644); // droits en octal
10
11 //~ protected function createFile(string $latex, string $file_name, string $latexPath)
12 //~ {
13 //~ // nom du fichier créé = nom.tex
14 //~ // pour les devis, factures et enveloppes, le nom est le code la prestation
15 //~ // pour les livre de recettes et registres des achats mensuels:
16 //~ // le nom du fichier suit cet exemple: "Recettes-2022-06-Juin.tex"
17 //~ // pour le livre de recette ou le registre des achats annuel, même principe: "Achats-2022.tex"
18 //~ // pour le bilan comptable annuel, ça donne: "Bilan-2022.tex"
19 //~ $fichier = fopen($latexPath . $file_name, "w+");
20 //~ fputs($fichier, $latex);
21 //~ fclose($fichier);
22 //~ }
10} 23}
11 24
12function makeFolder(string $path) 25function makeFolder(string $path)
@@ -21,6 +34,7 @@ function makeFolder(string $path)
21// commande système pdflatex 34// commande système pdflatex
22function latexToPdf(string $latex_path, string $file_name, string $pdf_path) 35function latexToPdf(string $latex_path, string $file_name, string $pdf_path)
23{ 36{
37 // paramètre optionnel
24 $output_dir = ''; 38 $output_dir = '';
25 if($pdf_path !== '') 39 if($pdf_path !== '')
26 { 40 {