cmc/cleberg.net
My personal web garden & blog.
clone: git clone https://gitbay.org/cmc/cleberg.net.git
2bf00f831142d10b767b456de863d0d6e6a5243c
verified · cmc
author: Christian Cleberg <hello@cleberg.net> · 2026-07-30T22:34:13Z
build.py | 22 ++++++++++------------ ruff.toml | 3 +++ utils/salary_visualization.py | 1 + 3 files changed, 14 insertions(+), 12 deletions(-) old mode 100644 new mode 100755 @@ -29,11 +29,10 @@ import re import shutil import subprocess import sys -from html import escape -from urllib.parse import quote from datetime import datetime +from html import escape from pathlib import Path - +from urllib.parse import quote SITE_TEMPLATE_VARS = { "site_name": "cleberg.net", @@ -45,9 +44,7 @@ SITE_TEMPLATE_VARS = { def run_ruff(): print("Running ruff...") for cmd in [["ruff", "check", "--fix"], ["ruff", "format"]]: - result = subprocess.run( - cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True - ) + result = subprocess.run(cmd, capture_output=True, text=True, check=False) if result.returncode != 0: print(f"ruff error ({' '.join(cmd)}):") print(result.stderr, file=sys.stderr) @@ -300,9 +297,9 @@ def minify_css(src_css, dest_css): print(f"Minifying CSS: {src_css} → {dest_css}") result = subprocess.run( ["minify", "-o", str(dest_css), str(src_css)], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + capture_output=True, text=True, + check=False, ) if result.returncode != 0: print("Error during CSS minification:") @@ -314,9 +311,9 @@ def minify_html(src_html, dest_html): print(f"Minifying HTML: {src_html} → {dest_html}") result = subprocess.run( ["minify", "-o", str(dest_html), str(src_html)], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + capture_output=True, text=True, + check=False, ) if result.returncode != 0: print("Error during HTML minification:") @@ -333,6 +330,7 @@ def run_emacs_publish(dev_mode=True): stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, + check=False, ) if result.returncode != 0: @@ -538,9 +536,9 @@ def deploy_to_server(build_dir, server): print(f"Deploying .build/ → {remote_path}") result = subprocess.run( ["rsync", "-r", "--delete-before", f"{build_dir}/", remote_path], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + capture_output=True, text=True, + check=False, ) if result.returncode != 0: print("Error during rsync deployment:") new file mode 100644 @@ -0,0 +1,3 @@ +# ruff.toml +[lint] +ignore = ["DTZ006", "DTZ007"] @@ -6,6 +6,7 @@ plotly. """ import locale + import pandas as pd import plotly.graph_objs as go from pandas import read_csv as pd_read_csv