mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 17:18:56 +00:00
build: improve COMMUNITY.md formatting
Add a render_md.py helper to convert it to HTML (needs python "markdown" module installed). Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
f6ee5b522c
commit
4765f35eb0
25
COMMUNITY.md
25
COMMUNITY.md
@ -1,10 +1,11 @@
|
|||||||
# Developing for PROJECT (DRAFT)
|
# Developing for PROJECT (DRAFT)
|
||||||
|
|
||||||
|
[TOC]
|
||||||
|
|
||||||
## Git Structure
|
## Git Structure
|
||||||
|
|
||||||
The master Git for PROJECT resides on Github at
|
The master Git for PROJECT resides on Github at
|
||||||
https://github.com/PROJECT/XXX
|
[https://github.com/PROJECT/XXX](https://github.com/PROJECT/XXX)
|
||||||
|
|
||||||
There are 3 main branches for development and a release branch for each
|
There are 3 main branches for development and a release branch for each
|
||||||
major release.
|
major release.
|
||||||
@ -39,8 +40,8 @@ preference on Markdown.
|
|||||||
|
|
||||||
## Before Submitting your changes
|
## Before Submitting your changes
|
||||||
|
|
||||||
* Format code (see Code Styling requirements)
|
* Format code (see [Code Styling requirements](#code-styling-requirements))
|
||||||
* Verify and acknowledge license (see License for contributions)
|
* Verify and acknowledge license (see [License for contributions](#license-for-contributions))
|
||||||
* Test building with various configurations:
|
* Test building with various configurations:
|
||||||
* `buildtest.sh`
|
* `buildtest.sh`
|
||||||
* Verify building source distribution:
|
* Verify building source distribution:
|
||||||
@ -118,7 +119,7 @@ website](http://www.linuxfoundation.org/content/how-participate-linux-community-
|
|||||||
to be a helpful resource.
|
to be a helpful resource.
|
||||||
|
|
||||||
|
|
||||||
#### Code submission - Github Pull Request (Strongly Preferred)
|
### Code submission - Github Pull Request (Strongly Preferred)
|
||||||
|
|
||||||
Preferred submission of code is by using a Github Pull Request against the
|
Preferred submission of code is by using a Github Pull Request against the
|
||||||
Develop branch. Code submitted by Pull Request will have an email generated to
|
Develop branch. Code submitted by Pull Request will have an email generated to
|
||||||
@ -133,7 +134,7 @@ Further (manual) code review and discussion happens after the merge into the
|
|||||||
develop branch.
|
develop branch.
|
||||||
|
|
||||||
|
|
||||||
#### Code submission - Mailing Patch to PROJECT-Devel list
|
### Code submission - Mailing Patch to PROJECT-Devel list
|
||||||
|
|
||||||
As an alternative submission, a patch can be mailed to the PROJECT-Devel
|
As an alternative submission, a patch can be mailed to the PROJECT-Devel
|
||||||
mailing list. Preferred way to send the patch is using git send-mail. Patches
|
mailing list. Preferred way to send the patch is using git send-mail. Patches
|
||||||
@ -144,7 +145,7 @@ the patch is then merged into the develop branch.
|
|||||||
Further (manual) code review and discussion happens after the merge into the
|
Further (manual) code review and discussion happens after the merge into the
|
||||||
develop branch.
|
develop branch.
|
||||||
|
|
||||||
Sending patch to mailing list
|
#### Sending patch to mailing list
|
||||||
|
|
||||||
The recommended way to send the patch (or series of NN patches) to the list is
|
The recommended way to send the patch (or series of NN patches) to the list is
|
||||||
by using ‘git send-email’ as follows (assuming they are the most recent NN
|
by using ‘git send-email’ as follows (assuming they are the most recent NN
|
||||||
@ -172,8 +173,9 @@ and will allow your changes to merge faster
|
|||||||
* You should automatically receive an email with the test results within
|
* You should automatically receive an email with the test results within
|
||||||
less than 2 hrs of the submission. If you don’t get the email, then check
|
less than 2 hrs of the submission. If you don’t get the email, then check
|
||||||
status on the github pull request (if submitted by pull request) or on
|
status on the github pull request (if submitted by pull request) or on
|
||||||
Patchwork at https://patchwork.PROJECT.org (if submitted as patch to
|
Patchwork at
|
||||||
mailing list).
|
[https://patchwork.PROJECT.org](https://patchwork.PROJECT.org) (if
|
||||||
|
submitted as patch to mailing list).
|
||||||
* Please notify PROJECT-Devel mailing list if you think something doesn’t
|
* Please notify PROJECT-Devel mailing list if you think something doesn’t
|
||||||
work
|
work
|
||||||
* If the tests failed:
|
* If the tests failed:
|
||||||
@ -202,8 +204,9 @@ and will allow your changes to merge faster
|
|||||||
|
|
||||||
### File header required for new files added
|
### File header required for new files added
|
||||||
|
|
||||||
New files need to have a Copyright header (see License for contributions above)
|
New files need to have a Copyright header (see [License for
|
||||||
added to the file. Preferred form of the header is as follows:
|
contributions](#license-for-contributions) above) added to the file. Preferred
|
||||||
|
form of the header is as follows:
|
||||||
|
|
||||||
```
|
```
|
||||||
/*
|
/*
|
||||||
@ -225,6 +228,8 @@ added to the file. Preferred form of the header is as follows:
|
|||||||
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||||
MA 02110-1301 USA
|
MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <zebra.h>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Adding Copyright claims to already existing file
|
### Adding Copyright claims to already existing file
|
||||||
|
24
render_md.py
Normal file
24
render_md.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# written 2016 by David Lamparter, placed in Public Domain.
|
||||||
|
import sys, markdown
|
||||||
|
|
||||||
|
template = '''<html><head><meta charset="UTF-8"><style type="text/css">
|
||||||
|
body { max-width: 45em; margin: auto; margin-top: 2em; margin-bottom: 2em;
|
||||||
|
font-family:Fira Sans,sans-serif; text-align: justify; }
|
||||||
|
pre, code { font-family:Fira Mono,monospace; }
|
||||||
|
pre > code { display: block; padding:0.5em; border:1px solid black;
|
||||||
|
background-color:#eee; color:#000; }
|
||||||
|
h2 { margin-top: 3em; text-decoration: underline; }
|
||||||
|
h3 { margin-top: 2em; font-weight: normal; font-style: italic; }
|
||||||
|
h4 { font-weight: normal; font-style: italic; }
|
||||||
|
</style></head><body>
|
||||||
|
%s
|
||||||
|
</body></html>
|
||||||
|
'''
|
||||||
|
|
||||||
|
md = markdown.Markdown(extensions=['extra', 'toc'])
|
||||||
|
|
||||||
|
for fn in sys.argv[1:]:
|
||||||
|
with open(fn, 'r') as ifd:
|
||||||
|
with open('%s.html' % (fn), 'w') as ofd:
|
||||||
|
ofd.write((template % (md.convert(ifd.read().decode('UTF-8')))).encode('UTF-8'))
|
Loading…
Reference in New Issue
Block a user