mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-13 01:20:24 +02:00
remove private classes
This commit is contained in:
35
docgen.sh
35
docgen.sh
@ -1,12 +1,35 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Generate docs.md
|
# Generate docs.md
|
||||||
# requires pydoc-markdown 4.5.0
|
# requires pydoc-markdown 4.5.0
|
||||||
|
readme_config=$(cat <<'EOF'
|
||||||
|
{
|
||||||
|
"processors": [
|
||||||
|
{
|
||||||
|
"type": "filter"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "pydocmd"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"renderer": {
|
||||||
|
"type": "markdown",
|
||||||
|
"header_level_by_type": {
|
||||||
|
"Module": 1,
|
||||||
|
"Class": 3,
|
||||||
|
"Method": 3,
|
||||||
|
"Function": 3,
|
||||||
|
"Data": 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
|
||||||
toc_config=$(cat <<'EOF'
|
toc_config=$(cat <<'EOF'
|
||||||
{
|
{
|
||||||
"processors": [
|
"processors": [
|
||||||
{
|
{
|
||||||
"type": "filter",
|
"type": "filter"
|
||||||
"expression":"not name ==\"info\" and default()"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "pydocmd"
|
"type": "pydocmd"
|
||||||
@ -27,12 +50,12 @@ toc_config=$(cat <<'EOF'
|
|||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
|
||||||
config=$(cat <<'EOF'
|
parser_config=$(cat <<'EOF'
|
||||||
{
|
{
|
||||||
"processors": [
|
"processors": [
|
||||||
{
|
{
|
||||||
"type": "filter",
|
"type": "filter",
|
||||||
"expression":"not name ==\"info\" and default()"
|
"expression": "not name == \"info\" and not name.startswith(\"_\") and default()"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "pydocmd"
|
"type": "pydocmd"
|
||||||
@ -54,7 +77,7 @@ EOF
|
|||||||
|
|
||||||
cd jc
|
cd jc
|
||||||
echo Building docs for: package
|
echo Building docs for: package
|
||||||
pydoc-markdown -m jc "${config}" > ../docs/readme.md
|
pydoc-markdown -m jc "${readme_config}" > ../docs/readme.md
|
||||||
|
|
||||||
echo Building docs for: lib
|
echo Building docs for: lib
|
||||||
pydoc-markdown -m jc.lib "${toc_config}" > ../docs/lib.md
|
pydoc-markdown -m jc.lib "${toc_config}" > ../docs/lib.md
|
||||||
@ -86,7 +109,7 @@ do
|
|||||||
|
|
||||||
echo "Building docs for: ${parser_name}"
|
echo "Building docs for: ${parser_name}"
|
||||||
echo "[Home](https://kellyjonbrazil.github.io/jc/)" > ../docs/parsers/"${parser_name}".md
|
echo "[Home](https://kellyjonbrazil.github.io/jc/)" > ../docs/parsers/"${parser_name}".md
|
||||||
pydoc-markdown -m jc.parsers."${parser_name}" "${config}" >> ../docs/parsers/"${parser_name}".md
|
pydoc-markdown -m jc.parsers."${parser_name}" "${parser_config}" >> ../docs/parsers/"${parser_name}".md
|
||||||
echo "### Parser Information" >> ../docs/parsers/"${parser_name}".md
|
echo "### Parser Information" >> ../docs/parsers/"${parser_name}".md
|
||||||
echo "Compatibility: ${compatible}" >> ../docs/parsers/"${parser_name}".md
|
echo "Compatibility: ${compatible}" >> ../docs/parsers/"${parser_name}".md
|
||||||
echo >> ../docs/parsers/"${parser_name}".md
|
echo >> ../docs/parsers/"${parser_name}".md
|
||||||
|
@ -191,100 +191,6 @@ Examples:
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
<a id="jc.parsers.ifconfig._IfconfigParser"></a>
|
|
||||||
|
|
||||||
### \_IfconfigParser Objects
|
|
||||||
|
|
||||||
```python
|
|
||||||
class _IfconfigParser(object)
|
|
||||||
```
|
|
||||||
|
|
||||||
ifconfig parser module written by threeheadedknight@protonmail.com
|
|
||||||
|
|
||||||
<a id="jc.parsers.ifconfig._IfconfigParser.__init__"></a>
|
|
||||||
|
|
||||||
### \_\_init\_\_
|
|
||||||
|
|
||||||
```python
|
|
||||||
def __init__(console_output)
|
|
||||||
```
|
|
||||||
|
|
||||||
:param console_output:
|
|
||||||
|
|
||||||
<a id="jc.parsers.ifconfig._IfconfigParser.list_interfaces"></a>
|
|
||||||
|
|
||||||
### list\_interfaces
|
|
||||||
|
|
||||||
```python
|
|
||||||
def list_interfaces()
|
|
||||||
```
|
|
||||||
|
|
||||||
:return:
|
|
||||||
|
|
||||||
<a id="jc.parsers.ifconfig._IfconfigParser.count_interfaces"></a>
|
|
||||||
|
|
||||||
### count\_interfaces
|
|
||||||
|
|
||||||
```python
|
|
||||||
def count_interfaces()
|
|
||||||
```
|
|
||||||
|
|
||||||
:return:
|
|
||||||
|
|
||||||
<a id="jc.parsers.ifconfig._IfconfigParser.filter_interfaces"></a>
|
|
||||||
|
|
||||||
### filter\_interfaces
|
|
||||||
|
|
||||||
```python
|
|
||||||
def filter_interfaces(**kwargs)
|
|
||||||
```
|
|
||||||
|
|
||||||
:param kwargs:
|
|
||||||
:return:
|
|
||||||
|
|
||||||
<a id="jc.parsers.ifconfig._IfconfigParser.get_interface"></a>
|
|
||||||
|
|
||||||
### get\_interface
|
|
||||||
|
|
||||||
```python
|
|
||||||
def get_interface(name)
|
|
||||||
```
|
|
||||||
|
|
||||||
:param name:
|
|
||||||
:return:
|
|
||||||
|
|
||||||
<a id="jc.parsers.ifconfig._IfconfigParser.get_interfaces"></a>
|
|
||||||
|
|
||||||
### get\_interfaces
|
|
||||||
|
|
||||||
```python
|
|
||||||
def get_interfaces()
|
|
||||||
```
|
|
||||||
|
|
||||||
:return:
|
|
||||||
|
|
||||||
<a id="jc.parsers.ifconfig._IfconfigParser.is_available"></a>
|
|
||||||
|
|
||||||
### is\_available
|
|
||||||
|
|
||||||
```python
|
|
||||||
def is_available(name)
|
|
||||||
```
|
|
||||||
|
|
||||||
:param name:
|
|
||||||
:return:
|
|
||||||
|
|
||||||
<a id="jc.parsers.ifconfig._IfconfigParser.parser"></a>
|
|
||||||
|
|
||||||
### parser
|
|
||||||
|
|
||||||
```python
|
|
||||||
def parser(source_data)
|
|
||||||
```
|
|
||||||
|
|
||||||
:param source_data:
|
|
||||||
:return:
|
|
||||||
|
|
||||||
<a id="jc.parsers.ifconfig.parse"></a>
|
<a id="jc.parsers.ifconfig.parse"></a>
|
||||||
|
|
||||||
### parse
|
### parse
|
||||||
|
@ -125,54 +125,6 @@ Examples:
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
<a id="jc.parsers.traceroute.__version__"></a>
|
|
||||||
|
|
||||||
### \_\_version\_\_
|
|
||||||
|
|
||||||
Copyright (C) 2015 Luis Benitez
|
|
||||||
|
|
||||||
Parses the output of a traceroute execution into an AST (Abstract Syntax Tree).
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2014 Luis Benitez
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
<a id="jc.parsers.traceroute._Hop"></a>
|
|
||||||
|
|
||||||
### \_Hop Objects
|
|
||||||
|
|
||||||
```python
|
|
||||||
class _Hop(object)
|
|
||||||
```
|
|
||||||
|
|
||||||
<a id="jc.parsers.traceroute._Hop.add_probe"></a>
|
|
||||||
|
|
||||||
### add\_probe
|
|
||||||
|
|
||||||
```python
|
|
||||||
def add_probe(probe)
|
|
||||||
```
|
|
||||||
|
|
||||||
Adds a Probe instance to this hop's results.
|
|
||||||
|
|
||||||
<a id="jc.parsers.traceroute.parse"></a>
|
<a id="jc.parsers.traceroute.parse"></a>
|
||||||
|
|
||||||
### parse
|
### parse
|
||||||
|
Reference in New Issue
Block a user