Skip to content

Commit

Permalink
Update strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
AndiH committed Oct 31, 2022
1 parent 278b6d5 commit 890e0fb
Show file tree
Hide file tree
Showing 5 changed files with 243 additions and 16 deletions.
17 changes: 10 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
.PHONY: all latex-pdf inkscape-svg view-html
all: gpu-vendor-model-matrix.table.tex gpu-vendor-model-matrix.table.html
latex-pdf: gpu-vendor-model-matrix.pdf
.PHONY: all all-table pdf svg html
all: pdf svg html
all-table: gpu-vendor-model-matrix.table.tex gpu-vendor-model-matrix.table.html
pdf: gpu-vendor-model-matrix.pdf
svg: gpu-vendor-model-matrix.svg
html: gpu-vendor-model-matrix.html

gpu-vendor-model-matrix.table.html: LANG=html
gpu-vendor-model-matrix.table.tex: LANG=latex
gpu-vendor-model-matrix.table.html: gpu-vendor-model-matrix.html table-template.in.html style.css render_table.py compat.yml Makefile
gpu-vendor-model-matrix.table.tex: gpu-vendor-model-matrix.tex table-template.in.tex render_table.py compat.yml Makefile
gpu-vendor-model-matrix.table.html: table-template.in.html style.css render_table.py compat.yml Makefile
gpu-vendor-model-matrix.table.tex: table-template.in.tex render_table.py compat.yml Makefile

gpu-vendor-model-matrix.table.tex gpu-vendor-model-matrix.table.html:
python3 render_table.py --format ${LANG}
Expand All @@ -18,5 +21,5 @@ gpu-vendor-model-matrix.svg: gpu-vendor-model-matrix.pdf
inkscape $$(PWD)/$< --export-area-drawing -o $$(PWD)/$@ --export-type=svg
svgo -i $@

view-html: gpu-vendor-model-matrix.table.html
python3 -m http.server
gpu-vendor-model-matrix.html: gpu-vendor-model-matrix.table.html gpu-vendor-model-matrix.skeleton.html
gsed '/<!-- insert_here -->/e cat gpu-vendor-model-matrix.table.html' gpu-vendor-model-matrix.skeleton.html > $@
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ Files:
* `render_table.py`: Read in definitions from `compat.yml`, massage data, and generate HTML and/or LaTeX code. Can be either printed to screen and/or written to file. See `render_table.py -h`
* `compat.yml`: All the raw data, in YAML. Starts with SVG code for status icons. Then come the status assessments in form of dictionaries. And finally, a list of descriptions of the assessments.
* `table-template.in.html`/`table-template.in.tex`: The Jinja2 template files generating the respective code from the raw data. While a lot of the content is similar, there are some distinct differences – like how the footnotes are handled, because LaTeX is typeset while HTML is static.
* `gpu-vendor-model-matrix.html`/`gpu-vendor-model-matrix.tex`: Example boilerplate code to augment the generated table. For HTML, this is not much beyond the CSS; but for LaTeX this also includes some important definitions; but I did not want to cascade it any further.
* `gpu-vendor-model-matrix.skeleton.html`/`gpu-vendor-model-matrix.tex`: Example boilerplate code to augment the generated table. For HTML, this is not much beyond the CSS; but for LaTeX this also includes some important definitions; but I did not want to cascade it any further.
* Pre-compiled examples:
- `gpu-vendor-model-matrix.table.html`/`gpu-vendor-model-matrix.table.tex`: Generated version of the raw data
- `gpu-vendor-model-matrix.table.pdf`: Typeset PDF from `gpu-vendor-model-matrix.tex` with XeLaTeX
- `gpu-vendor-model-matrix.table.svg`: Converted SVG from PDF with Inkscape
- `gpu-vendor-model-matrix.pdf`: Typeset PDF from `gpu-vendor-model-matrix.tex` with XeLaTeX
- `gpu-vendor-model-matrix.svg`: Converted SVG from PDF with Inkscape
- `gpu-vendor-model-matrix.html`: Simple container HTML page with inserted table and some style
* `Makefile`: Generate all of these. Check out `make html pdf svg`.

Also, `_gen-symbols/` exist, which is part of my exploration for all of this. I just might need it if I change the icons.

Expand Down
Loading

0 comments on commit 890e0fb

Please sign in to comment.