Removes JavaDocToMarkdownConverter
diff --git a/src/docs/DocumentationTools.sln b/src/docs/DocumentationTools.sln
index 7db4ea9..cf8208b 100644
--- a/src/docs/DocumentationTools.sln
+++ b/src/docs/DocumentationTools.sln
@@ -20,8 +20,6 @@
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LuceneDocsPlugins", "LuceneDocsPlugins\LuceneDocsPlugins.csproj", "{D5D1C256-4A5A-4C57-949D-E9A1FFB6A5D1}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JavaDocToMarkdownConverter", "JavaDocToMarkdownConverter\JavaDocToMarkdownConverter.csproj", "{874179E7-FDA4-4E5B-9F86-54917BB6F74F}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Info", "Info", "{D0D177C8-D797-4850-AB75-E91E3126761C}"
ProjectSection(SolutionItems) = preProject
convert.ps1 = convert.ps1
@@ -38,10 +36,6 @@
{D5D1C256-4A5A-4C57-949D-E9A1FFB6A5D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5D1C256-4A5A-4C57-949D-E9A1FFB6A5D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5D1C256-4A5A-4C57-949D-E9A1FFB6A5D1}.Release|Any CPU.Build.0 = Release|Any CPU
- {874179E7-FDA4-4E5B-9F86-54917BB6F74F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {874179E7-FDA4-4E5B-9F86-54917BB6F74F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {874179E7-FDA4-4E5B-9F86-54917BB6F74F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {874179E7-FDA4-4E5B-9F86-54917BB6F74F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/src/docs/JavaDocToMarkdownConverter/App.config b/src/docs/JavaDocToMarkdownConverter/App.config
deleted file mode 100644
index 1b44f2e..0000000
--- a/src/docs/JavaDocToMarkdownConverter/App.config
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<configuration>
- <startup>
- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
- </startup>
- <runtime>
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <dependentAssembly>
- <assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-1.5.0.0" newVersion="1.5.0.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
- </dependentAssembly>
- </assemblyBinding>
- </runtime>
-</configuration>
diff --git a/src/docs/JavaDocToMarkdownConverter/CustomMarkdownScheme.cs b/src/docs/JavaDocToMarkdownConverter/CustomMarkdownScheme.cs
deleted file mode 100644
index 315f360..0000000
--- a/src/docs/JavaDocToMarkdownConverter/CustomMarkdownScheme.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements. See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using Html2Markdown.Replacement;
-using Html2Markdown.Scheme;
-using JavaDocToMarkdownConverter.Formatters;
-using System.Collections.Generic;
-using System.Text.RegularExpressions;
-
-namespace JavaDocToMarkdownConverter
-{
- /// <summary>
- /// Custom markdown conversion scheme
- /// </summary>
- /// <remarks>
- /// This uses the original replacers but substitues our own for a few things and adds a lot of custom replacers.
- /// </remarks>
- public class CustomMarkdownScheme : IScheme
- {
- public CustomMarkdownScheme(params IReplacer[] additionalReplacers)
- {
- _replacers = new Markdown().Replacers(); //originals
- _replacers.RemoveAt(0); //this is the 'strong' one
- _replacers.RemoveAt(0); //this is the 'em' one
- _replacers.Insert(0, new PatternReplacer(new Regex("</?(strong|b)>"), "__")); //re-insert with underscore syntax
- _replacers.Insert(0, new PatternReplacer(new Regex("</?(em|i)>"), "_")); //re-insert with underscore syntax
-
- //TODO: Find out why lists aren't parsed nicely, see https://github.com/baynezy/Html2Markdown/blob/690e1f6b9cbcba2333acfef68c05795d698040ad/src/Html2Markdown/Replacement/HtmlParser.cs
- // http://localhost:8080/api/Lucene.Net/Lucene.Net.Search.Spans.html
- // source: C:\Users\Shannon\Documents\_Projects\Lucene.Net\lucene-solr-releases-lucene-solr-4.8.0\lucene\core\src\java\org\apache\lucene\search\spans\package.html
-
- _replacers.Add(new CodeLinkReplacer());
- _replacers.Add(new RepoLinkReplacer());
- _replacers.Add(new DocTypeReplacer());
- _replacers.Add(new ExtraHtmlElementReplacer());
- _replacers.Add(new NamedAnchorLinkReplacer());
- _replacers.Add(new DivWrapperReplacer());
-
- foreach(var replacer in additionalReplacers)
- _replacers.Add(replacer);
- }
-
- private readonly IList<IReplacer> _replacers;
-
- public IList<IReplacer> Replacers() => _replacers;
- }
-}
diff --git a/src/docs/JavaDocToMarkdownConverter/DocConverter.cs b/src/docs/JavaDocToMarkdownConverter/DocConverter.cs
deleted file mode 100644
index d07227e..0000000
--- a/src/docs/JavaDocToMarkdownConverter/DocConverter.cs
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements. See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-using Html2Markdown;
-using JavaDocToMarkdownConverter.Formatters;
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
-
-namespace JavaDocToMarkdownConverter
-{
-
- public class DocConverter
- {
-
- public DocConverter()
- {
- _defaultConverter = new Converter(new CustomMarkdownScheme());
- }
-
- private readonly Converter _defaultConverter;
-
- /// <summary>
- ///
- /// </summary>
- /// <param name="inputDirectory">The /lucene directory in the Java source code.</param>
- /// <param name="rootOutputDirectory">The root directory of the Lucene.Net repository.</param>
- public void Convert(string inputDirectory, string rootOutputDirectory)
- {
- var dir = new DirectoryInfo(inputDirectory);
- if (!dir.Exists)
- {
- Console.WriteLine("Directory Doesn't Exist: '" + dir.FullName + "'");
- return;
- }
-
- foreach (var file in dir.EnumerateFiles("overview.html", SearchOption.AllDirectories))
- {
- ConvertDoc(file.FullName, rootOutputDirectory);
- }
- foreach (var file in dir.EnumerateFiles("package.html", SearchOption.AllDirectories))
- {
- ConvertDoc(file.FullName, rootOutputDirectory);
- }
- }
-
- private void ConvertDoc(string inputDoc, string rootOutputDirectory)
- {
- var outputDir = GetOutputDirectory(inputDoc, rootOutputDirectory);
- var outputFile = Path.Combine(outputDir, GetOuputFilename(inputDoc));
- var inputFileInfo = new FileInfo(inputDoc);
-
- if (!Directory.Exists(outputDir))
- {
- Console.WriteLine("Output Directory Doesn't Exist: '" + outputDir + "'");
- return;
- }
- if (!inputFileInfo.Exists)
- {
- Console.WriteLine("Input File Doesn't Exist: '" + inputDoc + "'");
- return;
- }
-
- var ns = ExtractNamespaceFromFile(outputFile);
-
- // we might need to convert this namespace to an explicit value
- if (PackageNamespaceToStandalone.TryGetValue(ns, out var standaloneNs))
- ns = standaloneNs;
-
- // get the MD converter for the namespace
- var converter = _defaultConverter;
- if (CustomConverters.TryGetValue(ns, out var customConverter))
- converter = customConverter;
-
- var markdown = converter.ConvertFile(inputDoc);
-
- if (JavaDocFormatters.CustomReplacers.TryGetValue(ns, out var replacers))
- {
- foreach (var r in replacers)
- markdown = r.Replace(markdown);
- }
-
- var doc = new ConvertedDocument(inputFileInfo, new FileInfo(outputFile), ns, markdown);
- if (JavaDocFormatters.CustomProcessors.TryGetValue(ns, out var processor))
- {
- processor(doc);
- }
- markdown = doc.Markdown; // it may have changed
-
- var fileContent = AppendYamlHeader(ns, markdown);
-
- File.WriteAllText(outputFile, fileContent, Encoding.UTF8);
- }
-
- /// <summary>
- /// Custom markdown converters for certain namespaces
- /// </summary>
- private static readonly Dictionary<string, Converter> CustomConverters = new Dictionary<string, Converter>(StringComparer.InvariantCultureIgnoreCase)
- {
- ["Lucene.Net.Benchmarks"] = new Converter(new CustomMarkdownScheme(new ElementWhitespacePrefixReplacer("div"))),
- ["Lucene.Net.Replicator"] = new Converter(new CustomMarkdownScheme(new AllWhitespacePrefixReplacer()))
- };
-
- /// <summary>
- /// Explicit mappings of namespaced package files to standalone files
- /// </summary>
- /// <remarks>
- /// This is really edge case stuff
- /// </remarks>
- private static readonly Dictionary<string, string> PackageNamespaceToStandalone = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase)
- {
- ["Lucene.Net.Search.Grouping"] = "Lucene.Net.Grouping",
- ["Lucene.Net.Memory"] = "Lucene.Net.Index.Memory",
- ["Lucene.Net.Queryparser"] = "Lucene.Net.QueryParser",
- ["Lucene.Net.Testframework"] = "Lucene.Net.TestFramework",
- ["Lucene.Net.Benchmark"] = "Lucene.Net.Benchmarks"
- };
-
- /// <summary>
- /// These aren't real namespaces but they have overview.md files and in this case we need to prepend an H1 header
- /// to the overview.md file.
- /// </summary>
- private static readonly List<string> StandaloneOverviews = new List<string>
- {
- "Lucene.Net",
- "Lucene.Net.Analysis.Common",
- "Lucene.Net.Analysis.Morfologik",
- "Lucene.Net.Highlighter",
- "Lucene.Net.Grouping",
- "Lucene.Net.QueryParser",
- "Lucene.Net.Sandbox",
- "Lucene.Net.Suggest",
- "Lucene.Net.TestFramework",
- "Lucene.Net.Benchmarks",
- };
-
- /// <summary>
- /// Appends the YAML front-matter header
- /// </summary>
- /// <param name="ns"></param>
- /// <param name="fileContent"></param>
- /// <returns></returns>
- private string AppendYamlHeader(string ns, string fileContent)
- {
- var sb = new StringBuilder();
- sb.AppendLine("---");
- sb.Append("uid: ");
- sb.AppendLine(ns);
-
- // Add "title" yaml front-matter if a standalone file
- if (StandaloneOverviews.Contains(ns))
- {
- sb.Append("title: ");
- sb.AppendLine(ns);
- }
-
- sb.AppendLine("summary: *content");
- sb.AppendLine("---");
- sb.AppendLine();
-
- return sb + fileContent;
- }
-
- private static Regex CSharpNamespaceMatch = new Regex(@"^\s*namespace\s*([\w\.]+)", RegexOptions.Multiline | RegexOptions.Compiled);
-
- /// <summary>
- /// Normally the files would be in the same folder name as their namespace but this isn't the case so we need to try to figure it out
- /// </summary>
- /// <param name="outputFile"></param>
- /// <returns></returns>
- private string ExtractNamespaceFromFile(string outputFile)
- {
- var folder = Path.GetDirectoryName(outputFile);
-
- // First check if there are c# files beside this file
- var csharpFiles = Directory.GetFiles(folder, "*.cs");
- if (csharpFiles.Length > 0)
- {
- // extract the namespace from a file
- var csharpFile = File.ReadAllText(csharpFiles[0]);
- var nsMatches = CSharpNamespaceMatch.Matches(csharpFile);
- if (nsMatches.Count > 0)
- {
- if (nsMatches[0].Groups.Count == 2)
- return nsMatches[0].Groups[1].Value;
- }
- }
-
- // Else we'll fall back to trying to determine namespace by folder
-
- var folderParts = folder.Split(Path.DirectorySeparatorChar);
-
- var index = folderParts.Length - 1;
- for (int i = index; i >= 0; i--)
- {
- if (folderParts[i].StartsWith("Lucene.Net", StringComparison.InvariantCultureIgnoreCase))
- {
- index = i;
- break;
- }
- }
-
- var nsParts = new List<string>();
- for (var i = index; i < folderParts.Length; i++)
- {
- var innerParts = folderParts[i].Split('.');
- foreach (var innerPart in innerParts)
- {
- nsParts.Add(innerPart);
- }
- }
-
- var textInfo = new CultureInfo("en-US", false).TextInfo;
- return string.Join(".", nsParts.Select(x => textInfo.ToTitleCase(x)).ToArray());
- }
-
-
- private string GetOuputFilename(string inputDoc)
- {
- return Path.GetFileNameWithoutExtension(inputDoc) + ".md";
- }
-
- private string GetOutputDirectory(string inputDoc, string rootOutputDirectory)
- {
- string project = Path.Combine(rootOutputDirectory, @"src\Lucene.Net");
- var file = new FileInfo(inputDoc);
- var dir = file.Directory.FullName;
- var segments = dir.Split(Path.DirectorySeparatorChar);
- int i;
- bool inLucene = false;
- string lastSegment = string.Empty;
- for (i = 0; i < segments.Length; i++)
- {
- var segment = segments[i];
- if (segment.Equals("lucene"))
- {
- inLucene = true;
- continue;
- }
- if (!inLucene)
- continue;
- if (segment.Equals("core"))
- break;
- project += "." + segment;
- lastSegment = segment;
-
- if (segment.Equals("analysis"))
- continue;
- break;
- }
-
- //if (project.EndsWith("analysis.icu", StringComparison.OrdinalIgnoreCase))
- //{
- // project = project.Replace("Lucene.Net.analysis.icu", @"dotnet\Lucene.Net.ICU");
- //}
-
- if (project.EndsWith("test-framework", StringComparison.OrdinalIgnoreCase))
- {
- project = project.Replace("test-framework", "TestFramework");
- }
-
- // Now we have the project directory and segment that it equates to.
- // We need to walk up the tree and ignore the java-ish deep directories.
- var ignore = new List<string>() { "src", "java", "org", "apache", "lucene" };
- string path = project;
-
- for (int j = i + 1; j < segments.Length; j++)
- {
- var segment = segments[j];
- if (ignore.Contains(segment))
- {
- continue;
- }
-
- // Special Cases
- switch (lastSegment.ToLower())
- {
- case "morfologik":
- if (segment.Equals("analysis")) continue;
- if (segment.Equals("morfologik")) continue;
- break;
- case "stempel":
- if (segment.Equals("analysis")) continue;
- if (segment.Equals("egothor")) segment = "Egothor.Stemmer";
- if (segment.Equals("stemmer")) continue;
- break;
- case "kuromoji":
- if (segment.Equals("analysis") || segment.Equals("ja")) continue;
- break;
- case "phonetic":
- if (segment.Equals("analysis") || segment.Equals("phonetic")) continue;
- break;
- case "smartcn":
- if (segment.Equals("analysis") || segment.Equals("cn") || segment.Equals("smart")) continue;
- break;
- case "benchmark":
- if (segment.Equals("benchmark")) continue;
- break;
- case "classification":
- if (segment.Equals("classification")) continue;
- break;
- case "codecs":
- if (segment.Equals("codecs")) continue;
- break;
- case "demo":
- if (segment.Equals("demo")) continue;
- break;
- case "expressions":
- if (segment.Equals("expressions")) continue;
- break;
- case "facet":
- if (segment.Equals("facet")) continue;
- break;
- case "grouping":
- if (segment.Equals("search") || segment.Equals("grouping")) continue;
- break;
- case "highlighter":
- if (segment.Equals("search")) continue;
- break;
- case "join":
- if (segment.Equals("search") || segment.Equals("join")) continue;
- break;
- case "memory":
- if (segment.Equals("index") || segment.Equals("memory")) continue;
- break;
- case "queries":
- if (segment.Equals("queries")) continue;
- if (segment.Equals("valuesource")) segment = "ValueSources";
- break;
- case "queryparser":
- if (segment.Equals("queryparser")) continue;
- break;
- case "replicator":
- if (segment.Equals("replicator")) continue;
- break;
- case "sandbox":
- if (segment.Equals("sandbox")) continue;
- break;
- case "spatial":
- if (segment.Equals("spatial")) continue;
- break;
- case "suggest":
- if (segment.Equals("search")) continue;
- break;
- }
-
- path = Path.Combine(path, segment);
- }
-
- return path;
- }
- }
-}
diff --git a/src/docs/JavaDocToMarkdownConverter/Formatters/AllWhitespacePrefixReplacer.cs b/src/docs/JavaDocToMarkdownConverter/Formatters/AllWhitespacePrefixReplacer.cs
deleted file mode 100644
index 439a3df..0000000
--- a/src/docs/JavaDocToMarkdownConverter/Formatters/AllWhitespacePrefixReplacer.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Html2Markdown.Replacement;
-using System.Text;
-
-namespace JavaDocToMarkdownConverter.Formatters
-{
- public class AllWhitespacePrefixReplacer : IReplacer
- {
-
- public string Replace(string html)
- {
- var sb = new StringBuilder();
-
- var txt = html;
-
- //replace with linux line breaks
- txt = txt.Replace("\r\n", "\n");
-
- var trim = true;
- var inComment = false;
-
- foreach (var line in txt.Split('\n'))
- {
- // don't trim if the first char is a special char
- // '<' = probably start of another html element
- // '*' or '-' = probably start of a list item
- // ##. = a number with a dot is probably start of a list item
- // once we encounter one of these we stop trimming.
-
- if (trim)
- {
- var trimmed = line.Trim();
- if (!string.IsNullOrEmpty(trimmed))
- {
- if (trimmed.StartsWith("<!--"))
- {
- inComment = true;
- sb.AppendLine(line);
- continue;
- }
-
- if (trimmed.StartsWith("-->"))
- {
- inComment = false;
- sb.AppendLine(line);
- continue;
- }
-
- if (inComment)
- {
- sb.AppendLine(line);
- continue;
- };
-
- switch (trimmed[0])
- {
- case '<':
- case '*':
- case '-':
- trim = false;
- break;
- case var firstChar when char.IsDigit(firstChar) && trimmed.Length > 1 && trimmed[1] == '.':
- trim = false;
- break;
- }
- }
- sb.AppendLine(trim ? trimmed : line);
- }
- else
- {
- sb.AppendLine(line);
- }
- }
-
- return sb.ToString();
- }
- }
-}
diff --git a/src/docs/JavaDocToMarkdownConverter/Formatters/CodeExtractor.cs b/src/docs/JavaDocToMarkdownConverter/Formatters/CodeExtractor.cs
deleted file mode 100644
index 34653fe..0000000
--- a/src/docs/JavaDocToMarkdownConverter/Formatters/CodeExtractor.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using System;
-using System.IO;
-using System.Text.RegularExpressions;
-
-namespace JavaDocToMarkdownConverter.Formatters
-{
- /// <summary>
- /// Used to extract the code from a *.cs file while ignoring license headers, etc...
- /// </summary>
- public static class CodeExtractor
- {
- private const string Start = "using ";
- private const string End = "}";
- private static readonly Regex Ns = new Regex(@"^namespace\s+?([\w\.\s]+?)\s", RegexOptions.Compiled | RegexOptions.Multiline);
- private static readonly Regex Class = new Regex(@"public class\s+?([\w\.\s]+?)\s", RegexOptions.Compiled | RegexOptions.Multiline);
-
- public static string ExtractCode(FileInfo inputDoc)
- {
- var content = File.ReadAllText(inputDoc.FullName);
- var start = content.IndexOf(Start);
- var end = content.LastIndexOf(End);
- var code = content.Substring(start, (end - start) + 1);
-
- return code;
- }
-
- public static string ExtractNamespace(string code)
- {
- var ns = Ns.Match(code).Groups[1].Value.Trim();
- if (string.IsNullOrWhiteSpace(ns)) throw new InvalidOperationException("Could not detect namespace");
- return ns;
- }
-
- public static string ExtractClassName(string code)
- {
- var c = Class.Match(code).Groups[1].Value.Trim();
- if (string.IsNullOrWhiteSpace(c)) throw new InvalidOperationException("Could not detect class");
- return c;
- }
- }
-}
diff --git a/src/docs/JavaDocToMarkdownConverter/Formatters/CodeLinkReplacer.cs b/src/docs/JavaDocToMarkdownConverter/Formatters/CodeLinkReplacer.cs
deleted file mode 100644
index a20ddc6..0000000
--- a/src/docs/JavaDocToMarkdownConverter/Formatters/CodeLinkReplacer.cs
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Html2Markdown.Replacement;
-using System.Globalization;
-using System.Text.RegularExpressions;
-
-namespace JavaDocToMarkdownConverter.Formatters
-{
-
- //TODO: This could instead be done with the LuceneDocsPlugins and our custom markdown parsing
-
- public class CodeLinkReplacer : IReplacer
- {
- private static readonly Regex LinkRegex = new Regex(@"{@link\s*?(?<cref>org\.apache\.lucene\.[\w\.]*)\s?(?<text>[^}]*)}", RegexOptions.Compiled);
- private static readonly Regex JavaCodeExtension = new Regex(@".java$", RegexOptions.Compiled);
-
- public string Replace(string html)
- {
- return ReplaceCodeLinks(html);
- }
-
- private string ReplaceCodeLinks(string markdown)
- {
- Match link = LinkRegex.Match(markdown);
- if (link.Success)
- {
- do
- {
- string cref = link.Groups["cref"].Value.CorrectCRef();
- string newLink;
-
- //see https://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html?tabs=tabid-1%2Ctabid-a#cross-reference
- //for xref syntax support
-
- var text = link.Groups["text"].Value;
-
- if (HasLinkText(text, cref, out var methodName, out var methodLink))
- {
- if (string.IsNullOrWhiteSpace(methodName))
- {
- //string linkText = link.Groups[2].Value;
- var linkText = JavaCodeExtension.Replace(text, ".cs");
- newLink = "[" + linkText + "](xref:" + cref + ")";
- }
- else
- {
- newLink = "[" + methodName + "](xref:" + cref + "#" + methodLink + ")";
- }
- }
- else
- {
- newLink = "<xref:" + cref + ">";
- }
-
- markdown = LinkRegex.Replace(markdown, newLink, 1);
-
-
- } while ((link = LinkRegex.Match(markdown)).Success);
- }
-
- return markdown;
- }
-
- private bool HasLinkText(string text, string cref, out string methodName, out string link)
- {
- methodName = null;
- link = null;
- if (!string.IsNullOrWhiteSpace(text))
- {
- if (text.Contains("#"))
- {
- var lastSpace = text.LastIndexOf(' ');
- if (lastSpace >= 0)
- {
- methodName = text.Substring(lastSpace + 1);
- var lastBracket = methodName.LastIndexOf('(');
- if (lastBracket >= 0)
- methodName = methodName.Substring(0, lastBracket);
- if (char.IsLower(methodName[0]))
- methodName = char.ToUpper(methodName[0]) + methodName.Substring(1);
-
- link = text.Substring(1, lastSpace - 1).CorrectCRef();
- if (char.IsLower(link[0]))
- link = char.ToUpper(link[0]) + link.Substring(1);
-
- //the method link needs to be in a full namespace format but delimited by _
- //HOWEVER, there's no way we can make this work because the lucene parameters are simple like `iterator` but
- //the docfx method links require fully qualified types like System_Collections_Generic_IEnumerable_Lucene_Net_Index_IIndexableField
- //and we don't have that information to extract. The best we can do is just deep link to the #methods of the class.
- //link = $"{string.Join("_", cref.Split('.'))}_{methodName}";
-
- link = "methods";
- }
- }
- return true;
- }
- return false;
- }
- }
-}
diff --git a/src/docs/JavaDocToMarkdownConverter/Formatters/ConvertedDocument.cs b/src/docs/JavaDocToMarkdownConverter/Formatters/ConvertedDocument.cs
deleted file mode 100644
index d927cf5..0000000
--- a/src/docs/JavaDocToMarkdownConverter/Formatters/ConvertedDocument.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using System;
-using System.IO;
-
-namespace JavaDocToMarkdownConverter.Formatters
-{
- public class ConvertedDocument
- {
- public ConvertedDocument(FileInfo inputFile, FileInfo outputFile, string @namespace, string markdown)
- {
- InputFile = inputFile ?? throw new ArgumentNullException(nameof(inputFile));
- OutputFile = outputFile ?? throw new ArgumentNullException(nameof(outputFile));
- Namespace = @namespace ?? throw new ArgumentNullException(nameof(@namespace));
- Markdown = markdown ?? throw new ArgumentNullException(nameof(markdown));
- }
-
- public FileInfo InputFile { get; }
- public FileInfo OutputFile { get; }
- public string Namespace { get; }
- public string Markdown { get; set; }
- }
-}
diff --git a/src/docs/JavaDocToMarkdownConverter/Formatters/DemoCodeFormatter.cs b/src/docs/JavaDocToMarkdownConverter/Formatters/DemoCodeFormatter.cs
deleted file mode 100644
index 77a73e3..0000000
--- a/src/docs/JavaDocToMarkdownConverter/Formatters/DemoCodeFormatter.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using System;
-using System.IO;
-using System.Linq;
-using System.Text;
-
-namespace JavaDocToMarkdownConverter.Formatters
-{
- public class DemoCodeFormatter
- {
- public static void ProcessDemoFiles(ConvertedDocument convertedDoc)
- {
- //custom processor for processing the Demo *.cs files so that when the docs build the csharp is visible directly in the docs without requiring
- //to navigate to the GitHub source. This is done by extracting just the code part of the *.cs files and creating docfx override files for those
- //classes.
-
- var demoCsFolder = convertedDoc.OutputFile.Directory;
- var apiDocsFolder = Path.Combine(demoCsFolder.Parent.Parent.FullName, "websites\\apidocs");
- if (!Directory.Exists(apiDocsFolder))
- throw new InvalidOperationException($"The folder {apiDocsFolder} does not exist");
- var apiSpecFolder = Path.Combine(apiDocsFolder, "apiSpec");
- Directory.CreateDirectory(apiSpecFolder);
- foreach (var folder in demoCsFolder.EnumerateDirectories().Where(x => x.Name != "Properties" && x.Name != "obj" && x.Name != "bin"))
- {
- foreach (var file in folder.EnumerateFiles("*.cs"))
- {
- var code = CodeExtractor.ExtractCode(file);
- var ns = CodeExtractor.ExtractNamespace(code);
- var c = CodeExtractor.ExtractClassName(code);
- var type = $"{ns}.{c}";
- //naming is based on a docfx convention - not a strict convention but we might as well be consistent
- var overrideFileName = $"{ns.Replace(".", "_")}_{c}.md";
- File.WriteAllText(Path.Combine(apiSpecFolder, overrideFileName), AppendYamlHeader(type, code));
- }
- }
-
- }
-
- private static string AppendYamlHeader(string typeName, string fileContent)
- {
- var sb = new StringBuilder();
- sb.AppendLine("---");
- sb.Append("uid: ");
- sb.AppendLine(typeName);
- // This is special syntax to denote an 'array' of strings since that is what the 'example' metadata requires,
- // see:https://dotnet.github.io/docfx/tutorial/intro_overwrite_files.html#managed-reference-model
- // This syntax doesn't seem to be documented anywhere except in the issue tracker
- // see https://github.com/dotnet/docfx/issues/375#issuecomment-225407949
- // see https://github.com/dotnet/docfx/issues/1685#issuecomment-303644744
- sb.AppendLine("example: [*content]");
- //sb.Append("summary: ");
- //sb.AppendLine(summary);
- sb.AppendLine("---");
- sb.AppendLine();
- sb.AppendLine("```");
- sb.AppendLine(fileContent);
- sb.AppendLine("```");
-
- return sb.ToString();
- }
- }
-}
diff --git a/src/docs/JavaDocToMarkdownConverter/Formatters/DivWrapperReplacer.cs b/src/docs/JavaDocToMarkdownConverter/Formatters/DivWrapperReplacer.cs
deleted file mode 100644
index 8338521..0000000
--- a/src/docs/JavaDocToMarkdownConverter/Formatters/DivWrapperReplacer.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Html2Markdown.Replacement;
-using System.Text.RegularExpressions;
-
-namespace JavaDocToMarkdownConverter.Formatters
-{
-
- public class DivWrapperReplacer : IReplacer
- {
- private static readonly Regex TocArea = new Regex(@"<div id=""minitoc-area"">(.*?)</div>", RegexOptions.Compiled | RegexOptions.Singleline);
- private static readonly Regex SectionArea = new Regex(@"<div class=""section"">(.*?)</div>", RegexOptions.Compiled | RegexOptions.Singleline);
-
- public string Replace(string html)
- {
- foreach(var r in new[] { TocArea , SectionArea })
- {
- html = r.Replace(html, "$1");
- }
- return html;
- }
- }
-}
diff --git a/src/docs/JavaDocToMarkdownConverter/Formatters/DocTypeReplacer.cs b/src/docs/JavaDocToMarkdownConverter/Formatters/DocTypeReplacer.cs
deleted file mode 100644
index 7e75dcc..0000000
--- a/src/docs/JavaDocToMarkdownConverter/Formatters/DocTypeReplacer.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Html2Markdown.Replacement;
-using System.Text.RegularExpressions;
-
-namespace JavaDocToMarkdownConverter.Formatters
-{
-
- public class DocTypeReplacer : IReplacer
- {
- private static readonly Regex DocType = new Regex(@"<!doctype[^>]*>", RegexOptions.Compiled);
-
- public string Replace(string html)
- {
- return DocType.Replace(html, string.Empty);
-
- }
- }
-}
diff --git a/src/docs/JavaDocToMarkdownConverter/Formatters/ElementWhitespacePrefixReplacer.cs b/src/docs/JavaDocToMarkdownConverter/Formatters/ElementWhitespacePrefixReplacer.cs
deleted file mode 100644
index e27a303..0000000
--- a/src/docs/JavaDocToMarkdownConverter/Formatters/ElementWhitespacePrefixReplacer.cs
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Html2Markdown.Replacement;
-using System.Text;
-using System.Text.RegularExpressions;
-
-namespace JavaDocToMarkdownConverter.Formatters
-{
- /// <summary>
- /// Custom replacer to deal with prefixed whitespace text on each line within an element
- /// </summary>
- /// <remarks>
- /// Custom replacer to deal with odd cases, such as when there is this:
- /// <div>
- /// Blah blah
- /// Hello world
- /// </div>
- /// Which will end up being rendered as <pre><code> because it's left indented (even though it shouldn't since a div should be rendered as a div).
- /// So this is a work around.
- /// </remarks>
- public class ElementWhitespacePrefixReplacer : IReplacer
- {
- public ElementWhitespacePrefixReplacer(string elementName)
- {
- elementMatch = new Regex($@"<{elementName}>(.*?)</{elementName}>", RegexOptions.Compiled | RegexOptions.Singleline); ;
- }
- private readonly Regex elementMatch;
-
- public string Replace(string html)
- {
- var result = elementMatch.Replace(html, match =>
- {
- var sb = new StringBuilder();
-
- var txt = match.Groups[1].Value;
-
- //replace with linux line breaks
- txt = txt.Replace("\r\n", "\n");
-
- var trim = true;
-
- foreach (var line in txt.Split('\n'))
- {
- // don't trim if the first char is a special char
- // '<' = probably start of another html element
- // '*' or '-' = probably start of a list item
- // ##. = a number with a dot is probably start of a list item
- // once we encounter one of these we stop trimming.
-
- if (trim)
- {
- var trimmed = line.Trim();
- if (!string.IsNullOrEmpty(trimmed))
- {
- switch (trimmed[0])
- {
- case '<':
- case '*':
- case '-':
- trim = false;
- break;
- case var firstChar when char.IsDigit(firstChar) && trimmed.Length > 1 && trimmed[1] == '.':
- trim = false;
- break;
- }
- }
- sb.AppendLine(trim ? trimmed : line);
- }
- else
- {
- sb.AppendLine(line);
- }
- }
-
- return sb.ToString();
-
- });
-
- return result;
- }
- }
-}
diff --git a/src/docs/JavaDocToMarkdownConverter/Formatters/ExtraHtmlElementReplacer.cs b/src/docs/JavaDocToMarkdownConverter/Formatters/ExtraHtmlElementReplacer.cs
deleted file mode 100644
index 120fab4..0000000
--- a/src/docs/JavaDocToMarkdownConverter/Formatters/ExtraHtmlElementReplacer.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Html2Markdown.Replacement;
-using System.Text.RegularExpressions;
-
-namespace JavaDocToMarkdownConverter.Formatters
-{
-
- /// <summary>
- /// For some reason the normal markdown converter doesn't get a few html elements so this removes those
- /// </summary>
- public class ExtraHtmlElementReplacer : IReplacer
- {
- private static readonly Regex MetaTag = new Regex(@"<meta\s+.*?>", RegexOptions.Compiled | RegexOptions.IgnoreCase);
- private static readonly Regex TitleTag = new Regex(@"<title>.*?</title>", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase);
- private static readonly Regex HeadTag = new Regex(@"<head>.*?</head>", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.IgnoreCase);
- private static readonly Regex BodyStart = new Regex(@"<body>", RegexOptions.Compiled | RegexOptions.IgnoreCase);
- private static readonly Regex BodyEnd = new Regex(@"</body>", RegexOptions.Compiled | RegexOptions.IgnoreCase);
- private static readonly Regex HtmlStart = new Regex(@"<html>", RegexOptions.Compiled | RegexOptions.IgnoreCase);
- private static readonly Regex HtmlEnd = new Regex(@"</html>", RegexOptions.Compiled | RegexOptions.IgnoreCase);
-
- public string Replace(string html)
- {
- foreach(var r in new[] { MetaTag, TitleTag, HeadTag,BodyStart, BodyEnd, HtmlStart, HtmlEnd })
- {
- html = r.Replace(html, string.Empty);
- }
-
- return html;
-
-
- //var htmlDoc = new HtmlDocument();
- //using (var input = new StringReader(html))
- //{
- // htmlDoc.Load(input);
- //}
-
- //foreach(var e in HtmlElements)
- //{
- // RemoveElements(htmlDoc, e);
- //}
-
- //var sb = new StringBuilder();
- //using (var output = new StringWriter(sb))
- //{
- // htmlDoc.Save(output);
- //}
- //return sb.ToString();
- }
-
- //private void RemoveElements(HtmlDocument htmlDoc, string elementMatch)
- //{
- // var metaTags = htmlDoc.DocumentNode.SelectNodes(elementMatch);
- // if (metaTags == null) return;
- // foreach (var m in metaTags)
- // {
- // m.ParentNode.RemoveChild(m);
- // }
- //}
- }
-}
diff --git a/src/docs/JavaDocToMarkdownConverter/Formatters/JavaDocFormatters.cs b/src/docs/JavaDocToMarkdownConverter/Formatters/JavaDocFormatters.cs
deleted file mode 100644
index 7ec61ce..0000000
--- a/src/docs/JavaDocToMarkdownConverter/Formatters/JavaDocFormatters.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Html2Markdown.Replacement;
-using System;
-using System.Collections.Generic;
-using System.Text.RegularExpressions;
-
-namespace JavaDocToMarkdownConverter.Formatters
-{
-
- public class JavaDocFormatters
- {
-
-
- /// <summary>
- /// A list of custom replacers for specific uid files
- /// </summary>
- /// <remarks>The Key is the Namespace</remarks>
- public static IDictionary<string, IReplacer[]> CustomReplacers => new Dictionary<string, IReplacer[]>(StringComparer.InvariantCultureIgnoreCase)
- {
- ["Lucene.Net"] = new IReplacer[]
- {
- new PatternReplacer(new Regex("To demonstrate these, try something like:.*$", RegexOptions.Singleline))
- },
- ["Lucene.Net.Demo"] = new IReplacer[]
- {
- new PatternReplacer(new Regex("(## Setting your CLASSPATH.*?)(##)", RegexOptions.Singleline), "$2"),
- new PatternReplacer(new Regex(@"\*\s+?\[.+?CLASSPATH\].+?$", RegexOptions.Multiline)),
- new PatternReplacer(new Regex(@"\[IndexFiles.*?\]\(.+?\)", RegexOptions.Singleline), "[IndexFiles](xref:Lucene.Net.Demo.IndexFiles)"),
- new PatternReplacer(new Regex(@"\[SearchFiles.*?\]\(.+?\)", RegexOptions.Singleline), "[SearchFiles](xref:Lucene.Net.Demo.SearchFiles)")
- },
- };
-
- /// <summary>
- /// A list of custom processors for specific uid files
- /// </summary>
- /// <remarks>The Key is the Namespace</remarks>
- public static IDictionary<string, Action<ConvertedDocument>> CustomProcessors => new Dictionary<string, Action<ConvertedDocument>>(StringComparer.InvariantCultureIgnoreCase)
- {
- ["Lucene.Net.Demo"] = DemoCodeFormatter.ProcessDemoFiles,
- };
- }
-}
diff --git a/src/docs/JavaDocToMarkdownConverter/Formatters/NamedAnchorLinkReplacer.cs b/src/docs/JavaDocToMarkdownConverter/Formatters/NamedAnchorLinkReplacer.cs
deleted file mode 100644
index dd49066..0000000
--- a/src/docs/JavaDocToMarkdownConverter/Formatters/NamedAnchorLinkReplacer.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Html2Markdown.Replacement;
-using System.Text.RegularExpressions;
-
-namespace JavaDocToMarkdownConverter.Formatters
-{
- /// <summary>
- /// Replaces named anchors like [About this Document](#About_this_Document) to [About this Document](#about-this-document)
- /// </summary>
- public class NamedAnchorLinkReplacer : IReplacer
- {
- private static readonly Regex NamedAnchorLink = new Regex(@"\[([\w\s]+)\]\(#([\w_]+)\)", RegexOptions.Compiled);
-
-
- public string Replace(string html)
- {
- html = NamedAnchorLink.Replace(html, m => $"[{m.Groups[1].Value}](#{m.Groups[2].Value.ToLowerInvariant().Replace("_", "-")})");
- return html;
- }
- }
-}
diff --git a/src/docs/JavaDocToMarkdownConverter/Formatters/PatternReplacer.cs b/src/docs/JavaDocToMarkdownConverter/Formatters/PatternReplacer.cs
deleted file mode 100644
index 9d79fef..0000000
--- a/src/docs/JavaDocToMarkdownConverter/Formatters/PatternReplacer.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Html2Markdown.Replacement;
-using System.Text.RegularExpressions;
-
-namespace JavaDocToMarkdownConverter.Formatters
-{
- public class PatternReplacer : IReplacer
- {
- private readonly Regex pattern;
- private readonly string replacement;
-
- public PatternReplacer(Regex pattern, string replacement = null)
- {
- this.pattern = pattern;
- this.replacement = replacement;
- }
-
- public string Replace(string html)
- {
- return pattern.Replace(html, replacement ?? string.Empty);
- }
- }
-}
diff --git a/src/docs/JavaDocToMarkdownConverter/Formatters/RepoLinkReplacer.cs b/src/docs/JavaDocToMarkdownConverter/Formatters/RepoLinkReplacer.cs
deleted file mode 100644
index 1ccd5c5..0000000
--- a/src/docs/JavaDocToMarkdownConverter/Formatters/RepoLinkReplacer.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using Html2Markdown.Replacement;
-using System.Text.RegularExpressions;
-
-namespace JavaDocToMarkdownConverter.Formatters
-{
-
- //TODO: This could instead be done with the LuceneDocsPlugins and our custom markdown parsing
- //TODO: We need to pass in a tag here
-
- public class RepoLinkReplacer : IReplacer
- {
- private static readonly Regex RepoLinkRegex = new Regex(@"(?<=\()(?<cref>src-html/[^)]*)", RegexOptions.Compiled);
-
- public string Replace(string html)
- {
- return ReplaceRepoLinks(html);
- }
-
- //https://github.com/apache/lucenenet/blob/Lucene.Net_4_8_0_beta00004/src/Lucene.Net.Analysis.Common/Analysis/Ar/ArabicAnalyzer.cs
- private string ReplaceRepoLinks(string markdown)
- {
- Match link = RepoLinkRegex.Match(markdown);
- if (link.Success)
- {
- do
- {
- string cref = link.Groups["cref"].Value.CorrectRepoCRef();
- cref = "https://github.com/apache/lucenenet/blob/{tag}/src/" + cref;
-
- markdown = RepoLinkRegex.Replace(markdown, cref, 1);
-
-
- } while ((link = RepoLinkRegex.Match(markdown)).Success);
- }
-
- return markdown;
- }
- }
-}
diff --git a/src/docs/JavaDocToMarkdownConverter/JavaDocToMarkdownConverter.csproj b/src/docs/JavaDocToMarkdownConverter/JavaDocToMarkdownConverter.csproj
deleted file mode 100644
index e7df396..0000000
--- a/src/docs/JavaDocToMarkdownConverter/JavaDocToMarkdownConverter.csproj
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup Label="Assembly Signing">
- <!-- Ensure this doesn't inherit the strong naming since this tool will no work with a signed assembly due to it's references -->
- <AssemblyOriginatorKeyFile>
- </AssemblyOriginatorKeyFile>
- <AssemblyOriginatorKeyFile>
- </AssemblyOriginatorKeyFile>
- </PropertyGroup>
- <PropertyGroup>
- <LangVersion>7.3</LangVersion>
- </PropertyGroup>
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{874179E7-FDA4-4E5B-9F86-54917BB6F74F}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <RootNamespace>JavaDocToMarkdownConverter</RootNamespace>
- <AssemblyName>JavaDocToMarkdownConverter</AssemblyName>
- <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
- <TargetFrameworkProfile />
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.ComponentModel.Composition" />
- <Reference Include="System.Core" />
- <Reference Include="System.IO.Compression.FileSystem" />
- <Reference Include="System.Numerics" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="CustomMarkdownScheme.cs" />
- <Compile Include="Formatters\AllWhitespacePrefixReplacer.cs" />
- <Compile Include="Formatters\CodeExtractor.cs" />
- <Compile Include="Formatters\CodeLinkReplacer.cs" />
- <Compile Include="DocConverter.cs" />
- <Compile Include="Formatters\ConvertedDocument.cs" />
- <Compile Include="Formatters\DemoCodeFormatter.cs" />
- <Compile Include="Formatters\DivWrapperReplacer.cs" />
- <Compile Include="Formatters\DocTypeReplacer.cs" />
- <Compile Include="Formatters\ExtraHtmlElementReplacer.cs" />
- <Compile Include="Formatters\JavaDocFormatters.cs" />
- <Compile Include="Formatters\NamedAnchorLinkReplacer.cs" />
- <Compile Include="Formatters\PatternReplacer.cs" />
- <Compile Include="Formatters\RepoLinkReplacer.cs" />
- <Compile Include="Formatters\ElementWhitespacePrefixReplacer.cs" />
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="StringExtensions.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="App.config" />
- </ItemGroup>
- <ItemGroup>
- <PackageReference Include="Html2Markdown">
- <Version>3.2.3.392</Version>
- </PackageReference>
- <PackageReference Include="NETStandard.Library">
- <Version>1.6.1</Version>
- </PackageReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-</Project>
\ No newline at end of file
diff --git a/src/docs/JavaDocToMarkdownConverter/Program.cs b/src/docs/JavaDocToMarkdownConverter/Program.cs
deleted file mode 100644
index 1d23665..0000000
--- a/src/docs/JavaDocToMarkdownConverter/Program.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using System;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace JavaDocToMarkdownConverter
-{
-
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
- class Program
- {
- static void Main(string[] args)
- {
- if (args == null || args.Length < 2)
- {
- Usage();
- return;
- }
-
- Console.WriteLine(string.Format("Converting '{0}' to '{1}'...", args[0], args[1]));
-
- //new DocConverter().ConvertDoc(@"F:\Projects\_Test\lucene-solr-4.8.0\lucene\demo\src\java\overview.html", @"F:\Projects\lucenenet\");
- new DocConverter().Convert(args[0], args[1]);
-
- Console.WriteLine("Conversion complete!");
-
-#if DEBUG
- Console.ReadKey();
-#endif
- }
-
- private static void Usage()
- {
- Console.WriteLine("Usage: JavaDocToMarkdownConverter[.exe] <LUCENE DIRECTORY> <LUCENENET DIRECTORY>");
- Console.WriteLine();
- Console.WriteLine(" Arguments:");
- Console.WriteLine(@" LUCENE DIRECTORY: The root directory of the lucene project to convert (excluding SOLR). Example: F:\lucene-solr-4.8.0\lucene\");
- Console.WriteLine(@" LUCENENET DIRECTORY: The root directory of Lucene.Net. Example: F:\Projects\lucenenet\");
- }
- }
-}
diff --git a/src/docs/JavaDocToMarkdownConverter/Properties/AssemblyInfo.cs b/src/docs/JavaDocToMarkdownConverter/Properties/AssemblyInfo.cs
deleted file mode 100644
index b261498..0000000
--- a/src/docs/JavaDocToMarkdownConverter/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("JavaDocToMarkdownConverter")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("JavaDocToMarkdownConverter")]
-[assembly: AssemblyCopyright("Copyright © 2017")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("874179e7-fda4-4e5b-9f86-54917bb6f74f")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/docs/JavaDocToMarkdownConverter/StringExtensions.cs b/src/docs/JavaDocToMarkdownConverter/StringExtensions.cs
deleted file mode 100644
index 0ee2ade..0000000
--- a/src/docs/JavaDocToMarkdownConverter/StringExtensions.cs
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
-
-namespace JavaDocToMarkdownConverter
-{
- public static class StringExtensions
- {
- public static string CorrectCRef(this string cref)
- {
- var caseCorrected = CorrectCRefCase(cref);
- var temp = caseCorrected.Replace("org.Apache.Lucene.", "Lucene.Net.");
- foreach (var item in namespaceCorrections)
- {
- temp = temp.Replace(item.Key, item.Value);
- }
-
-
- //TODO: Not sure if this is necessary? The # delimits a method name and we already take care of that
- int index = temp.IndexOf('#');
- if (index > -1)
- {
- var sb = new StringBuilder(temp);
- // special case - capitalize char after #
- sb[index + 1] = char.ToUpperInvariant(sb[index + 1]);
- // special case - replace Java # with .
- temp = sb.ToString().Replace('#', '.');
- }
-
- return temp;
- }
-
- public static string CorrectCRefCase(this string cref)
- {
- var sb = new StringBuilder(cref);
- for (int i = 0; i < sb.Length - 1; i++)
- {
- if (sb[i] == '.')
- sb[i + 1] = char.ToUpper(sb[i + 1]);
- }
- return sb.ToString();
- }
-
- public static string CorrectRepoCRef(this string cref)
- {
- string temp = cref;
- if (temp.StartsWith("src-html"))
- {
- temp = temp.Replace("src-html/", "");
- }
-
- temp = temp.Replace("/", ".");
- temp = temp.Replace(".html", ".cs");
-
- var segments = temp.Split('.');
-
- if (temp.StartsWith("analysis"))
- {
- string project;
- if (packageToProjectName.TryGetValue(segments[3] + "." + segments[4], out project))
- temp = project + "/" + string.Join("/", segments.Skip(5).ToArray());
- }
- else
- {
- string project;
- if (packageToProjectName.TryGetValue(segments[3], out project))
- temp = project + "/" + string.Join("/", segments.Skip(4).ToArray());
- }
-
- temp = CorrectCRefCase(temp);
- foreach (var item in namespaceCorrections)
- {
- if (!item.Key.StartsWith("Lucene.Net"))
- temp = temp.Replace(item.Key, item.Value);
- }
-
- temp = Regex.Replace(temp, "/[Cc]s", ".cs");
-
- return temp;
- }
-
- private static readonly IDictionary<string, string> packageToProjectName = new Dictionary<string, string>()
- {
- { "analysis.common" , "Lucene.Net.Analysis.Common"},
- { "analysis.icu" , "Lucene.Net.Analysis.ICU"},
- { "analysis.kuromoji" , "Lucene.Net.Analysis.Kuromoji"},
-
- { "analysis.morfologik" , "Lucene.Net.Analysis.Morfologik"},
- { "analysis.phonetic" , "Lucene.Net.Analysis.Phonetic"},
- { "analysis.smartcn" , "Lucene.Net.Analysis.SmartCn"},
- { "analysis.stempel" , "Lucene.Net.Analysis.Stempel"},
-
- // Not ported
- //{ "analysis.uima" , "Lucene.Net.Analysis.UIMA"},
- { "benchmark" , "Lucene.Net.Benchmark"},
- { "classification" , "Lucene.Net.Classification"},
- { "codecs" , "Lucene.Net.Codecs"},
- { "core" , "Lucene.Net"},
- { "demo" , "Lucene.Net.Demo"},
- { "expressions" , "Lucene.Net.Expressions"},
- { "facet" , "Lucene.Net.Facet"},
- { "grouping" , "Lucene.Net.Grouping"},
- { "highlighter" , "Lucene.Net.Highlighter"},
- { "join" , "Lucene.Net.Join"},
- { "memory" , "Lucene.Net.Memory"},
- { "misc" , "Lucene.Net.Misc"},
- { "queries" , "Lucene.Net.Queries"},
- { "queryparser" , "Lucene.Net.QueryParser"},
- { "replicator" , "Lucene.Net.Replicator"},
- { "sandbox" , "Lucene.Net.Sandbox"},
- { "spatial" , "Lucene.Net.Spatial"},
- { "suggest" , "Lucene.Net.Suggest"},
- { "test-framework" , "Lucene.Net.TestFramework"},
- };
-
- private static readonly IDictionary<string, string> namespaceCorrections = new Dictionary<string, string>()
- {
- { "Lucene.Net.Document", "Lucene.Net.Documents" },
- { "Lucene.Net.Benchmark", "Lucene.Net.Benchmarks" },
- { "Lucene.Net.Queryparser", "Lucene.Net.QueryParsers" },
- { "Lucene.Net.Search.Join", "Lucene.Net.Join" },
- { "Lucene.Net.Search.Grouping", "Lucene.Net.Grouping" },
- { ".Tokenattributes", ".TokenAttributes" },
- { ".Charfilter", ".CharFilter" },
- { ".Commongrams", ".CommonGrams" },
- { ".Ngram", ".NGram" },
- { ".Hhmm", ".HHMM" },
- { ".Blockterms", ".BlockTerms" },
- { ".Diskdv", ".DiskDV" },
- { ".Intblock", ".IntBlock" },
- { ".Simpletext", ".SimpleText" },
- { ".Postingshighlight", ".PostingsHighlight" },
- { ".Vectorhighlight", ".VectorHighlight" },
- { ".Complexphrase", ".ComplexPhrase" },
- { ".Valuesource", ".ValueSources" },
- };
- }
-}
diff --git a/src/docs/convert.ps1 b/src/docs/convert.ps1
index dd55e61..d590659 100644
--- a/src/docs/convert.ps1
+++ b/src/docs/convert.ps1
@@ -1,4 +1,4 @@
-# -----------------------------------------------------------------------------------
+# -----------------------------------------------------------------------------------
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@@ -23,6 +23,9 @@
$JavaLuceneVersion
)
+# TODO: Convert this script to use the https://github.com/NightOwl888/lucenenet-javadoc2markdown CLI
+# See https://github.com/apache/lucenenet/issues/396#issuecomment-734417702
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$PSScriptFilePath = (Get-Item $MyInvocation.MyCommand.Path).Directory
diff --git a/src/docs/readme.md b/src/docs/readme.md
index eed80b5..f250683 100644
--- a/src/docs/readme.md
+++ b/src/docs/readme.md
@@ -1,15 +1,4 @@
-# Documentation Tools
-
-## JavaDocToMarkdownConverter
-
-This is a utility that is executed against the Java Lucene source to convert their documentation files into markdown documentation files that we can
-use to build the Lucene.Net documentation suite.
-
-This utility does a lot of edge case work to try to automatically convert as much as possible from the Java Lucene repo into something usable for our project.
-
-The source that this is executed against is this tag: https://github.com/apache/lucene-solr/releases/tag/releases%2Flucene-solr%2F4.8.1
-
-See docs: https://lucenenet.apache.org/contributing/documentation.html#api-docs
+# Documentation Tools
## LuceneDocsPlugins