This commit is contained in:
@@ -542,6 +542,7 @@ namespace AyaNova.Plugin.Dump
|
|||||||
makeFolderIfNotExist(dumpFolder);
|
makeFolderIfNotExist(dumpFolder);
|
||||||
|
|
||||||
var outputFileName = dumpFolder + Path.DirectorySeparatorChar + objectFileName + ".json";
|
var outputFileName = dumpFolder + Path.DirectorySeparatorChar + objectFileName + ".json";
|
||||||
|
var wikiOutputPath = dumpFolder + Path.DirectorySeparatorChar + objectFileName + Path.DirectorySeparatorChar + "files";
|
||||||
|
|
||||||
JsonSerializer serializer = new JsonSerializer();
|
JsonSerializer serializer = new JsonSerializer();
|
||||||
serializer.NullValueHandling = NullValueHandling.Include;
|
serializer.NullValueHandling = NullValueHandling.Include;
|
||||||
@@ -573,12 +574,11 @@ namespace AyaNova.Plugin.Dump
|
|||||||
}
|
}
|
||||||
|
|
||||||
//WIKI / ATTACHMENTS
|
//WIKI / ATTACHMENTS
|
||||||
DumpWikiPageAndAttachments(tid);
|
DumpWikiPageAndAttachments(tid, wikiOutputPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//WIKI
|
//WIKI
|
||||||
|
|
||||||
#region Wikiable objects reference
|
#region Wikiable objects reference
|
||||||
/*
|
/*
|
||||||
Find all "Util.OpenWikiPage", Whole word, Subfolders, Keep modified files open, Find Results 1, Entire Solution, ""
|
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
|
#endregion
|
||||||
|
|
||||||
private void DumpWikiPageAndAttachments(TypeAndID tid)
|
private void DumpWikiPageAndAttachments(TypeAndID tid, string wikiOutputPath)
|
||||||
{
|
{
|
||||||
//may not exist
|
//may not exist
|
||||||
if (!WikiPage.HasWiki(tid.ID)) return;
|
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
|
#endregion dump
|
||||||
|
|||||||
Reference in New Issue
Block a user