MasterTech Technology, official logoGet a quote
MasterTech · ES / EN
Educational architecture examples

Web Architecture & Scripts Documentation

Illustrative examples of static-site generation and data processing. The Python scripts shown are not part of this website's current build pipeline and do not document a deployed corporate platform.

Educational diagram: Markdown, generator and HTMLEnlarge diagram ↗
01

Python SSG Engine: Study Report Generator

This example illustrates how a minimalist static-site generator could work: reading .md files from a posts/ directory and outputting HTML. The generator, directory and template shown here are not implemented in this repository. The live website uses static HTML files and a local preview mirror.

// build_blog.py - Markdown-to-HTML compiler script
import os import markdown POSTS_DIR = "posts" OUTPUT_DIR = "blog" TEMPLATE_FILE = "template_post.html" def parse_frontmatter(content): meta = {} body = content if content.startswith("---"): parts = content.split("---", 2) if len(parts) >= 3: raw_meta, body = parts[1], parts[2] for line in raw_meta.strip().split("\n"): if ":" in line: k, v = line.split(":", 1) meta[k.strip()] = v.strip().strip('"').strip("'") return meta, body def build(): if not os.path.exists(OUTPUT_DIR): os.makedirs(OUTPUT_DIR) with open(TEMPLATE_FILE, "r", encoding="utf-8") as f: template = f.read() for filename in os.listdir(POSTS_DIR): if filename.endswith(".md"): with open(os.path.join(POSTS_DIR, filename), "r", encoding="utf-8") as f: meta, body = parse_frontmatter(f.read()) html_body = markdown.markdown(body, extensions=['tables', 'fenced_code']) output = template.replace("{{TITULO}}", meta.get("titulo", "Sin título")) \ .replace("{{FECHA}}", meta.get("fecha", "")) \ .replace("{{CATEGORIA}}", meta.get("categoria", "Estudio")) \ .replace("{{CONTENIDO}}", html_body) out_path = os.path.join(OUTPUT_DIR, filename.replace(".md", "/index.html")) os.makedirs(os.path.dirname(out_path), exist_ok=True) with open(out_path, "w", encoding="utf-8") as f: f.write(output) print(f"Compilado: {out_path}") if __name__ == "__main__": build()
02

Catalogue Processing & Cleaning Pipeline (limpiador.py)

Example of CSV catalogue processing with Pandas. The MDWorks reference belongs to the founder's personal freelance portfolio, not MasterTech SpA contracts. This snippet is illustrative and requires validation with synthetic test data before use.

// limpiador.py - CSV normalisation script with Pandas
import os import pandas as pd def clean_chilean_price(val): if pd.isna(val): return 0 return int(round(float(val))) for i in range(2, 12): filename = f"products_part_{i}.csv" input_path = os.path.join("raw_data", filename) if os.path.exists(input_path): print(f"Processing batch {i}: {filename}...") df = pd.read_csv(input_path) # 1. Forward-fill Handles for product variants if 'Handle' in df.columns: df['Handle'] = df['Handle'].ffill() # 2. Round local prices if 'Variant Price' in df.columns: df['Variant Price'] = df['Variant Price'].apply(clean_chilean_price) # 3. Save cleaned file output_path = os.path.join("cleaned_data", f"cleaned_{filename}") df.to_csv(output_path, index=False)
03

Illustrative example structure

// Frontend & Public Pages

• index.html: B2B commercial landing page.

• styles.css: Shared styles and utilities.

• arquitectura/index.html: Blueprint and technical documentation.

• blog/index.html: General articles index.

• blog/modelo-osi-redes/index.html: Networking report.

// Backend & Automation Scripts

• build_blog.py: Markdown report compiler.

• limpiador.py: CSV batch processing with Pandas.

• posts/*.md: Study notes and Markdown reports.