(* ::Package:: *)

(************************************************************************)
(* This file was generated automatically by the Mathematica front end.  *)
(* It contains Initialization cells from a Notebook file, which         *)
(* typically will have the same name as this file except ending in      *)
(* ".nb" instead of ".m".                                               *)
(*                                                                      *)
(* This file is intended to be loaded into the Mathematica kernel using *)
(* the package loading commands Get or Needs.  Doing so is equivalent   *)
(* to using the Evaluate Initialization Cells menu command in the front *)
(* end.                                                                 *)
(*                                                                      *)
(* DO NOT EDIT THIS FILE.  This entire file is regenerated              *)
(* automatically each time the parent Notebook file is saved in the     *)
(* Mathematica front end.  Any changes you make to this file will be    *)
(* overwritten.                                                         *)
(************************************************************************)



(* ::Input::Initialization:: *)
SetDirectory["C:\\drorbn\\AcademicPensieve\\Projects\\KnotTheory"]


(* ::Input::Initialization:: *)
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"]
)


(* ::Input::Initialization:: *)
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",\[Infinity]]}
];
DeleteFile/@{"KnotTheory.zip"};
CreateArchive["Temporary/KnotTheory", "KnotTheory.zip"];
DeleteDirectory["Temporary", DeleteContents->True]; DeleteDirectory["Temporary"];
)
