fix:
9
build.py
|
|
@ -36,6 +36,11 @@ if __name__ == "__main__":
|
|||
has_foxyproxy = False
|
||||
has_namespace = False
|
||||
rougailconfig['main_namespace'] = None
|
||||
if Path('types').is_dir():
|
||||
has_types = True
|
||||
rougailconfig['types'] = [str(d) for d in Path('types').iterdir()]
|
||||
else:
|
||||
has_types = False
|
||||
# rougailconfig['tiramisu_cache'] = "cache.py"
|
||||
if Path('mode').is_file():
|
||||
rougailconfig['modes_level'] = ['basic', 'standard', 'advanced']
|
||||
|
|
@ -113,6 +118,8 @@ if __name__ == "__main__":
|
|||
CMD += "-s Firefox "
|
||||
if has_foxyproxy:
|
||||
CMD += "-xn FoxyProxy -xd 0 foxyproxy/ "
|
||||
if has_types:
|
||||
CMD += "--types " + " ".join(rougailconfig["types"]) + " "
|
||||
if has_mode:
|
||||
CMD += "--modes_level basic standard advanced "
|
||||
if inv_doc:
|
||||
|
|
@ -127,7 +134,7 @@ if __name__ == "__main__":
|
|||
inv_doc = inventory.run()[1]
|
||||
if inv_doc:
|
||||
doc += inv_formatter.title("Let's generate the changelog", 3)
|
||||
cmd = CMD + "-o doc --doc.contents changelog"
|
||||
cmd = CMD + "-o doc --doc.contents changelog --doc.changelog.previous_json_file previous.yml"
|
||||
doc += f'```shell\n{cmd}\n```\n'
|
||||
doc += inv_doc + "\n"
|
||||
doc += "***\n"
|
||||
|
|
|
|||
13
build.sh
|
|
@ -54,7 +54,7 @@ for i in $(ls -d "examples"/* | sort); do
|
|||
base_url_doc=$(cat $i/URL)
|
||||
fi
|
||||
if [ -f "$i/TITLE.md" ]; then
|
||||
echo "- [$(head -n 1 $i/TITLE.md)]($base_url_doc)" >> summary.md
|
||||
echo "- $(head -n 1 $i/TITLE.md) ([doc]($base_url_doc))" >> summary.md
|
||||
fi
|
||||
if [ -f "$i/SUBTITLE.md" ]; then
|
||||
echo " - $(head -n 1 $i/SUBTITLE.md)" >> summary.md
|
||||
|
|
@ -66,7 +66,7 @@ for i in $(ls -d "examples"/* | sort); do
|
|||
commit_id="v${VERSION}_$num"
|
||||
title=$(head -n 1 $i/README.md)
|
||||
summary="[tutorial $commit_id] $title"
|
||||
url_doc="$base_url_doc#$(echo $title | tr A-Z a-z | sed 's/ /-/g' | sed 's/’/-/g')"
|
||||
url_doc="$base_url_doc#$(echo $title | tr A-Z a-z | sed 's/ /-/g' | sed 's/’/-/g' | sed 's/\"//g')"
|
||||
diff_url="https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/${commit_id}~1..$commit_id"
|
||||
echo " - [$summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/$commit_id/README.md) ([doc]($url_doc) - [diff]($diff_url))" >> summary.md
|
||||
cp "summary_total.md" "$DEST"
|
||||
|
|
@ -83,6 +83,12 @@ for i in $(ls -d "examples"/* | sort); do
|
|||
cp -v "$j" "$DEST/$j"
|
||||
done
|
||||
fi
|
||||
if [ -d ../types ]; then
|
||||
mkdir -p $DEST/types
|
||||
for j in $(ls -d ../types/* 2>/dev/null); do
|
||||
cp -va "$j" "$DEST/types/"
|
||||
done
|
||||
fi
|
||||
cd $DEST
|
||||
tree -H $TUTO_ROOT/$commit_id/ -P "*.yml" > tree.html
|
||||
cd - > /dev/null
|
||||
|
|
@ -140,6 +146,9 @@ for i in $(ls -d "examples"/* | sort); do
|
|||
fi
|
||||
cd - > /dev/null
|
||||
# old_commit_id="$commit_id"
|
||||
# echo "pouet $i"
|
||||
# [ "$i" = "examples/120" ] && exit 1
|
||||
if [ -f previous.yml ]; then cp -a previous.yml previous_old.yml; fi
|
||||
fi
|
||||
done
|
||||
cd "$DEST"
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
A variable with type's parameters
|
||||
A variable with type’s parameters
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/calculated.html
|
||||
https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/properties.html
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
A conditional disabled variable with type web_address
|
||||
HTTP Proxy with "proxy" type
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
A web_address variable
|
||||
Custom type
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
We cannot configure "auto" if "proxy_mode" is not "Automatic proxy configuration URL".
|
||||
If "use_for_https" is false, HTTPS variables are visible in read only mode and in read write mode.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +1,9 @@
|
|||
---
|
||||
auto: https://auto.proxy.net/wpad.dat
|
||||
proxy_mode: Manual proxy configuration
|
||||
manual:
|
||||
http_proxy:
|
||||
address: http.proxy.net
|
||||
port: 3128
|
||||
use_for_https: false
|
||||
https_proxy:
|
||||
address: https.proxy.net
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
---
|
||||
proxy_mode: Automatic proxy configuration URL
|
||||
14
examples/080/structural_files/firefox/10-manual.yml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
version: 1.1
|
||||
|
||||
manual:
|
||||
description: Manual proxy configuration
|
||||
disabled:
|
||||
variable: _.proxy_mode
|
||||
when_not: Manual proxy configuration
|
||||
|
||||
http_proxy:
|
||||
description: HTTP Proxy
|
||||
type: proxy
|
||||
...
|
||||
17
examples/080/types/proxy/00_type.yml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
version: 1.1
|
||||
|
||||
proxy:
|
||||
|
||||
address:
|
||||
description: Proxy address
|
||||
type: domainname
|
||||
params:
|
||||
allow_ip: true
|
||||
|
||||
port:
|
||||
description: Proxy port
|
||||
type: port
|
||||
default: 8080
|
||||
...
|
||||
1
examples/081/README.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
HTTPS and SOCKS Proxy
|
||||
2
examples/081/config/01/README.md
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
If "use_for_https" is false, HTTPS variables are visible in read only mode and in read write mode.
|
||||
|
||||
9
examples/081/config/01/config.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
proxy_mode: Manual proxy configuration
|
||||
manual:
|
||||
http_proxy:
|
||||
address: http.proxy.net
|
||||
port: 3128
|
||||
use_for_https: false
|
||||
https_proxy:
|
||||
address: https.proxy.net
|
||||
33
examples/081/structural_files/firefox/20-manual.yml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
version: 1.1
|
||||
|
||||
manual:
|
||||
|
||||
use_for_https: true # Also use this proxy for HTTPS
|
||||
|
||||
https_proxy:
|
||||
description: HTTPS Proxy
|
||||
type: proxy
|
||||
hidden:
|
||||
variable: _.use_for_https
|
||||
|
||||
address:
|
||||
default:
|
||||
variable: __.http_proxy.address
|
||||
|
||||
port:
|
||||
default:
|
||||
variable: __.http_proxy.port
|
||||
|
||||
socks_proxy:
|
||||
description: SOCKS Proxy
|
||||
type: proxy
|
||||
|
||||
version:
|
||||
description: SOCKS host version used by proxy
|
||||
choices:
|
||||
- v4
|
||||
- v5
|
||||
default: v5
|
||||
...
|
||||
|
|
@ -1 +1 @@
|
|||
A conditional disabled variable with type domainname and parameters
|
||||
A conditional disabled variable with type web_address
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
A full documented variable with multiple values and not mandatory
|
||||
A web_address variable
|
||||
|
|
|
|||
1
examples/090/config/01/README.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
We cannot configure "auto" if "proxy_mode" is not "Automatic proxy configuration URL".
|
||||
|
|
@ -1 +1,2 @@
|
|||
---
|
||||
auto: https://auto.proxy.net/wpad.dat
|
||||
|
|
|
|||
|
|
@ -1,4 +1,2 @@
|
|||
---
|
||||
proxy_mode: Automatic proxy configuration URL
|
||||
auto: https://auto.proxy.net/wpad.dat
|
||||
no_proxy: 192.168.1.0/24
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 113 KiB |
|
|
@ -1 +0,0 @@
|
|||
A variable with multiple value
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
proxy_mode: Automatic proxy configuration URL
|
||||
auto: https://auto.proxy.net/wpad.dat
|
||||
no_proxy:
|
||||
- example.net
|
||||
- 192.168.1.0/24
|
||||
|
|
@ -1 +0,0 @@
|
|||
A non mandatory variable
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
proxy_mode: Automatic proxy configuration URL
|
||||
auto: https://auto.proxy.net/wpad.dat
|
||||
no_proxy:
|
||||
- example.net
|
||||
- 192.168.1.0/24
|
||||
|
|
@ -1 +0,0 @@
|
|||
Examples
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
proxy_mode: Automatic proxy configuration URL
|
||||
auto: https://auto.proxy.net/wpad.dat
|
||||
no_proxy:
|
||||
- example.net
|
||||
- 192.168.1.0/24
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
proxy_mode: Automatic proxy configuration URL
|
||||
auto: https://auto.proxy.net/wpad.dat
|
||||
|
|
@ -1 +0,0 @@
|
|||
A conditional disabled boolean variable
|
||||
|
|
@ -1 +0,0 @@
|
|||
A Jinja conditional disabled boolean variable
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
version: 1.1
|
||||
|
||||
proxy_dns_socks5:
|
||||
description: Use proxy DNS when using SOCKS v5
|
||||
default: false
|
||||
disabled:
|
||||
jinja: |-
|
||||
{% if _.manual.socks_proxy.version is propertyerror %}
|
||||
the proxy mode is not manual
|
||||
{% elif _.manual.socks_proxy.version == 'v4' %}
|
||||
socks version is v4
|
||||
{% endif %}
|
||||
description: |-
|
||||
if "firefox.proxy_mode" is not "Manual proxy configuration"
|
||||
or "firefox.manual.socks_proxy.version" is "v4"
|
||||
...
|
||||
|
|
@ -1 +0,0 @@
|
|||
A variable in avanced mode
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
version: 1.1
|
||||
|
||||
proxy_dns_socks5:
|
||||
description: Use proxy DNS when using SOCKS v5
|
||||
mode: advanced
|
||||
default: false
|
||||
disabled:
|
||||
jinja: |-
|
||||
{% if _.manual.socks_proxy.version is propertyerror %}
|
||||
the proxy mode is not manual
|
||||
{% elif _.manual.socks_proxy.version == 'v4' %}
|
||||
socks version is v4
|
||||
{% endif %}
|
||||
description: |-
|
||||
if "firefox.proxy_mode" is not "Manual proxy configuration"
|
||||
or "firefox.manual.socks_proxy.version" is "v4"
|
||||
...
|
||||
|
|
@ -1 +1 @@
|
|||
A boolean variable
|
||||
A conditional disabled variable with type domainname and parameters
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Various variables
|
||||
A full documented variable with multiple values and not mandatory
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
proxy_mode: Automatic proxy configuration URL
|
||||
auto: https://auto.proxy.net/wpad.dat
|
||||
no_proxy: 192.168.1.0/24
|
||||
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
|
|
@ -1 +1 @@
|
|||
A choice variable
|
||||
A variable with multiple value
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
---
|
||||
dns_over_https:
|
||||
enable_dns_over_https: true
|
||||
proxy_mode: Automatic proxy configuration URL
|
||||
auto: https://auto.proxy.net/wpad.dat
|
||||
no_proxy:
|
||||
- example.net
|
||||
- 192.168.1.0/24
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
A web_address variable
|
||||
A non mandatory variable
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
---
|
||||
dns_over_https:
|
||||
enable_dns_over_https: true
|
||||
proxy_mode: Automatic proxy configuration URL
|
||||
auto: https://auto.proxy.net/wpad.dat
|
||||
no_proxy:
|
||||
- example.net
|
||||
- 192.168.1.0/24
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
---
|
||||
dns_over_https:
|
||||
enable_dns_over_https: true
|
||||
provider: Custom
|
||||
custom_dns_url: http://dns.net
|
||||
proxy_mode: Automatic proxy configuration URL
|
||||
auto: https://auto.proxy.net/wpad.dat
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
A variable with custom validation
|
||||
Examples
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
---
|
||||
dns_over_https:
|
||||
enable_dns_over_https: true
|
||||
proxy_mode: Automatic proxy configuration URL
|
||||
auto: https://auto.proxy.net/wpad.dat
|
||||
no_proxy:
|
||||
- example.net
|
||||
- 192.168.1.0/24
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
---
|
||||
dns_over_https:
|
||||
enable_dns_over_https: true
|
||||
provider: Custom
|
||||
custom_dns_url: http://dns.net
|
||||
proxy_mode: Automatic proxy configuration URL
|
||||
auto: https://auto.proxy.net/wpad.dat
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Namespace
|
||||
A conditional disabled boolean variable
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Namespace
|
||||
Various variables
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
|
|
@ -1 +1 @@
|
|||
xxx
|
||||
A boolean variable
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
xxx
|
||||
A Jinja conditional disabled boolean variable
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
version: 1.1
|
||||
|
||||
proxy_dns_socks5:
|
||||
description: Use proxy DNS when using SOCKS v5
|
||||
default: false
|
||||
disabled:
|
||||
jinja: |-
|
||||
{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}
|
||||
return_type: boolean
|
||||
description: |-
|
||||
if "_.proxy_mode" is not "Manual proxy configuration"
|
||||
or "_.manual.socks_proxy.version" is "v4"
|
||||
...
|
||||
|
|
@ -1 +1 @@
|
|||
xxx
|
||||
A variable in avanced mode
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
version: 1.1
|
||||
|
||||
proxy_dns_socks5:
|
||||
description: Use proxy DNS when using SOCKS v5
|
||||
mode: advanced
|
||||
default: false
|
||||
disabled:
|
||||
jinja: |-
|
||||
{{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}
|
||||
return_type: boolean
|
||||
description: |-
|
||||
if "_.proxy_mode" is not "Manual proxy configuration"
|
||||
or "_.manual.socks_proxy.version" is "v4"
|
||||
...
|
||||
BIN
examples/130/firefox.png
Normal file
|
After Width: | Height: | Size: 118 KiB |
BIN
examples/130/firefox.xcf
Normal file
1
examples/131/README.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
A choice variable
|
||||
3
examples/131/config/02/config.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
dns_over_https:
|
||||
enable_dns_over_https: true
|
||||
1
examples/132/README.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
A web_address variable
|
||||
3
examples/132/config/02/config.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
dns_over_https:
|
||||
enable_dns_over_https: true
|
||||
5
examples/132/config/03/config.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
dns_over_https:
|
||||
enable_dns_over_https: true
|
||||
provider: Custom
|
||||
custom_dns_url: http://dns.net
|
||||