private static string outputArtifactAsciidoc(ArtifactXmlReader atfReader, string artifactFile, string asciidocDir) { // ArtifactVO artifact = atfReader.readArtifactFile(artifactFile); ArtifactAsciidocWriter aaWriter = new ArtifactAsciidocWriter(artifact); string plainFileName = Path.GetFileNameWithoutExtension(artifactFile); string partGuid = artifact.guid.Substring(1, 8); string artifactFileName = "atf_" + filterSpecialChar(artifact.name) + "_" + partGuid + ".adoc"; aaWriter.writeFile(asciidocDir + "\\" + artifactFileName); return(artifactFileName); }
/// <summary> /// 全成果物のAsciidocファイルを出力する /// </summary> /// <param name="projectFile"></param> private static void outputAllArtifactAsciidoc(ArtifactsVO allArtifacts) { // Asciidoc出力writerの生成 string asciidocDir = ProjectSetting.getVO().projectPath + "\\" + "asciidocs"; ArtifactAsciidocWriter asciidocWriter = new ArtifactAsciidocWriter(asciidocDir); for (int i = 0; i < allArtifacts.artifactList.Count; i++) { ArtifactVO atf = allArtifacts.artifactList[i]; // 成果物のAsciidoc出力 string adocFilePath = asciidocWriter.outputAsciidocFile(atf); // 出力されたAsciidocのファイル名を成果物VOに登録(処理後、AllArtifacts.xmlを更新する) atf.asciidocFilePath = adocFilePath; Console.WriteLine("{0}:ドキュメント出力 {1}", i + 1, adocFilePath); } // 最後に、このドキュメント一覧を見るためのindex.htmlを出力する outputIndexHtml(allArtifacts, asciidocDir); }