diff --git a/.gitignore b/.gitignore index c18dd8d..0e5b2ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ __pycache__/ +public/ diff --git a/public/index.html b/public/index.html deleted file mode 100644 index 1ed2aab..0000000 --- a/public/index.html +++ /dev/null @@ -1,20 +0,0 @@ - -
-- Look, front-end development is for script kiddies and soydevs who can't handle the real programming. I mean, - it's just a bunch of divs and spans, right? And css??? It's like, "Oh, I want this to be red, but not thaaaaat - red." What a joke. -
-- Real programmers code, not silly markup languages. They code on Arch Linux, not macOS, and certainly not - Windows. They use Vim, not VS Code. They use C, not HTML. Come to the - backend, where the real programming - happens. -
- - diff --git a/public/styles.css b/public/styles.css deleted file mode 100644 index 69b0e5b..0000000 --- a/public/styles.css +++ /dev/null @@ -1,23 +0,0 @@ -body { - font-family: Arial, sans-serif; - line-height: 1.6; - margin: 0; - padding: 0; - background-color: #1f1f23; -} -body { - max-width: 600px; - margin: 0 auto; - padding: 20px; -} -h1 { - color: #ffffff; - margin-bottom: 20px; -} -p { - color: #999999; - margin-bottom: 20px; -} -a { - color: #6568ff; -} diff --git a/src/main.py b/src/main.py index c344dc5..a46107a 100644 --- a/src/main.py +++ b/src/main.py @@ -1,10 +1,29 @@ from textnode import TextNode,TextType from conversions import markdown_to_html_node +import shutil +import os + +def empty_public(): + dir_path = os.path.abspath("./public/") + if os.path.exists(dir_path): + shutil.rmtree(dir_path, ignore_errors=True) + os.mkdir(dir_path,mode=0o755) + +def copy_directory_recursive(src, dest): + # Ensure source directory exists + if not os.path.exists(src): + raise FileNotFoundError(f"Source directory '{src}' not found.") + + # Remove destination directory if it exists + if os.path.exists(dest): + shutil.rmtree(dest) + + # Recursively copy source directory to destination + shutil.copytree(src, dest) + def main(): - test_input = "This is *italics* and **bold**" - result = markdown_to_html_node(test_input).to_html() - print(f"Expected:This is italics and bold