Skip to content

Commit

Permalink
update cookbook
Browse files Browse the repository at this point in the history
  • Loading branch information
swharden committed Jul 27, 2019
1 parent 6ee5c3b commit 65e6b7e
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,5 @@ doc/cookbook/images/30_Signal.png
doc/cookbook/images/31_Signal_With_Antialiasing_Off.png
doc/cookbook/images/31_Signal_With_Antialiasing_Off.png
doc/cookbook/images/30_Signal.png
doc/cookbook/images/30_Signal.png
doc/cookbook/images/31_Signal_With_Antialiasing_Off.png
6 changes: 5 additions & 1 deletion demos/ScottPlotCookbook/COPY-COOKBOOK.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
:: clear the old cookbook
del /q ..\..\doc\cookbook\images\*.*
copy .\bin\Debug\images\*.* ..\..\doc\cookbook\images\*.*
del /q ..\..\doc\cookbook\README.md

:: copy the new cookbook
copy .\bin\Debug\images\*.* ..\..\doc\cookbook\images\*.*
copy .\bin\Debug\README.md ..\..\doc\cookbook\README.md

pause
4 changes: 3 additions & 1 deletion demos/ScottPlotCookbook/CookBookManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public void GenerateAllFigures(int width, int height, string outputFolderName =

ValidateImageHashes(hashes.ToArray());

GenerateReport(outputFolderName);

Console.WriteLine("\nCOOKBOOK GENERATION COMPLETE");
Console.WriteLine("\nOptionally update the cookbook with:");
string cookBookCopierPath = System.IO.Path.GetFullPath("../../");
Expand Down Expand Up @@ -117,7 +119,7 @@ public string ReadCodeFromFile(string functionName, string fileName = "Recipes.c

// isolate the function
functionName = "Figure_" + functionName;
int posStart = code.IndexOf($"public void {functionName}()");
int posStart = code.IndexOf($"public string {functionName}()");
if (posStart < 0)
{
string message = $"function {functionName}() not found in {sourceFilePath}";
Expand Down
Loading

0 comments on commit 65e6b7e

Please sign in to comment.