Pensieve header: Make the snip files in Snips/.

Go;

Prolog

BeginPackage["Snips`", {"CellExport`"}]; Begin["`private`"];
SetOptions[$FrontEndSession,PrintingStyleEnvironment->"Working"];

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

Snips

sources={"ReorderingDemo.nb" (*, "index.nb" *)}; (* The source notebook must be first *)
target="Snips/ReorderingDemo.txt";
Make[target, sources, Hold[
SetOptions[CellExport, ExportFormat -> ".pdf", PageWidth -> 9];
SourceNotebook = Get[First@sources];
DialogTags={"sl2matrices", "Reordering_sl2", "g0matrices", "Reordering_g0"};
tags=Cases[SourceNotebook, (CellTags->tag_) :> tag, Infinity ] // Union;
files=Flatten[Table[
Which[
tag=="817", { (* this is only left here as a demo for how to make an exception *)
CellExport[SourceNotebook, "817", {CellFilter -> First, ExportBaseFilename -> "Snips/817-In"}],
CellExport[SourceNotebook, "817", {CellFilter -> Rest, ExportBaseFilename -> "Snips/817-Out", PageWidth -> 5.5*0.24/0.16}]
},
MemberQ[DialogTags, tag], {
CellExport[SourceNotebook, tag, {CellFilter -> First, ExportBaseFilename -> "Snips/"<>tag<>"-In"}],
CellExport[SourceNotebook, tag, {CellFilter -> Rest, ExportBaseFilename -> "Snips/"<>tag<>"-Out"}]
},
True, CellExport[SourceNotebook, tag, ExportBaseFilename -> "Snips/"<>tag]
],
{tag, tags}]];
PutAppend[DateString[], target]
]]

Epilog

End[]; EndPackage[];