SetDirectory["C:/drorbn/AcademicPensieve/2014-05/GoodFormulas"];
<< "../../2013-03/CellExport.m";
SetOptions[CellExport, ExportFormat -> ".png", PageWidth -> 5*0.24/0.18];

SourceNotebook = Get["C:/drorbn/AcademicPensieve/2014-05/GoodFormulas/Demo.nb"];
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];
do="sam2p foo.png foo.eps\n";
pp=OpenWrite["postprocess.csh", BinaryFormat -> True];
BinaryWrite[pp, StringReplace[do, "foo"->StringDrop[#,-4]]]& /@ files;
Close[pp];