Skip to content

Commit

Permalink
update web-doc generator
Browse files Browse the repository at this point in the history
  • Loading branch information
szhorvat committed Jul 14, 2022
1 parent a5bf5b0 commit 19f6dd2
Showing 1 changed file with 30 additions and 29 deletions.
59 changes: 30 additions & 29 deletions WebDocumentation/GenerateWebDoc.nb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Cell["Evaluate and prepare documentation notebook", \
Cell[BoxData[
RowBox[{"SetDirectory", "@",
RowBox[{"NotebookDirectory", "[", "]"}]}]], "Input",
CellLabel->"In[1]:=",ExpressionUUID->"9c94864c-0cf3-4be2-a8dd-295ef7d50427"],
CellLabel->"In[2]:=",ExpressionUUID->"9c94864c-0cf3-4be2-a8dd-295ef7d50427"],

Cell[BoxData[
RowBox[{"nb", "=",
Expand All @@ -16,7 +16,7 @@ Cell[BoxData[
"AbsoluteFileName", "[",
"\"\<../IGraphM/Documentation/English/Tutorials/IGDocumentation.nb\>\"",
"]"}]}]}]], "Input",
CellLabel->"In[2]:=",ExpressionUUID->"150df776-303c-4fe5-be33-74abbc45301e"],
CellLabel->"In[3]:=",ExpressionUUID->"150df776-303c-4fe5-be33-74abbc45301e"],

Cell[BoxData[
RowBox[{
Expand All @@ -25,7 +25,7 @@ Cell[BoxData[
RowBox[{"nb", ",", "WindowSize"}], "]"}], "=",
RowBox[{"{",
RowBox[{"938", ",", "800"}], "}"}]}], ";"}]], "Input",
CellLabel->"In[3]:=",ExpressionUUID->"b0963778-2162-484c-8b43-a442d4d68967"],
CellLabel->"In[4]:=",ExpressionUUID->"b0963778-2162-484c-8b43-a442d4d68967"],

Cell[BoxData[
RowBox[{
Expand Down Expand Up @@ -57,7 +57,7 @@ Cell[BoxData[
RowBox[{"{", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]",
RowBox[{"Protect", "[", "Subgraph", "]"}], ";"}]}],
"\[IndentingNewLine]", "]"}]}]], "Input",
CellLabel->"In[4]:=",ExpressionUUID->"cb088b3e-e748-47b8-a11a-5a27e716df31"],
CellLabel->"In[5]:=",ExpressionUUID->"cb088b3e-e748-47b8-a11a-5a27e716df31"],

Cell[BoxData[
RowBox[{
Expand All @@ -66,14 +66,14 @@ Cell[BoxData[
RowBox[{"nb", ",",
RowBox[{"InsertResults", "\[Rule]", "True"}]}], "]"}], ";"}], "//",
"AbsoluteTiming"}]], "Input",
CellLabel->"In[5]:=",ExpressionUUID->"433eabf6-6290-4f0d-a9f7-f6edec62f633"],
CellLabel->"In[6]:=",ExpressionUUID->"433eabf6-6290-4f0d-a9f7-f6edec62f633"],

Cell[BoxData[
RowBox[{"NotebookDelete", "@",
RowBox[{"Cells", "[",
RowBox[{"nb", ",",
RowBox[{"CellTags", "\[Rule]", "\"\<DeleteCell\>\""}]}], "]"}]}]], "Input",
CellLabel->"In[6]:=",ExpressionUUID->"2f6871c4-3065-447a-b332-a331a981b79b"]
CellLabel->"In[7]:=",ExpressionUUID->"2f6871c4-3065-447a-b332-a331a981b79b"]
}, Open ]],

Cell[CellGroupData[{
Expand All @@ -98,7 +98,7 @@ Cell[BoxData[
RowBox[{"str", ",", "\"\<\\n\>\""}], "]"}]}], ",",
"\[IndentingNewLine]", "\"\<\\n\>\""}], "\[IndentingNewLine]",
"]"}]}]], "Input",
CellLabel->"In[7]:=",ExpressionUUID->"46fb37b2-93ce-4e0d-aed0-e26443e00042"]
CellLabel->"In[8]:=",ExpressionUUID->"46fb37b2-93ce-4e0d-aed0-e26443e00042"]
}, Open ]],

Cell[CellGroupData[{
Expand All @@ -122,7 +122,7 @@ Cell[BoxData[{
RowBox[{
RowBox[{"$ImageResolution", "=",
RowBox[{"2", "*", "72"}]}], ";"}]}], "Input",
CellLabel->"In[8]:=",ExpressionUUID->"e930c2e5-1774-40f8-b50f-cfb9a085b547"],
CellLabel->"In[9]:=",ExpressionUUID->"e930c2e5-1774-40f8-b50f-cfb9a085b547"],

Cell[BoxData[{
RowBox[{"Get", "[", "\"\<M2MD`\>\"", "]"}], "\[IndentingNewLine]",
Expand All @@ -131,7 +131,7 @@ Cell[BoxData[{
RowBox[{"StyleBox", "[",
RowBox[{"code_", ",", "\"\<Program\>\""}], "]"}], "]"}], ":=",
RowBox[{"\"\<`\>\"", "<>", "code", "<>", "\"\<`\>\""}]}]}], "Input",
CellLabel->"In[10]:=",ExpressionUUID->"25705a75-8962-4535-bb6e-6cd01373eb53"],
CellLabel->"In[11]:=",ExpressionUUID->"25705a75-8962-4535-bb6e-6cd01373eb53"],

Cell[BoxData[
RowBox[{"DeleteDirectory", "[",
Expand All @@ -142,7 +142,7 @@ Cell[BoxData[
RowBox[{"NotebookDirectory", "[", "]"}], ",", "\"\<img\>\""}], "}"}],
"]"}], ",",
RowBox[{"DeleteContents", "\[Rule]", "True"}]}], "]"}]], "Input",
CellLabel->"In[12]:=",ExpressionUUID->"57c715b6-e0ad-4b51-bdf9-cbbcc2c1ca8f"],
CellLabel->"In[13]:=",ExpressionUUID->"57c715b6-e0ad-4b51-bdf9-cbbcc2c1ca8f"],

Cell[BoxData[
RowBox[{
Expand Down Expand Up @@ -191,7 +191,7 @@ Cell[BoxData[
"\[IndentingNewLine]", "]"}]}]}]}], "\[IndentingNewLine]",
"|>"}]}]}], "\[IndentingNewLine]", "]"}], "//",
"AbsoluteTiming"}]], "Input",
CellLabel->"In[13]:=",ExpressionUUID->"7590c8c8-488d-4306-a379-b7411b5a7fe9"],
CellLabel->"In[14]:=",ExpressionUUID->"7590c8c8-488d-4306-a379-b7411b5a7fe9"],

Cell[BoxData[{
RowBox[{
Expand All @@ -200,7 +200,7 @@ Cell[BoxData[{
"footer", "=",
"\"\<\n\n<br>\n\n----\n\n<div style='text-align: center; color: #999; \
margin: 15px 0; font-size: 0.85em;'>IGraph/M Documentation \[Copyright] 2016\
\[Dash]2020 Szabolcs Horv\[AAcute]t</div>\n\>\""}], ";"}],
\[Dash]2022 Szabolcs Horv\[AAcute]t</div>\n\>\""}], ";"}],
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{
Expand Down Expand Up @@ -230,11 +230,11 @@ margin: 15px 0; font-size: 0.85em;'>IGraph/M Documentation \[Copyright] 2016\
RowBox[{"(*", " ",
RowBox[{"exclude", " ", "capital", " ", "final", " ", "sigma"}], " ",
"*)"}], "\[IndentingNewLine]", "]"}]}]}], ";"}], "\[IndentingNewLine]",
"\n",
"\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{
"replace", " ", "special", " ", "named", " ", "characters", " ", "and",
" ", "append", " ", "footer"}], " ", "*)"}]}], "\[IndentingNewLine]",
" ", "append", " ", "footer"}], " ", "*)"}]}], "\n",
RowBox[{"Export", "[", "\[IndentingNewLine]",
RowBox[{"\"\<igraphm.md\>\"", ",", "\[IndentingNewLine]",
RowBox[{
Expand Down Expand Up @@ -324,8 +324,9 @@ margin: 15px 0; font-size: 0.85em;'>IGraph/M Documentation \[Copyright] 2016\
"]"}], "<>", "footer"}], ",", "\[IndentingNewLine]", "\"\<Text\>\"", ",",
"\[IndentingNewLine]",
RowBox[{"CharacterEncoding", "\[Rule]", "\"\<UTF-8\>\""}]}],
"\[IndentingNewLine]",
"]"}]}], "Input",ExpressionUUID->"89ca4a66-57fa-4d49-889b-ee7ba44b1a7d"]
"\[IndentingNewLine]", "]"}]}], "Input",
CellLabel->
"In[15]:=",ExpressionUUID->"89ca4a66-57fa-4d49-889b-ee7ba44b1a7d"]
}, Open ]]
}, Open ]],

Expand All @@ -337,7 +338,7 @@ Cell["Create syntax highlighting file for pandoc", \
Cell[BoxData[
RowBox[{
RowBox[{"Needs", "[", "\"\<IGraphM`\>\"", "]"}], ";"}]], "Input",
CellLabel->"In[17]:=",ExpressionUUID->"d204c740-3273-4eab-be4d-bb7e014d5940"],
CellLabel->"In[18]:=",ExpressionUUID->"d204c740-3273-4eab-be4d-bb7e014d5940"],

Cell[BoxData[{
RowBox[{
Expand All @@ -352,7 +353,7 @@ Cell[BoxData[{
RowBox[{
"\"\<%%\>\"", ",", "\"\<%%\>\"", ",", "\"\<<%\>\"", ",",
"\"\<%>\>\""}], "}"}]}]}], "]"}]}], ";"}]}], "Input",
CellLabel->"In[18]:=",ExpressionUUID->"91d76193-2d1f-457b-9913-318b8dc0e526"],
CellLabel->"In[19]:=",ExpressionUUID->"91d76193-2d1f-457b-9913-318b8dc0e526"],

Cell[BoxData[
RowBox[{"Export", "[", "\[IndentingNewLine]",
Expand All @@ -371,7 +372,7 @@ Cell[BoxData[
"\"\<\\n\>\""}], "]"}]}], "|>"}], "\[IndentingNewLine]", "]"}], ",",
"\[IndentingNewLine]", "\"\<String\>\""}], "\[IndentingNewLine]",
"]"}]], "Input",
CellLabel->"In[20]:=",ExpressionUUID->"2b13b2c6-3fdc-4b61-a162-1cda541ee93d"],
CellLabel->"In[21]:=",ExpressionUUID->"2b13b2c6-3fdc-4b61-a162-1cda541ee93d"],

Cell[BoxData[{
RowBox[{
Expand All @@ -386,7 +387,7 @@ Cell[BoxData[{
RowBox[{
"\"\<%%\>\"", ",", "\"\<%%\>\"", ",", "\"\<<%\>\"", ",",
"\"\<%>\>\""}], "}"}]}]}], "]"}]}], ";"}]}], "Input",
CellLabel->"In[21]:=",ExpressionUUID->"e9faed20-ac49-49c1-8b60-d0691556bf63"],
CellLabel->"In[22]:=",ExpressionUUID->"e9faed20-ac49-49c1-8b60-d0691556bf63"],

Cell[BoxData[
RowBox[{"Export", "[", "\[IndentingNewLine]",
Expand All @@ -398,7 +399,7 @@ Cell[BoxData[
"|>"}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]",
"\"\<String\>\""}], "\[IndentingNewLine]", "]"}]], "Input",
CellLabel->
"In[23]:=",ExpressionUUID->"52ff5760-9d46-4b7a-8951-f76da9fefd19"]
"In[24]:=",ExpressionUUID->"52ff5760-9d46-4b7a-8951-f76da9fefd19"]
}, Open ]],

Cell[CellGroupData[{
Expand All @@ -423,33 +424,33 @@ Cell[BoxData[
RowBox[{"Environment", "[", "\"\<PATH\>\"", "]"}], "<>",
"\"\<:/opt/local/bin\>\""}]}], "]"}]}], "\[IndentingNewLine]", "]"}],
";"}]], "Input",
CellLabel->"In[24]:=",ExpressionUUID->"c573f3bc-09a0-4ba9-a664-cf9cdb71f9d5"],
CellLabel->"In[25]:=",ExpressionUUID->"c573f3bc-09a0-4ba9-a664-cf9cdb71f9d5"],

Cell["Optimize images.", \
"Text",ExpressionUUID->"6b05b7cd-c6ba-439f-8165-c9bc4d10b279"],

Cell[BoxData[
RowBox[{"Run", "[", "\"\<./quantimg.sh\>\"", "]"}]], "Input",
CellLabel->"In[25]:=",ExpressionUUID->"b2cbf48b-0147-4b83-aa68-2603807094bf"],
CellLabel->"In[26]:=",ExpressionUUID->"b2cbf48b-0147-4b83-aa68-2603807094bf"],

Cell[BoxData[
RowBox[{"Run", "[", "\"\<./optimg.sh\>\"", "]"}]], "Input",
CellLabel->"In[26]:=",ExpressionUUID->"fe0c1c5e-a7df-4e51-8a71-9cc9e56fde43"],
CellLabel->"In[27]:=",ExpressionUUID->"fe0c1c5e-a7df-4e51-8a71-9cc9e56fde43"],

Cell["\<\
Convert Markdown to HTML with Pandoc. Pandoc 2.8 or later is required.\
\>", "Text",ExpressionUUID->"ff4d0f37-c6a7-42f6-bde5-2a7a1800fa41"],

Cell[BoxData[
RowBox[{"Run", "[", "\"\<./gendoc.sh\>\"", "]"}]], "Input",
CellLabel->"In[27]:=",ExpressionUUID->"17a86769-10cc-48d3-9677-5acd0f70e385"],
CellLabel->"In[28]:=",ExpressionUUID->"17a86769-10cc-48d3-9677-5acd0f70e385"],

Cell["View page.", \
"Text",ExpressionUUID->"7e1fca15-046e-4609-9ea5-d9f1687ab65a"],

Cell[BoxData[
RowBox[{"SystemOpen", "[", "\"\<index.html\>\"", "]"}]], "Input",
CellLabel->"In[28]:=",ExpressionUUID->"8778a7fd-01a2-4b66-95e1-127490f94aaf"],
CellLabel->"In[29]:=",ExpressionUUID->"8778a7fd-01a2-4b66-95e1-127490f94aaf"],

Cell["Copy files into place.", \
"Text",ExpressionUUID->"21fd180d-c22c-4a1a-bd9f-366a371d77e5"],
Expand All @@ -463,7 +464,7 @@ Cell[BoxData[{
RowBox[{"DeleteContents", "\[Rule]", "True"}]}],
"]"}], "\[IndentingNewLine]",
RowBox[{"CreateDirectory", "[", "\"\<IGDocumentation\>\"", "]"}]}], "Input",
CellLabel->"In[29]:=",ExpressionUUID->"a9f585b3-8e8e-476d-945e-c3fcb595faec"],
CellLabel->"In[30]:=",ExpressionUUID->"a9f585b3-8e8e-476d-945e-c3fcb595faec"],

Cell[BoxData[{
RowBox[{"CopyDirectory", "[",
Expand All @@ -475,14 +476,14 @@ Cell[BoxData[{
RowBox[{"\"\<igmdoc.css\>\"", ",", "\"\<IGDocumentation/igmdoc.css\>\""}],
"]"}]}], "Input",
CellLabel->
"In[32]:=",ExpressionUUID->"011edaf9-ebfa-48e1-91d0-889196cb2ad7"]
"In[33]:=",ExpressionUUID->"011edaf9-ebfa-48e1-91d0-889196cb2ad7"]
}, Open ]]
},
WindowSize->{948, 847},
WindowMargins->{{134, Automatic}, {-3, Automatic}},
PrivateNotebookOptions->{"FileOutlineCache"->False},
TrackCellChangeTimes->False,
FrontEndVersion->"12.1 for Mac OS X x86 (64-bit) (June 19, 2020)",
FrontEndVersion->"13.1 for Mac OS X x86 (64-bit) (June 16, 2022)",
StyleDefinitions->"Default.nb",
ExpressionUUID->"7fe29730-3b01-4e49-bc76-1b51ab284617"
]
Expand Down

0 comments on commit 19f6dd2

Please sign in to comment.