Compare commits

..

3 Commits

Author SHA1 Message Date
Florestan Bredow
3c9c948fe2 Supprime code inutil 2025-06-03 18:02:42 +02:00
Florestan Bredow
73760341d9 Nettoie le code (flake8) 2025-06-03 17:40:47 +02:00
Florestan Bredow
e4b6b80fdb Passe black pour unifier le code 2025-06-03 17:37:55 +02:00
4 changed files with 10 additions and 22 deletions

View File

@@ -56,12 +56,12 @@ class Blog:
html_file.write(html_content)
def _copy_css(self):
css_path = Path(self.conf.theme) / 'css'
dest_path = Path(self.conf.outbox) / 'css'
css_path = Path(self.conf.theme) / "css"
dest_path = Path(self.conf.outbox) / "css"
if not dest_path.exists():
dest_path.mkdir()
for css_file in css_path.glob('*.css'):
for css_file in css_path.glob("*.css"):
dest_file = dest_path / css_file.name
shutil.copy(css_file, dest_file)

View File

@@ -6,7 +6,7 @@ import textwrap
import markdown
import subprocess
from pathlib import Path
from datetime import date, datetime
from datetime import date
# from bs4 import BeautifulSoup as bs

View File

@@ -1,6 +0,0 @@
from pathlib import Path
def clean_output(path: Path):
# TODO
pass

View File

@@ -5,12 +5,11 @@ import argparse
from pathlib import Path
from blog.page import new_page
from blog.config import Config
from blog.utils import clean_output
from blog.blog import Blog
# from blog.blog import Blog
actions_list = ["new", "make", "clean"]
actions_list = ["new", "make"]
blog_dir = "./inbox/"
@@ -57,7 +56,6 @@ def main():
args = load_args()
if not Path(args["config"]).is_file():
# TODO gérer le cas où le fichier n'existe pas. Le créer ? Prendre les valeurs par défaut ?
print("Le fichier de configuration n'existe pas.")
os._exit(1)
@@ -79,10 +77,6 @@ def main():
os._exit(0)
case "clean":
clean_output(conf.inbox)
os._exit(0)
case _:
print("error")
os._exit(1)