SetDirectory["C:/drorbn/AcademicPensieve/2015-07/PolyPoly"];

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]
]
];

ComputerTalk

Get["../../2013-03/CellExport.m"];

sourcenotebook="C:/drorbn/AcademicPensieve/2015-07/PolyPoly/Demo.nb";
Make["listing.txt", sourcenotebook, Hold[
SetOptions[CellExport, ExportFormat -> ".png", PageWidth -> 5*0.24/0.18];
SourceNotebook = Get[sourcenotebook];
DialogTags={};
tags=Cases[SourceNotebook, (CellTags->tag_) :> tag, Infinity ] // Union;
Print[tags];
files=Flatten[Table[
If[MemberQ[DialogTags, tag],
{
CellExport[SourceNotebook, tag, CellFilter -> First, ExportBaseFilename -> "ComputerTalk/Human-"<>tag],
CellExport[SourceNotebook, tag, CellFilter -> Rest, ExportBaseFilename -> "ComputerTalk/Machine-"<>tag]
},
CellExport[SourceNotebook, tag, ExportBaseFilename -> "ComputerTalk/"<>tag]
],
{tag, tags}]];
listing=OpenWrite["listing.txt"];
WriteString[listing, #<>"\n"]& /@ files;
Close[listing];
]]

index.html

{
"CleanTeX" -> True
}