Skip to content

Commit a5b6e72

Browse files
committed
update 2026
1 parent b15196d commit a5b6e72

49 files changed

Lines changed: 6023 additions & 562 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.editorconfig‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# editor and formatter (Prettier and Black).
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
indent_style = space
10+
indent_size = 4
11+
12+
[*.{js,css,html,md,yml,yaml,lua,tex}]
13+
indent_size = 2
14+
15+
# the generated data files are written with 4 spaces
16+
[*.json]
17+
indent_size = 4
18+
19+
[Makefile]
20+
indent_style = tab
21+
22+
[*.md]
23+
trim_trailing_whitespace = false

‎.gitignore‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,19 @@ _site
3737
*.vrb
3838
*.xcp
3939
*.xdy
40-
*.tdo
40+
*.tdo
41+
info
42+
###Build###
43+
dev/build/
44+
dev/.venv/
45+
dev/_site/
46+
*.docx
47+
linkedin/out/
48+
49+
###Published documents: files/ is tracked (info/ stays private)###
50+
!files/
51+
!files/*.pdf
52+
!files/*.docx
53+
__pycache__/
54+
node_modules/
55+
.~lock.*

‎.vscode/extensions.json‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"recommendations": [
3+
"ms-python.python",
4+
"ms-python.black-formatter",
5+
"esbenp.prettier-vscode",
6+
"johnnymorganz.stylua",
7+
"sumneko.lua",
8+
"james-yu.latex-workshop",
9+
"ms-vscode.makefile-tools",
10+
"editorconfig.editorconfig"
11+
]
12+
}

‎.vscode/settings.json‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.rulers": [100],
4+
"files.insertFinalNewline": true,
5+
"files.trimTrailingWhitespace": true,
6+
7+
// --- formatters: one per language family -------------------------------------------------
8+
"[python]": { "editor.defaultFormatter": "ms-python.black-formatter" },
9+
"[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
10+
"[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
11+
"[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
12+
"[css]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
13+
"[yaml]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
14+
"[markdown]": {
15+
"editor.defaultFormatter": "esbenp.prettier-vscode",
16+
"files.trimTrailingWhitespace": false
17+
},
18+
"[lua]": { "editor.defaultFormatter": "JohnnyMorganz.stylua" },
19+
20+
// HTML is not auto-formatted: index.html is a Liquid template, STYLESHEET.html and intro.html
21+
// have whitespace-sensitive <pre> blocks (also listed in dev/config/prettierignore)
22+
"[html]": { "editor.formatOnSave": false },
23+
// LaTeX is edited by hand (main.tex, publications.tex): no formatter
24+
"[latex]": { "editor.formatOnSave": false },
25+
"[makefile]": { "editor.insertSpaces": false, "editor.detectIndentation": false },
26+
27+
// Tool configs live in dev/config/ (not the repo root): the settings above point the extensions at them
28+
"python.defaultInterpreterPath": "${workspaceFolder}/dev/.venv/bin/python",
29+
"python.analysis.extraPaths": ["${workspaceFolder}/dev/.venv/lib/python3.12/site-packages"],
30+
"black-formatter.importStrategy": "fromEnvironment",
31+
"black-formatter.args": ["--config", "${workspaceFolder}/dev/config/pyproject.toml"],
32+
"prettier.configPath": "${workspaceFolder}/dev/config/prettierrc.json",
33+
"prettier.ignorePath": "${workspaceFolder}/dev/config/prettierignore",
34+
"stylua.configPath": "${workspaceFolder}/dev/config/stylua.toml",
35+
"files.associations": { "*.fls": "plaintext" },
36+
37+
// --- generated output: edit the sources, run `make` ------------------------------------------
38+
"files.readonlyInclude": {
39+
"files/*.pdf": true,
40+
"files/*.docx": true
41+
},
42+
"files.exclude": { "**/__pycache__": true },
43+
"search.exclude": {
44+
"dev/.venv": true,
45+
"dev/build": true,
46+
"dev/_site": true,
47+
"linkedin/out": true,
48+
"info": true
49+
}
50+
}

‎.vscode/tasks.json‎

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
// ===== formatting ========================================================================
5+
{
6+
"label": "format: python (black)",
7+
"type": "shell",
8+
"command": "${workspaceFolder}/dev/.venv/bin/python -m black --config dev/config/pyproject.toml .",
9+
"group": "build",
10+
"problemMatcher": []
11+
},
12+
{
13+
"label": "format: json/css/js/markdown/yaml (prettier)",
14+
"type": "shell",
15+
"command": "npx --yes prettier@3 --config dev/config/prettierrc.json --ignore-path dev/config/prettierignore --write '**/*.{json,css,js,md,yml,yaml}'",
16+
"problemMatcher": []
17+
},
18+
{
19+
"label": "format: lua (stylua)",
20+
"type": "shell",
21+
"command": "npx --yes @johnnymorganz/stylua-bin --config-path dev/config/stylua.toml dev/lua",
22+
"problemMatcher": []
23+
},
24+
{
25+
"label": "format: everything",
26+
"dependsOn": [
27+
"format: python (black)",
28+
"format: json/css/js/markdown/yaml (prettier)",
29+
"format: lua (stylua)"
30+
],
31+
"dependsOrder": "sequence",
32+
"problemMatcher": []
33+
},
34+
35+
// ===== linting (no changes, non-zero exit when something is off) ===========================
36+
{
37+
"label": "lint: python (black --check)",
38+
"type": "shell",
39+
"command": "${workspaceFolder}/dev/.venv/bin/python -m black --config dev/config/pyproject.toml --check --diff .",
40+
"group": "test",
41+
"problemMatcher": {
42+
"owner": "black",
43+
"fileLocation": ["relative", "${workspaceFolder}"],
44+
"pattern": { "regexp": "^would reformat (.+)$", "file": 1, "message": 0 }
45+
}
46+
},
47+
{
48+
"label": "lint: json/css/js/markdown/yaml (prettier --check)",
49+
"type": "shell",
50+
"command": "npx --yes prettier@3 --config dev/config/prettierrc.json --ignore-path dev/config/prettierignore --check '**/*.{json,css,js,md,yml,yaml}'",
51+
"problemMatcher": []
52+
},
53+
{
54+
"label": "lint: lua (stylua --check)",
55+
"type": "shell",
56+
"command": "npx --yes @johnnymorganz/stylua-bin --config-path dev/config/stylua.toml --check dev/lua",
57+
"problemMatcher": []
58+
},
59+
{
60+
"label": "lint: data (json files parse, Lua reads them)",
61+
"type": "shell",
62+
"command": "texlua dev/lua/selftest.lua",
63+
"problemMatcher": []
64+
},
65+
{
66+
"label": "lint: everything",
67+
"dependsOn": [
68+
"lint: python (black --check)",
69+
"lint: json/css/js/markdown/yaml (prettier --check)",
70+
"lint: lua (stylua --check)",
71+
"lint: data (json files parse, Lua reads them)"
72+
],
73+
"problemMatcher": []
74+
},
75+
76+
// ===== build (see the Makefile header for the options) =====================================
77+
{
78+
"label": "build: resume PDF + Word (make)",
79+
"type": "shell",
80+
"command": "make resume docx",
81+
"group": { "kind": "build", "isDefault": true },
82+
"problemMatcher": []
83+
},
84+
{
85+
"label": "build: publications PDF + Word (make pubs)",
86+
"type": "shell",
87+
"command": "make pubs && make docx",
88+
"problemMatcher": []
89+
},
90+
{
91+
"label": "build: web preview (make preview)",
92+
"type": "shell",
93+
"command": "make preview",
94+
"problemMatcher": []
95+
},
96+
{
97+
"label": "build: serve preview on :8000",
98+
"type": "shell",
99+
"command": "make serve",
100+
"isBackground": true,
101+
"problemMatcher": []
102+
},
103+
{
104+
"label": "build: HTML to PDF, A5 zoom 30%",
105+
"type": "shell",
106+
"command": "make htmlpdf",
107+
"problemMatcher": []
108+
},
109+
{
110+
"label": "build: LinkedIn banners",
111+
"type": "shell",
112+
"command": "make banner",
113+
"problemMatcher": []
114+
},
115+
{
116+
"label": "build: check toolchain (make doctor)",
117+
"type": "shell",
118+
"command": "make doctor",
119+
"problemMatcher": []
120+
},
121+
{
122+
"label": "build: install formatter tools (black into .venv)",
123+
"type": "shell",
124+
"command": "make devtools",
125+
"problemMatcher": []
126+
}
127+
]
128+
}

‎Makefile‎

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# Build the resume and the publications list (LuaLaTeX + Lua), Word versions, and a local
2+
# preview of the Jekyll page. Run from the repository root.
3+
#
4+
# make resume + pubs PDFs and both .docx files
5+
# make resume dev/tex/main.tex -> files/sheikhUsmanAli_resume.pdf (files/ is tracked; the site links to it)
6+
# make pubs dev/tex/publications.tex -> "info/Publications -- Ali.pdf" (the previous file is kept once as "... (original).pdf");
7+
# PUBS_DIR=files make pubs publishes it next to the resume
8+
# make docx Word versions -> files/sheikhUsmanAli_resume.docx, "info/Publications -- Ali.docx"
9+
# make preview render index.html (Liquid) into _site/ so it can be opened locally (dev/_site/)
10+
# make static files/resume.html: one self-contained page (CSS/JS inlined) that opens from disk and shows without JavaScript
11+
# make serve preview + http://localhost:8000
12+
# make htmlpdf print the rendered page to PDF with Chrome: A5, zoom 30% (PAPER=A4 ZOOM=100 to change)
13+
# make banner LinkedIn banners (dark/light/e-ink) -> linkedin/out/*.{svg,pdf,png}, see linkedin/Makefile
14+
# make fmt format everything: black (python), prettier (json css js md yml), stylua (lua)
15+
# make lint the same checks without changing files (non-zero exit when something is off)
16+
# make profile banner.md (GitHub profile README, monospace panel) from dev/config/profile.json
17+
# make doctor check that the toolchain is complete
18+
# make clean remove build/ (generated PDFs/DOCX in the root are kept); make distclean also _site/ and .venv/
19+
#
20+
# Language/technology tags in the resume (web, PDF, DOCX): defaults live in _data/personal.json
21+
# "options"; override per run with
22+
# make resume RESUME_LANGS=0 hide the tags
23+
# make resume RESUME_LANGS_LIST=1 show them as a "Tech: ..." line under the text instead of in the heading
24+
# make resume RESUME_MAX_CHARS=80 strict limit of characters per line for lists (skills, Tech lines,
25+
# languages): they wrap to a new line between items; default 90
26+
# make docx RESUME_CONTACT=0 drop the Phone / Address placeholder lines (options.contact_placeholders); real values go
27+
# into the git-ignored info/contact.json {"phone": "...", "address": "..."}
28+
# make docx RESUME_PHOTO=0 drop the bordered 35 x 45 mm photo box in the Word resume (options.photo_placeholder);
29+
# make docx RESUME_PHOTO_FILE=info/me.jpg put a real photo in it (or set options.photo)
30+
# make pubs RESUME_ABSTRACT=1 show abstracts (they are placeholders now: fill "abstract" in _data/pubs.json)
31+
# Publications: _data/pubs.json has placeholders for abstract, doi and links (Paper, PDF, Code, Slides);
32+
# empty values are not shown. options.show_abstract (default false) switches abstracts on or off.
33+
# (RESUME_LANGS, RESUME_LANGS_LIST, RESUME_MAX_CHARS, RESUME_ABSTRACT work for resume, docx and preview alike;
34+
# defaults live in _data/personal.json "options": show_languages, languages_as_list, max_line_chars)
35+
#
36+
# index.html contains Liquid ({{ }}, {% %}): opening it straight from disk shows the raw
37+
# placeholders. Use `make preview` (or GitHub Pages) to see the rendered page.
38+
39+
SHELL := /bin/bash
40+
BUILD := dev/build
41+
VENV := dev/.venv
42+
PY := $(VENV)/bin/python
43+
LATEXMK := latexmk -lualatex -interaction=nonstopmode -halt-on-error -outdir=$(BUILD) -g
44+
DATA := $(wildcard _data/*.json)
45+
LUA := $(wildcard dev/lua/*.lua)
46+
# published documents go to files/ (tracked in git); personal ones to info/ (git-ignored)
47+
FILES := files
48+
RESUME := $(FILES)/sheikhUsmanAli_resume
49+
PAPER ?= A5
50+
ZOOM ?= 30
51+
# info/ is git-ignored (personal documents)
52+
PUBS_DIR ?= info
53+
PUBS := $(PUBS_DIR)/Publications -- Ali
54+
55+
.PHONY: all resume pubs docx static htmlpdf banner profile preview serve doctor clean distclean venv devtools fmt lint
56+
57+
all: resume pubs docx static
58+
59+
# ---- PDFs (latexmk -g forces a run: the Lua data reads are not tracked by latexmk) -------------
60+
resume:
61+
@mkdir -p $(BUILD) $(FILES)
62+
$(LATEXMK) dev/tex/main.tex
63+
cp $(BUILD)/main.pdf "$(RESUME).pdf"
64+
65+
pubs:
66+
@mkdir -p $(BUILD) $(PUBS_DIR)
67+
$(LATEXMK) dev/tex/publications.tex
68+
@[ ! -f "$(PUBS).pdf" ] || [ -f "$(PUBS) (original).pdf" ] || cp "$(PUBS).pdf" "$(PUBS) (original).pdf"
69+
cp $(BUILD)/publications.pdf "$(PUBS).pdf"
70+
71+
# ---- Word -------------------------------------------------------------------------------------
72+
docx: venv
73+
@mkdir -p $(FILES)
74+
$(PY) dev/scripts/make_docx.py resume "$(RESUME).docx"
75+
@mkdir -p $(PUBS_DIR)
76+
$(PY) dev/scripts/make_docx.py pubs "$(PUBS).docx"
77+
78+
htmlpdf: preview
79+
$(PY) dev/scripts/print_html.py --paper $(PAPER) --zoom $(ZOOM) -o "$(BUILD)/resume-html-$(PAPER)-$(ZOOM)pct.pdf"
80+
81+
# ---- LinkedIn banner ---------------------------------------------------------------------------
82+
banner:
83+
$(MAKE) -C linkedin publish
84+
85+
profile: venv
86+
$(PY) dev/scripts/make_profile.py
87+
88+
# ---- local preview of the Jekyll page ---------------------------------------------------------
89+
preview: venv
90+
@if command -v jekyll >/dev/null; then jekyll build -d dev/_site; else $(PY) dev/scripts/preview.py; fi
91+
@echo "open dev/_site/index.html"
92+
93+
static: venv
94+
$(PY) dev/scripts/preview.py --standalone
95+
96+
serve: preview
97+
cd dev/_site && python3 -m http.server 8000
98+
99+
# ---- tooling ----------------------------------------------------------------------------------
100+
venv: $(VENV)/.ok
101+
102+
$(VENV)/.ok: dev/scripts/requirements.txt
103+
python3 -m venv $(VENV)
104+
$(VENV)/bin/pip install --quiet -r dev/scripts/requirements.txt
105+
@touch $@
106+
107+
# ---- formatting and linting (same commands as the VS Code tasks in .vscode/tasks.json) --------
108+
PRETTIER := npx --yes prettier@3 --config dev/config/prettierrc.json --ignore-path dev/config/prettierignore
109+
STYLUA := npx --yes @johnnymorganz/stylua-bin
110+
PRETTIER_GLOB := '**/*.{json,css,js,md,yml,yaml}'
111+
112+
devtools: venv $(VENV)/.dev
113+
114+
$(VENV)/.dev: dev/scripts/requirements-dev.txt
115+
$(VENV)/bin/pip install --quiet -r dev/scripts/requirements-dev.txt
116+
@touch $@
117+
118+
fmt: devtools
119+
$(PY) -m black --config dev/config/pyproject.toml .
120+
$(PRETTIER) --write $(PRETTIER_GLOB)
121+
$(STYLUA) --config-path dev/config/stylua.toml dev/lua
122+
123+
lint: devtools
124+
$(PY) -m black --config dev/config/pyproject.toml --check --diff .
125+
$(PRETTIER) --check $(PRETTIER_GLOB)
126+
$(STYLUA) --config-path dev/config/stylua.toml --check dev/lua
127+
texlua dev/lua/selftest.lua
128+
129+
doctor:
130+
@ok=1; for t in lualatex latexmk texlua python3; do \
131+
if command -v $$t >/dev/null; then echo "ok $$t"; else echo "MISSING $$t"; ok=0; fi; done; \
132+
for f in hyperref.sty titlesec.sty enumitem.sty marvosym.sty tgpagella.sty tgtermes.sty; do \
133+
if kpsewhich $$f >/dev/null; then echo "ok $$f"; else echo "MISSING $$f (sudo apt install texlive-latex-extra texlive-fonts-recommended)"; ok=0; fi; done; \
134+
if kpsewhich Alegreya.sty >/dev/null; then echo "ok Alegreya"; \
135+
else echo "note Alegreya not installed: using TeX Gyre Pagella (sudo apt install texlive-fonts-extra for the original look)"; fi; \
136+
if kpsewhich luaotfload-main.lua >/dev/null; then echo "ok luaotfload"; \
137+
else echo "note texlive-luatex not installed: fine, the sources use Type1 fonts and pure-Lua JSON (no fontspec/luacode)"; fi; \
138+
texlua dev/lua/selftest.lua; \
139+
[ $$ok = 1 ] && echo "ready: make" || { echo "fix the MISSING items above"; exit 1; }
140+
141+
clean:
142+
rm -rf $(BUILD)
143+
144+
distclean: clean
145+
rm -rf dev/_site $(VENV)

0 commit comments

Comments
 (0)