From a7c6a361348153606dd244bb39912d623f29557c Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Thu, 28 May 2020 23:56:14 -0700 Subject: [PATCH] Generate code review section from submodules. --- Makefile | 18 +++++++++++++++++- default.nix | 2 +- review.tex | 31 +++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 review.tex diff --git a/Makefile b/Makefile index 8050da3..e4d3cda 100644 --- a/Makefile +++ b/Makefile @@ -38,6 +38,22 @@ readme-gateway.tex: external/gateway/README.md readme.pdf: readme-app.tex readme-server.tex readme-collar.tex readme-gateway.tex readme-cdl.tex readme.tex pdflatex readme.tex +# Generate LaTeX files from code REVIEW files. +review-app.tex: external/app/REVIEW.md + pandoc -f markdown-auto_identifiers -t latex --no-highlight -o review-app.tex external/app/REVIEW.md + sed -i -e 's/Code Review Changes/Code Review Changes for Android Application/g' review-app.tex + +review-server.tex: external/server/REVIEW.md + pandoc -f markdown-auto_identifiers -t latex --no-highlight -o review-server.tex external/server/REVIEW.md + sed -i -e 's/Code Review Changes/Code Review Changes for API Server/g' review-server.tex + +review-collar.tex: external/collar/REVIEW.md + pandoc -f markdown-auto_identifiers -t latex --no-highlight -o review-collar.tex external/collar/REVIEW.md + sed -i -e 's/Code Review Changes/Code Review Changes for Collar Firmware/g' review-collar.tex + +review.pdf: review-app.tex review-server.tex review-collar.tex review.tex + pdflatex review.tex + intro.pdf: intro.tex pdflatex intro.tex @@ -57,6 +73,6 @@ requirements.pdf: external/requirements/requirements.latex cd external/requirements && pdflatex -output-directory=../.. requirements.latex && pdflatex -output-directory=../.. requirements.latex clean: - rm -rf *.pdf *.out *.aux *.log *.toc readme-*.tex *.old + rm -rf *.pdf *.out *.aux *.log *.toc readme-*.tex *.old review-*.tex .PHONY: clean diff --git a/default.nix b/default.nix index c47fac2..cc1be78 100644 --- a/default.nix +++ b/default.nix @@ -4,7 +4,7 @@ mkShell { buildInputs = [ pandoc (python38.withPackages (ps: with ps; [ pip virtualenv ])) - (texlive.combine { inherit (texlive) framed pdfjam pdfpages pdflscape scheme-basic IEEEtran collection-fontsrecommended todonotes caption pgfgantt setspace; }) + (texlive.combine { inherit (texlive) framed booktabs pdfjam pdfpages pdflscape scheme-basic IEEEtran collection-fontsrecommended todonotes caption pgfgantt setspace; }) ]; } diff --git a/review.tex b/review.tex new file mode 100644 index 0000000..b65b511 --- /dev/null +++ b/review.tex @@ -0,0 +1,31 @@ +\documentclass[10pt, draftclsnofoot,onecolumn, compsoc]{IEEEtran} + +\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]} +\let\endchangemargin=\endlist + +\usepackage{booktabs} +\usepackage{longtable} +\usepackage{hyperref} +\usepackage{framed} +\usepackage{textcomp} +\usepackage{todonotes} +\usepackage{caption} +\usepackage{pgfgantt} +\usepackage{setspace} +\linespread{1} + +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} + + \title{Appendix 3: Code Review Changes} + +\begin{document} +\maketitle + +\input{review-app.tex} +\input{review-server.tex} + +\pagebreak +\input{review-collar.tex} + +\end{document}