"+p+"
" - write_file(base) + self.write_html_output() + self.handle_images() + self.update_blog_index() + self.update_rss() + self.update_sitemap() + print("Done!") -def generate_section(s) : - s_2 = s.replace(" ","-") - base = ''' -diff --git a/css/styles.css b/css/styles.css index c7c4e35..9714878 100644 --- a/css/styles.css +++ b/css/styles.css @@ -106,3 +106,33 @@ a { margin-left: auto; margin-right: auto; } + +pre { + background-color: #000000; + color: #cccccc; + border: 1px solid #686bff; + padding: 10px; + overflow: auto; + font-family: "Courier New", Courier, monospace; + font-size: 14px; + margin-bottom: 15px; +} + +pre code { + font-family: "Courier New", Courier, monospace; +} + +.highlighter-rouge { + background-color: #000000; + color: #cccccc; + font-family: "Courier New", Courier, monospace; + padding-left: 3px; + padding-right: 3px; + border: 1px solid #333333; +} + +.kwd { color: #ffff00; font-weight: bold; } /* Keywords: Yellow */ +.str { color: #00ff00; } /* Strings: Green */ +.com { color: #999999; font-style: italic; } /* Comments: Gray */ +.num { color: #ff00ff; } /* Numbers: Magenta */ +.typ { color: #00ffff; } /* Types/Classes: Cyan */ diff --git a/index.html b/index.html index bd6c663..d66ecaf 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,9 @@
Hey you, thanks for passing by, let me introduce myself. I'm a French C/C++/Python/ASM coder who is interested in reverse engineering, Eurobeat music and 90's looking websites.
-I don't know how you found this website but be free to check my blog where i post random stuff.
+I don't know how you found this website but be free to + check my blog + where i post random stuff. A rss feed is also available.
I run Arch Linux, Sway and Emacs: my dotfiles.
diff --git a/python_script/generate_article.py b/python_script/generate_article.py index ed20911..b31287c 100644 --- a/python_script/generate_article.py +++ b/python_script/generate_article.py @@ -1,181 +1,361 @@ -""" -~foldername~template~foldername~ -~titre~Test article~titre~ -~date~ Jan 25, 2022~date~ -~section~Test~section~ -~data~data~data~ -~link~[https://www.google.com]link to google~link~ -~list~Test~list~ -~endlist~ -~image~serverlist.png~image~ -""" -#TODO : -# - add code snippet - - import os -from os import listdir -from os.path import isfile, join import shutil -from tkinter import Tk -from tkinter.filedialog import askopenfilename +import datetime +import re +import argparse +import html +import sys -def write_file(text) : - with open("out.html", "a") as o : - o.write(text) +SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) +DOMAIN_URL = "https://patate.dev" -def generate_base(title) : - base = """ - -"+p+"
" - write_file(base) + self.write_html_output() + self.handle_images() + self.update_blog_index() + self.update_rss() + self.update_sitemap() + print("Done!") -def generate_section(s) : - s_2 = s.replace(" ","-") - base = ''' -