diff options
Diffstat (limited to 'pyblog')
-rwxr-xr-x | pyblog | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -37,8 +37,6 @@ import dateutil.parser import dateutil.tz import lxml.etree as ET -from pyfiglet import Figlet - ############################# BLOG CONFIGURATIONS ############################## # Safe to customize BLOG_HOME = "http://neodarz.net/" @@ -643,7 +641,8 @@ def rewrite_title(): lines = indexmd.readlines() with open(filename, 'w', encoding='utf-8') as indexmd: for line in lines: - indexmd.write(re.sub(r'\<pre class="header"\>\<code\>(.+?)\<\/code\>\<\/pre\>', '<pre class="header"><code>'+f.renderText('Miou')+'(^._.^)ノ</code></pre>', line)) + #indexmd.write(re.sub(r'\<pre class="header"\>\<code\>(.+?)\<\/code\>\<\/pre\>', '<pre class="header"><code>'+f.renderText('Miou')+'(^._.^)ノ</code></pre>', line)) + indexmd.write(re.suv(r'\<code class="sourceCode diff"\>', '\<code class="sourceCode diff" id="AsourceCode"\>', line)) except Exception: sys.stderr.write("=== /!\ ERROR /!\ ===\n") @@ -651,7 +650,6 @@ def rewrite_title(): sys.stderr.write("sudo cp source/fonts/3d.flf /usr/lib/python3.6/site-packages/pyfiglet/fonts\n\n") sys.exit(0) - def absolutify_links(soup, baseurl): """Make links in an article absolute. @@ -1031,7 +1029,7 @@ def generate_blog(fresh=False, report_total_errors=True): continue extension = name.split(".")[-1] - if extension not in ["css", "html", "jpg", "md", "png", "svg", "ico", "txt", + if extension not in ["css", "js", "asc", "html", "jpg", "md", "png", "svg", "ico", "txt", "eot", "ttf", "woff", "woff2"]: continue @@ -1048,7 +1046,7 @@ def generate_blog(fresh=False, report_total_errors=True): anything_modified = True if srcpath == INDEXMD: continue # index will be processed separately - if extension in ["css", "html", "jpg", "png", "svg", "ico", "txt", + if extension in ["css", "js", "asc", "html", "jpg", "png", "svg", "ico", "txt", "eot", "ttf", "woff", "woff2"]: sys.stderr.write("copying %s\n" % relpath) shutil.copy(srcpath, dstpath) |