aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2021-08-19 11:38:06 +0200
committerDave Wallace <dwallacelf@gmail.com>2021-10-13 23:22:32 +0000
commit9ad39c026c8a3c945a7003c4aa4f5cb1d4c80160 (patch)
tree3cca19635417e28ae381d67ae31c75df2925032d /src/scripts
parentf47122e07e1ecd0151902a3cabe46c60a99bee8e (diff)
docs: better docs, mv doxygen to sphinx
This patch refactors the VPP sphinx docs in order to make it easier to consume for external readers as well as VPP developers. It also makes sphinx the single source of documentation, which simplifies maintenance and operation. Most important updates are: - reformat the existing documentation as rst - split RELEASE.md and move it into separate rst files - remove section 'events' - remove section 'archive' - remove section 'related projects' - remove section 'feature by release' - remove section 'Various links' - make (Configuration reference, CLI docs, developer docs) top level items in the list - move 'Use Cases' as part of 'About VPP' - move 'Troubleshooting' as part of 'Getting Started' - move test framework docs into 'Developer Documentation' - add a 'Contributing' section for gerrit, docs and other contributer related infos - deprecate doxygen and test-docs targets - redirect the "make doxygen" target to "make docs" Type: refactor Change-Id: I552a5645d5b7964d547f99b1336e2ac24e7c209f Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src/scripts')
-rwxr-xr-xsrc/scripts/fts.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/scripts/fts.py b/src/scripts/fts.py
index b579190e433..f2b877fb2c7 100755
--- a/src/scripts/fts.py
+++ b/src/scripts/fts.py
@@ -2,6 +2,7 @@
import sys
import os
+import os.path
import ipaddress
import yaml
from pprint import pprint
@@ -10,6 +11,7 @@ from jsonschema import validate, exceptions
import argparse
from subprocess import run, PIPE
from io import StringIO
+import urllib.parse
# VPP feature JSON schema
schema = {
@@ -55,6 +57,7 @@ schema = {
},
}
+DEFAULT_REPO_LINK = "https://github.com/FDio/vpp/blob/master/"
def filelist_from_git_status():
filelist = []
@@ -122,8 +125,6 @@ class MarkDown():
def print_markdown_header(self, o):
write = self.stream.write
write('## {o}\n'.format(o=o))
- version = version_from_git()
- write('VPP version: {version}\n\n'.format(version=version))
_dispatch['markdown_header'] = print_markdown_header
def print_name(self, o):
@@ -167,7 +168,7 @@ class MarkDown():
def output_toc(toc, stream):
write = stream.write
- write('## VPP Feature list:\n')
+ write('# VPP Supported Features\n')
for t in toc:
ref = t.lower().replace(' ', '-')
@@ -189,13 +190,12 @@ def featurelistsort(k):
}
return orderedfields[k[0]]
-def output_markdown(features, fields, notfields):
+def output_markdown(features, fields, notfields, repository_url):
stream = StringIO()
m = MarkDown(stream)
m.print('markdown_header', 'Feature Details:')
for path, featuredef in sorted(features.items(), key=featuresort):
- codeurl = 'https://git.fd.io/vpp/tree/src/' + \
- '/'.join(os.path.normpath(path).split('/')[1:-1])
+ codeurl = urllib.parse.urljoin(repository_url, os.path.dirname(path))
featuredef['code'] = codeurl
for k, v in sorted(featuredef.items(), key=featurelistsort):
if notfields:
@@ -215,6 +215,9 @@ def main():
parser = argparse.ArgumentParser(description='VPP Feature List.')
parser.add_argument('--validate', dest='validate', action='store_true',
help='validate the FEATURE.yaml file')
+ parser.add_argument("--repolink", metavar="repolink", default=DEFAULT_REPO_LINK,
+ help="Link to public repository [%s]" %
+ DEFAULT_REPO_LINK)
parser.add_argument('--git-status', dest='git_status', action='store_true',
help='Get filelist from git status')
parser.add_argument('--all', dest='all', action='store_true',
@@ -261,7 +264,7 @@ def main():
if args.markdown:
stream = StringIO()
- tocstream, stream = output_markdown(features, fields, notfields)
+ tocstream, stream = output_markdown(features, fields, notfields, args.repolink)
print(tocstream.getvalue())
print(stream.getvalue())
stream.close()