Пример #1
0
        public void Write(DeepEnds.Core.Dependencies dependencies, DeepEnds.Reporting.Assemble assembled)
        {
            var reporter = new Reporter(this.options["report"], this.options, dependencies, assembled);

            this.HeaderAndFooter(reporter);
            reporter.Link = "<a href=\"#section{0}\">{1}</a>";
            if (this.options["split"] != "false")
            {
                reporter.Link = string.Format("<a href=\"DeepEnds{{0}}{0}\">{{1}}</a>", System.IO.Path.GetExtension(this.options["report"]));
            }

            reporter.LinkExt            = "<a href=\"{0}\">{1}</a>";
            reporter.ListBegin          = "<ul>\n";
            reporter.ListEnd            = "</ul>\n";
            reporter.ListItem           = "<li>{0}</li>\n";
            reporter.ParagraphBegin     = "<p>";
            reporter.ParagraphEnd       = "</p>\n";
            reporter.RightArrow         = "&rarr;";
            reporter.SectionBegin       = "<h1><a id=\"section{0}\"></a>{1}</h1>\n";
            reporter.SubsectionBegin    = "<h2>{1}</h2>\n<div>\n";
            reporter.SubsectionEnd      = "</div>\n\n";
            reporter.SubSubsectionBegin = "<h3>{1}</h3>\n<div>\n";
            reporter.TableBegin         = "<table{0}>\n";
            reporter.TableEnd           = "</table>\n";
            reporter.TableBodyBegin     = "<tbody>\n";
            reporter.TableBodyEnd       = "</tbody>\n";
            reporter.TableBodyItem      = "<td{0}>{1}</td>\n";
            reporter.TableHeadBegin     = "<thead>\n";
            reporter.TableHeadEnd       = "</thead>\n";
            reporter.TableHeadItem      = "<th{0}{1}>{2}</th>\n";
            reporter.TableRowBegin      = "<tr{0}{1}>\n";
            reporter.TableRowEnd        = "</tr>\n";

            reporter.Report(false, false);
        }
Пример #2
0
        public void Write(DeepEnds.Core.Dependencies dependencies, DeepEnds.Reporting.Assemble assembled)
        {
            var reporter = new Reporter(this.options["report"], this.options, dependencies, assembled);

            reporter.Link = "{1}";
            if (this.options["split"] != "false")
            {
                reporter.Link = "[{1}](DeepEnds{0}.md)";
            }

            reporter.LinkExt            = "[{1}]({0})";
            reporter.ListItem           = "* {0}\n";
            reporter.ParagraphEnd       = "\n";
            reporter.SectionBegin       = "# {1}\n\n";
            reporter.SubsectionBegin    = "## {1}\n\n";
            reporter.SubsectionEnd      = "\n";
            reporter.SubSubsectionBegin = "### {1}\n\n";
            reporter.TableBodyItem      = "{1} |";
            reporter.TableDivItem       = "-";
            reporter.TableHeadItem      = "{2} |";
            reporter.TableRowBegin      = "| ";
            reporter.TableRowEnd        = "\n";

            reporter.Report(false, true);
        }
Пример #3
0
        public void Write(DeepEnds.Core.Dependencies dependencies, DeepEnds.Reporting.Assemble assembled)
        {
            var fileName = this.options["doxygen"];
            var reporter = new Reporter(this.options["doxygen"], this.options, dependencies, assembled);

            reporter.Link               = "\\ref DeepEnds{0}";
            reporter.LinkExt            = "<a href=\"{0}\">{1}</a>";
            reporter.LineBegin          = "//! ";
            reporter.ListItem           = "- {0}";
            reporter.RightArrow         = "&rarr;";
            reporter.SectionBegin       = "\\page DeepEnds{0} {1}";
            reporter.SubsectionBegin    = "\\section DeepEnds{0} {1}";
            reporter.SubSubsectionBegin = "\\subsection DeepEnds{0} {1}";
            reporter.TableBegin         = "<table>\n";
            reporter.TableEnd           = "</table>\n";
            reporter.TableBodyBegin     = "\n";
            reporter.TableBodyEnd       = "\n";
            reporter.TableBodyItem      = "<td{0}>{1} ";
            reporter.TableHeadBegin     = "\n";
            reporter.TableHeadEnd       = "\n";
            reporter.TableHeadItem      = "<th{1}>{2} ";
            reporter.TableRowBegin      = "<tr{1}>";
            reporter.TableRowEnd        = "\n";

            var cpp        = "*.dox;*.txt;*.doc;*.c;*.C;*.cc;*.CC;*.cxx;*.cpp;*.c++;*.ii;*.ixx;*.ipp;*.i++;*.inl;*.h;*.H;*.hh;*.HH;*.hxx;*.hpp;*.h++;*.mm;";
            var cs         = "*.cs;";
            var d          = "*.d;";
            var fortran    = "*.f;*.for;*.f90;*.f95;*.f03;*.f08;";
            var idl        = "*.idl;*.ddl;*.odl;";
            var java       = "*.java;";
            var objectiveC = "*.m;*.M;";
            var php        = "*.php;*.php4;*.php5;*.inc;*.phtml;";
            var python     = "*.py;*.pyw;";
            var tcl        = "*.tcl;";
            var vhdl       = "*.vhd;*.vhdl;*.ucf;*.qsf;";

            var ext = string.Format("*{0};", System.IO.Path.GetExtension(fileName));

            ext = ext.ToLower();
            if (fortran.Contains(ext))
            {
                reporter.FileHeader = "!>\n";
                reporter.LineBegin  = "!! ";
            }
            else if (python.Contains(ext) || tcl.Contains(ext))
            {
                reporter.FileHeader = "##\n";
                reporter.LineBegin  = "# ";
            }
            else if (vhdl.Contains(ext))
            {
                reporter.LineBegin = "--! ";
            }
            else if (cpp.Contains(ext) || cs.Contains(ext) || d.Contains(ext) || idl.Contains(ext) || java.Contains(ext) || objectiveC.Contains(ext) || php.Contains(ext))
            {
            }

            reporter.Report(true, false);
        }
Пример #4
0
        public void Write(DeepEnds.Core.Dependencies dependencies, DeepEnds.Reporting.Assemble assembled)
        {
            var reporter = new Reporter(this.options["csv"], this.options, dependencies, assembled);

            reporter.Link           = "\"{1}\"";
            reporter.LinkExt        = "\"{1}\"";
            reporter.TableBodyItem  = "{1},";
            reporter.TableHeadBegin = "# ";
            reporter.TableHeadItem  = "{2},";
            reporter.TableRowEnd    = "\n";

            reporter.TableOnly();
        }
Пример #5
0
        public Reporter(string filePath, Dictionary <string, string> options, DeepEnds.Core.Dependencies dependencies, DeepEnds.Reporting.Assemble assembled)
        {
            this.filePath     = filePath;
            this.file         = null;
            this.options      = options;
            this.dependencies = dependencies;
            this.assembled    = assembled;

            this.filePathTemplate = string.Empty;
            if (this.options["split"] != "false")
            {
                this.filePathTemplate = string.Format("{0}\\DeepEnds{{0}}{1}", System.IO.Path.GetDirectoryName(this.filePath), System.IO.Path.GetExtension(this.filePath));
            }

            this.FileHeader         = string.Empty;
            this.FileFooter         = string.Empty;
            this.LineBegin          = string.Empty;
            this.Link               = string.Empty;
            this.LinkExt            = string.Empty;
            this.ListBegin          = string.Empty;
            this.ListEnd            = string.Empty;
            this.ListItem           = string.Empty;
            this.RightArrow         = "->";
            this.ParagraphBegin     = string.Empty;
            this.ParagraphEnd       = string.Empty;
            this.SectionBegin       = string.Empty;
            this.SubsectionBegin    = string.Empty;
            this.SubsectionEnd      = string.Empty;
            this.SubSubsectionBegin = string.Empty;
            this.TableBegin         = string.Empty;
            this.TableEnd           = string.Empty;
            this.TableBodyBegin     = string.Empty;
            this.TableBodyEnd       = string.Empty;
            this.TableBodyItem      = string.Empty;
            this.TableDivItem       = string.Empty;
            this.TableHeadBegin     = string.Empty;
            this.TableHeadEnd       = string.Empty;
            this.TableHeadItem      = string.Empty;
            this.TableRowBegin      = string.Empty;
            this.TableRowEnd        = string.Empty;
        }