SetDirectory["C:\\drorbn\\AcademicPensieve\\Projects\\Discovery-2017"]

Make

Make::usage = "Make[targets, sources, Hold[action]] makes a target, or a list of targets, given sources, or a list of sources, in the style of the unix 'make' command.";
Make[target_String, sources_, action_Hold] := Make[Evaluate@{target}, sources, action];
Make[targets_, source_String, action__Hold] := Make[targets, Evaluate@{source}, action];
Make[targets_List, sources_List, action_Hold] := Module[{},
If[
(And @@ ((FileType[#] =!= None)& /@ sources)) &&
Or[
Or @@ ((FileType[#]===None)& /@ targets),
Min[AbsoluteTime[FileDate[#]]& /@ targets] < Max[AbsoluteTime[FileDate[#]]& /@ sources]
],
Print["Making ",targets, " ..."];
ReleaseHold[action]
]
];

Proposal.pdf, BudgetJustification.pdf, References.pdf

Make[{"Proposal.pdf", "BudgetJustification.pdf", "References.pdf"}, "Master.pdf", Hold[
ReadString["!C:\\bin\\cpdf.exe Master.pdf 3-6 -o Proposal.pdf"];
ReadString["!C:\\bin\\cpdf.exe Master.pdf 7 -o BudgetJustification.pdf"];
ReadString["!C:\\bin\\cpdf.exe Master.pdf 8-9 -o References.pdf"];
]]

Master.png

Make["Master-0.png", "Master.pdf", Hold[
ReadString["!convert -density 300 -background white -alpha remove Master.pdf -trim Temp-%02d.png"];
DeleteFile@FileNames["Master-*.png"];
ReadString["!montage -background white -geometry +20+20 -gravity north -tile 3x1 Temp-*.png Master.png"];
DeleteFile@FileNames["Temp-*.png"];
MakeThumb /@  FileNames["Master-*.png"]
]]

.htaccess

qlinks=Sort@{
"a15" -> "http://www.math.toronto.edu/~drorbn/Talks/Aarhus-1507/",
"A15" -> "http://www.math.toronto.edu/~drorbn/Talks/Aarhus-1507/",
"Bettencourt" -> "http://www.math.toronto.edu/drorbn/Students/index.html#Bettencourt",
"BNS" -> "http://drorbn.net/AcademicPensieve/Projects/MetaMonoids/MetaMonoids.pdf",
"BV2" -> "http://drorbn.net/AcademicPensieve/Projects/PPSA/",
"Chterental" -> "http://www.math.toronto.edu/drorbn/Students/index.html#Chterental",
"Chu" -> "http://www.math.toronto.edu/drorbn/Students/index.html#Chu",
"Cliff" -> "http://drorbn.net/bbs/show?prefix=BCHKW",
"d12" -> "http://drorbn.net/AcademicPensieve/Projects/Discovery-2012/Proposal.pdf",
"Dalvit" -> "http://science.unitn.it/~dalvit/",
"Dancso" -> "http://www.math.toronto.edu/drorbn/Students/index.html#Dancso",
"Deng" -> "http://drorbn.net/bbs/show?prefix=Deng",
"Ens" -> "http://www.math.toronto.edu/tens/",
"gwu" -> "http://www.math.toronto.edu/drorbn/Talks/GWU-1612/",
"GWU" -> "http://www.math.toronto.edu/drorbn/Talks/GWU-1612/",
"Halacheva" -> "http://www.math.toronto.edu/drorbn/Students/index.html#Halacheva",
"hp" -> "http://www.math.toronto.edu/drorbn/Talks/Portfolio/",
"HP" -> "http://www.math.toronto.edu/drorbn/Talks/Portfolio/",
"ind" -> "http://www.math.toronto.edu/~drorbn/Talks/Indiana-1611/",
"Ind" -> "http://www.math.toronto.edu/~drorbn/Talks/Indiana-1611/",
"k17" -> "http://drorbn.net/AcademicPensieve/Projects/Killam-2017/",
"K17" -> "http://drorbn.net/AcademicPensieve/Projects/Killam-2017/",
"kbh" -> "http://www.math.toronto.edu/drorbn/papers/KBH/",
"KBH" -> "http://www.math.toronto.edu/drorbn/papers/KBH/",
"Khesin" -> "http://www.math.toronto.edu/~drorbn/Students/#Khesin",
"ld16" -> "http://www.math.toronto.edu/drorbn/Talks/LesDiablerets-1608/",
"LD16" -> "http://www.math.toronto.edu/drorbn/Talks/LesDiablerets-1608/",
"Lee" -> "http://www.math.toronto.edu/drorbn/Students/index.html#LeeP",
"MF" -> "http://www.math.toronto.edu/~drorbn/Students/index.html#MortonFerguson",
"mmr" -> "http://www.math.toronto.edu/~drorbn/papers/mmr/mmr.pdf",
"MMR" -> "http://www.math.toronto.edu/~drorbn/papers/mmr/mmr.pdf",
"Morton-Ferguson" -> "http://www.math.toronto.edu/~drorbn/Students/index.html#MortonFerguson",
"Ov" -> "https://cdr.lib.unc.edu/indexablecontent/uuid:c41ebc5b-c161-4f07-b1ee-f34c6fd8f0b8",
"Penneys" -> "https://people.math.osu.edu/penneys.2/",
"port" -> "http://www.math.toronto.edu/drorbn/Talks/Portfolio/",
"Port" -> "http://www.math.toronto.edu/drorbn/Talks/Portfolio/",
"q15" -> "http://www.math.toronto.edu/~drorbn/Talks/Qinhuangdao-1507/",
"Q15" -> "http://www.math.toronto.edu/~drorbn/Talks/Qinhuangdao-1507/",
"Samuelson" -> "http://www.maths.ed.ac.uk/~psamuels/",
"Selmani" -> "http://www.math.toronto.edu/drorbn/Students/index.html#Selmani",
"Toulouse" -> "http://www.math.toronto.edu/~drorbn/Talks/Toulouse-1705/",
"Vo" -> "http://www.math.toronto.edu/drorbn/Students/#Vo",
"wko2" -> "http://www.math.toronto.edu/~drorbn/papers/WKO2/WKO2.pdf",
"WKO2" -> "http://www.math.toronto.edu/~drorbn/papers/WKO2/WKO2.pdf",
"wko3" -> "http://drorbn.net/AcademicPensieve/Projects/WKO3/",
"WKO3" -> "http://drorbn.net/AcademicPensieve/Projects/WKO3/",
"wko4" -> "http://drorbn.net/AcademicPensieve/Projects/WKO4/",
"WKO4" -> "http://drorbn.net/AcademicPensieve/Projects/WKO4/",
"Zung" -> "http://www.math.toronto.edu/drorbn/Students/index.html#Zung"
};

Make[".htaccess", "index.m", Hold[
Print["Discovery-2017: Writing .htaccess."];
f=OpenWrite[".htaccess"];
Do[
WriteString[f, "Redirect /AcademicPensieve/Projects/Discovery-2017/"<>lnk[[1]]<>" "<>lnk[[2]]<>"\n"],
{lnk, qlinks}
];
Close[f]
]]

index.html

{
  "TitleNotes" -> StringJoin[Flatten[{
"This is the construction page for my 2017 NSERC Discovery grant application.\n",
"<p><b>Quick Links:</b>",
Riffle[
Table[
"\n  <a href= http://drorbn.net/d17/"<>lnk[[1]]<>">"<>lnk[[1]]<>"</a>",
{lnk, qlinks}
],
","
],
".\n</p>"
}]],
"ImageComments" -> {}
}