Pensieve header: This notebook generates KnotTheory/init.m from the modules in src/ and KnotTheory.zip from their sources.

KnotTheory` Make.nb

In the future this notebook will supersede the "makefile"; currently the makefile is not operational, but it is kept in the repository because it contains the list of files that go into DTCodes4Knots12To16.zip which are not yet made by this notebook.
This notebook also contains some testing code.

Actions

Create["init.m"];

Create["Archives"]

Definitions

SetDirectory["C:\\drorbn\\AcademicPensieve\\Projects\\KnotTheory"]

InitSources = ("src/"<>#)& /@ {
"Base.m", "Braids.m", "TubePlot.m", "DrawPD.m", "Data.m", "BraidData.m","Naming.m", "GaussCode.m", "GC2PD.m", "Indiana.m","HyperbolicVolume.m","WikiForm.m", "HOMFLYPT.m", "Kauffman.m", "Kh.m", "MorseLink.m", "DrawMorseLink.m", "ML2PD.m", "AlexanderConway.m", "VogelsAlgorithm.m", "MultivariableAlexander.m", "REngine.m", "TestRMatrix.m", "CJREngine.m", "ColouredJones.m", "HFGenus.m","KTtoLinKnot.m", "ArcPresentation.m", "HFK.m"
};
Create["init.m"] := (
lines = StringReplace[#,
"---date---" -> ToString[Date[]]
]& /@ Import["src/System.mm", "Lines"];
lines = Flatten[{
lines,
{
"(* Begin source file "<>#<>"*)\n",
Import[#, "Lines"],
"(* End source file "<>#<>"*)\n\n"
}& /@ InitSources
}];
Export["KnotTheory/init.m", lines, "Lines"]
)

Create["Archives"] := (
Switch[FileType["Temporary"],
File, DeleteFile["Temporary"],
Directory, (DeleteDirectory["Temporary", DeleteContents->True]; DeleteDirectory["Temporary"])
];
CreateDirectory["Temporary"];
CopyDirectory["KnotTheory", "Temporary/KnotTheory"];
Table[
d=Length@FileNameSplit@file;
lines=Import[file, "Lines"];
lines=StringReplace[#, {
"src=\""<>StringJoin@@Table["../",{d}]->"src=\"http://drorbn.net/AcademicPensieve/",
"href=\""<>StringJoin@@Table["../",{d}]->"href=\"http://drorbn.net/AcademicPensieve/",
"href=\""<>StringJoin@@Table["../",{d-1}]->"href=\"http://drorbn.net/AcademicPensieve/Projects/",
"href=\""<>StringJoin@@Table["../",{d-2}]->"href=\"http://drorbn.net/AcademicPensieve/Projects/KnotTheory/"
}]& /@ lines;
DeleteFile[file];
Export[file, lines, "Lines"],
{file, FileNames["index.html", "Temporary",∞]}
];
DeleteFile/@{"KnotTheory.zip"};
CreateArchive["Temporary/KnotTheory", "KnotTheory.zip"];
DeleteDirectory["Temporary", DeleteContents->True];
)