Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
homepage
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
homepage
Commits
98ed635c
Commit
98ed635c
authored
Apr 22, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a Documentation column
parent
208c6d8c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
10 deletions
+52
-10
build.py
R1/source/vmods/build.py
+27
-3
howto.rst
R1/source/vmods/howto.rst
+22
-5
vmod_cookie.json
R1/source/vmods/vmod_cookie.json
+3
-2
No files found.
R1/source/vmods/build.py
View file @
98ed635c
...
@@ -55,10 +55,34 @@ class vmod(object):
...
@@ -55,10 +55,34 @@ class vmod(object):
return
s
return
s
return
None
return
None
def
url_doc
(
self
,
rev
):
r
=
self
.
j
.
get
(
"rev"
)
if
r
!=
None
and
"url_doc"
in
r
[
rev
]:
return
r
[
rev
][
"url_doc"
]
g
=
self
.
j
.
get
(
"github"
)
if
g
!=
None
and
"doc_path"
in
g
:
s
=
"https://github.com/"
s
+=
g
[
"user"
]
+
"/"
s
+=
g
[
"project"
]
+
"/"
s
+=
"blob/"
s
+=
g
[
"branches"
][
rev
]
+
"/"
s
+=
g
[
"doc_path"
]
return
s
return
None
def
www_table
(
self
):
def
www_table
(
self
):
l
=
[]
l
=
[]
l
.
append
(
self
.
j
.
get
(
"name"
))
l
.
append
(
self
.
j
.
get
(
"name"
))
l
.
append
(
self
.
j
.
get
(
"desc"
))
l
.
append
(
self
.
j
.
get
(
"desc"
))
s
=
""
for
r
in
self
.
versions
():
doc
=
self
.
url_doc
(
r
)
if
doc
!=
None
:
s
+=
" `
%
s <
%
s>`_ "
%
(
r
,
doc
)
else
:
vcc
=
self
.
url_vcc
(
r
)
s
+=
" `
%
s <
%
s>`_ "
%
(
r
,
vcc
)
l
.
append
(
s
)
l
.
append
(
self
.
j
.
get
(
"license"
))
l
.
append
(
self
.
j
.
get
(
"license"
))
l
.
append
(
self
.
j
.
get
(
"status"
))
l
.
append
(
self
.
j
.
get
(
"status"
))
...
@@ -109,7 +133,7 @@ def make_www_table():
...
@@ -109,7 +133,7 @@ def make_www_table():
#######################################################################
#######################################################################
# Size columns
# Size columns
h
=
[
"VMOD"
,
"Description"
,
"License"
,
"Status"
,
"Link"
,
"VCC"
,
"Support"
]
h
=
[
"VMOD"
,
"Description"
,
"
Docs"
,
"
License"
,
"Status"
,
"Link"
,
"VCC"
,
"Support"
]
w
=
[
0
]
*
len
(
h
)
w
=
[
0
]
*
len
(
h
)
for
i
in
nms
:
for
i
in
nms
:
...
...
R1/source/vmods/howto.rst
View file @
98ed635c
...
@@ -41,7 +41,8 @@ desc
...
@@ -41,7 +41,8 @@ desc
~~~~
~~~~
Description, compact one-line description of what the VMOD does.
Description, compact one-line description of what the VMOD does.
(Don't repeat the VMOD name here)
(Don't repeat the VMOD name here, it looks silly in the table.)
license
license
~~~~~~~
~~~~~~~
...
@@ -100,6 +101,11 @@ vcc_path
...
@@ -100,6 +101,11 @@ vcc_path
Relative path to the VCC file for the VMOD
Relative path to the VCC file for the VMOD
doc_path
~~~~~~~~
Relative path of the file documenting the VMOD (default: the VCC file)
branches
branches
~~~~~~~~
~~~~~~~~
...
@@ -131,16 +137,24 @@ repos
...
@@ -131,16 +137,24 @@ repos
URL of the repository
URL of the repository
rev
rev
~~~
~~~
An object mapping Varnish version to URL where the VCC file can be found.
An object mapping Varnish version to URL where the VCC and documentation
files can be found.
For instance:
For instance:
"rev": {
"rev": {
"3.0": "http://myvmod.example.com/source/3.0/vmod.vcc",
"3.0": {
"4.1": "http://myvmod.example.com/source/4.1/vmod.vcc"
"url_vcc": "http://myvmod.example.com/source/3.0/vmod.vcc",
"url_doc": "http://myvmod.example.com/docs/3.0/vmod.txt"
},
"4.1": {
"url_vcc": "http://myvmod.example.com/source/4.1/vmod.vcc",
"url_doc": "http://myvmod.example.com/docs/4.1/vmod.txt"
}
}
}
Examples
Examples
...
@@ -159,6 +173,7 @@ A github project::
...
@@ -159,6 +173,7 @@ A github project::
"project": "libvmod-murphy-cal",
"project": "libvmod-murphy-cal",
"user": "ACME engineering",
"user": "ACME engineering",
"vcc_path": "src/vmod_murphy.vcc"
"vcc_path": "src/vmod_murphy.vcc"
"doc_path": "doc/vmod_murphy.rst"
},
},
"license": "FreeBSD",
"license": "FreeBSD",
"name": "murphy",
"name": "murphy",
...
@@ -175,9 +190,11 @@ A VMOD not on github::
...
@@ -175,9 +190,11 @@ A VMOD not on github::
"license": "BeerWare",
"license": "BeerWare",
"name": "Y2K",
"name": "Y2K",
"repos": "https://example.com/we/are/so/hosed",
"repos": "https://example.com/we/are/so/hosed",
"url_doc": "https://sales.example.com/QuantumMurphyCompensator",
"rev": {
"rev": {
"4.1": {
"4.1": {
"url_vcc": "https://example.com/we/are/so/hosed/vmod.vcc"
"url_vcc": "https://example.com/we/are/so/hosed/vmod.vcc",
"url_doc": "https://example.com/we/are/so/hosed/README"
}
}
},
},
"status": "prototype"
"status": "prototype"
...
...
R1/source/vmods/vmod_cookie.json
View file @
98ed635c
...
@@ -5,8 +5,9 @@
...
@@ -5,8 +5,9 @@
"branches"
:
{
"branches"
:
{
"4.1"
:
"master"
"4.1"
:
"master"
},
},
"project"
:
"libvmod-cookie"
,
"doc_path"
:
"docs/cookie.rst"
,
"user"
:
"lkarsten"
,
"project"
:
"varnish-modules"
,
"user"
:
"varnish"
,
"vcc_path"
:
"src/vmod_cookie.vcc"
"vcc_path"
:
"src/vmod_cookie.vcc"
},
},
"license"
:
"FreeBSD"
,
"license"
:
"FreeBSD"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment