This commit is contained in:
@@ -542,6 +542,7 @@ namespace AyaNova.Plugin.Dump
|
||||
makeFolderIfNotExist(dumpFolder);
|
||||
|
||||
var outputFileName = dumpFolder + Path.DirectorySeparatorChar + objectFileName + ".json";
|
||||
var wikiOutputPath = dumpFolder + Path.DirectorySeparatorChar + objectFileName + Path.DirectorySeparatorChar + "files";
|
||||
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
serializer.NullValueHandling = NullValueHandling.Include;
|
||||
@@ -573,12 +574,11 @@ namespace AyaNova.Plugin.Dump
|
||||
}
|
||||
|
||||
//WIKI / ATTACHMENTS
|
||||
DumpWikiPageAndAttachments(tid);
|
||||
DumpWikiPageAndAttachments(tid, wikiOutputPath);
|
||||
}
|
||||
|
||||
|
||||
//WIKI
|
||||
|
||||
#region Wikiable objects reference
|
||||
/*
|
||||
Find all "Util.OpenWikiPage", Whole word, Subfolders, Keep modified files open, Find Results 1, Entire Solution, ""
|
||||
@@ -604,11 +604,29 @@ namespace AyaNova.Plugin.Dump
|
||||
*/
|
||||
#endregion
|
||||
|
||||
private void DumpWikiPageAndAttachments(TypeAndID tid)
|
||||
private void DumpWikiPageAndAttachments(TypeAndID tid, string wikiOutputPath)
|
||||
{
|
||||
//may not exist
|
||||
if (!WikiPage.HasWiki(tid.ID)) return;
|
||||
|
||||
WikiPage w= WikiPage.GetItem(tid.ID);
|
||||
var content= w.GetContentAsString;
|
||||
var fileList = w.GetFileListContentForRI();
|
||||
|
||||
if (string.IsNullOrWhiteSpace(content) && fileList.Count < 1) return;
|
||||
|
||||
makeFolderIfNotExist(wikiOutputPath);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(content))
|
||||
{
|
||||
//write out the html wiki page
|
||||
File.WriteAllText(wikiOutputPath + Path.DirectorySeparatorChar + "w.html", content);
|
||||
}
|
||||
foreach (WikiPage.WikiFileInfo i in fileList)
|
||||
{
|
||||
//save out each file to that path with a uniquification prepended
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion dump
|
||||
|
||||
Reference in New Issue
Block a user