diff --git a/build.py b/build.py index 818c4c1..9e816a2 100755 --- a/build.py +++ b/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" diff --git a/build.sh b/build.sh index 74c7ad5..69d2469 100755 --- a/build.sh +++ b/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" diff --git a/examples/031/README.md b/examples/031/README.md index 57a7fb3..bbd0017 100644 --- a/examples/031/README.md +++ b/examples/031/README.md @@ -1 +1 @@ -A variable with type's parameters +A variable with type’s parameters diff --git a/examples/040/URL b/examples/040/URL index 28fae4f..3af48c3 100644 --- a/examples/040/URL +++ b/examples/040/URL @@ -1 +1 @@ -https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/calculated.html +https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/properties.html diff --git a/examples/080/README.md b/examples/080/README.md index c17fb19..4ab3a2e 100644 --- a/examples/080/README.md +++ b/examples/080/README.md @@ -1 +1 @@ -A conditional disabled variable with type web_address +HTTP Proxy with "proxy" type diff --git a/examples/080/TITLE.md b/examples/080/TITLE.md index 6d2ea5c..3ea715f 100644 --- a/examples/080/TITLE.md +++ b/examples/080/TITLE.md @@ -1 +1 @@ -A web_address variable +Custom type diff --git a/examples/080/config/01/README.md b/examples/080/config/01/README.md index 2e2d78a..765a56e 100644 --- a/examples/080/config/01/README.md +++ b/examples/080/config/01/README.md @@ -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. + diff --git a/examples/080/config/01/config.yml b/examples/080/config/01/config.yml index 1edbe91..84547fa 100644 --- a/examples/080/config/01/config.yml +++ b/examples/080/config/01/config.yml @@ -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 diff --git a/examples/080/config/02/config.yml b/examples/080/config/02/config.yml deleted file mode 100644 index 26df130..0000000 --- a/examples/080/config/02/config.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -proxy_mode: Automatic proxy configuration URL diff --git a/examples/080/structural_files/firefox/10-manual.yml b/examples/080/structural_files/firefox/10-manual.yml new file mode 100644 index 0000000..1b3761b --- /dev/null +++ b/examples/080/structural_files/firefox/10-manual.yml @@ -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 +... diff --git a/examples/080/types/proxy/00_type.yml b/examples/080/types/proxy/00_type.yml new file mode 100644 index 0000000..d5db586 --- /dev/null +++ b/examples/080/types/proxy/00_type.yml @@ -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 +... diff --git a/examples/081/README.md b/examples/081/README.md new file mode 100644 index 0000000..4587e6e --- /dev/null +++ b/examples/081/README.md @@ -0,0 +1 @@ +HTTPS and SOCKS Proxy diff --git a/examples/081/config/01/README.md b/examples/081/config/01/README.md new file mode 100644 index 0000000..765a56e --- /dev/null +++ b/examples/081/config/01/README.md @@ -0,0 +1,2 @@ +If "use_for_https" is false, HTTPS variables are visible in read only mode and in read write mode. + diff --git a/examples/081/config/01/config.yml b/examples/081/config/01/config.yml new file mode 100644 index 0000000..84547fa --- /dev/null +++ b/examples/081/config/01/config.yml @@ -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 diff --git a/examples/081/structural_files/firefox/20-manual.yml b/examples/081/structural_files/firefox/20-manual.yml new file mode 100644 index 0000000..dc8d987 --- /dev/null +++ b/examples/081/structural_files/firefox/20-manual.yml @@ -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 +... diff --git a/examples/090/README.md b/examples/090/README.md index 1266a43..c17fb19 100644 --- a/examples/090/README.md +++ b/examples/090/README.md @@ -1 +1 @@ -A conditional disabled variable with type domainname and parameters +A conditional disabled variable with type web_address diff --git a/examples/090/TITLE.md b/examples/090/TITLE.md index a6d8a05..6d2ea5c 100644 --- a/examples/090/TITLE.md +++ b/examples/090/TITLE.md @@ -1 +1 @@ -A full documented variable with multiple values and not mandatory +A web_address variable diff --git a/examples/090/config/01/README.md b/examples/090/config/01/README.md new file mode 100644 index 0000000..2e2d78a --- /dev/null +++ b/examples/090/config/01/README.md @@ -0,0 +1 @@ +We cannot configure "auto" if "proxy_mode" is not "Automatic proxy configuration URL". diff --git a/examples/090/config/01/config.yml b/examples/090/config/01/config.yml index ed97d53..1edbe91 100644 --- a/examples/090/config/01/config.yml +++ b/examples/090/config/01/config.yml @@ -1 +1,2 @@ --- +auto: https://auto.proxy.net/wpad.dat diff --git a/examples/090/config/02/config.yml b/examples/090/config/02/config.yml index 54956ea..26df130 100644 --- a/examples/090/config/02/config.yml +++ b/examples/090/config/02/config.yml @@ -1,4 +1,2 @@ --- proxy_mode: Automatic proxy configuration URL -auto: https://auto.proxy.net/wpad.dat -no_proxy: 192.168.1.0/24 diff --git a/examples/080/config/03/config.yml b/examples/090/config/03/config.yml similarity index 100% rename from examples/080/config/03/config.yml rename to examples/090/config/03/config.yml diff --git a/examples/090/firefox.png b/examples/090/firefox.png index 16f5931..d53e513 100644 Binary files a/examples/090/firefox.png and b/examples/090/firefox.png differ diff --git a/examples/090/firefox.xcf b/examples/090/firefox.xcf index 5cc54d7..ca1cf9b 100644 Binary files a/examples/090/firefox.xcf and b/examples/090/firefox.xcf differ diff --git a/examples/080/structural_files/firefox/30-auto.yml b/examples/090/structural_files/firefox/30-auto.yml similarity index 100% rename from examples/080/structural_files/firefox/30-auto.yml rename to examples/090/structural_files/firefox/30-auto.yml diff --git a/examples/091/README.md b/examples/091/README.md deleted file mode 100644 index 130d225..0000000 --- a/examples/091/README.md +++ /dev/null @@ -1 +0,0 @@ -A variable with multiple value diff --git a/examples/091/config/02/config.yml b/examples/091/config/02/config.yml deleted file mode 100644 index ccba4c0..0000000 --- a/examples/091/config/02/config.yml +++ /dev/null @@ -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 diff --git a/examples/092/README.md b/examples/092/README.md deleted file mode 100644 index d83ef1b..0000000 --- a/examples/092/README.md +++ /dev/null @@ -1 +0,0 @@ -A non mandatory variable diff --git a/examples/092/config/02/config.yml b/examples/092/config/02/config.yml deleted file mode 100644 index ccba4c0..0000000 --- a/examples/092/config/02/config.yml +++ /dev/null @@ -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 diff --git a/examples/093/README.md b/examples/093/README.md deleted file mode 100644 index ad6b7fb..0000000 --- a/examples/093/README.md +++ /dev/null @@ -1 +0,0 @@ -Examples diff --git a/examples/093/config/02/config.yml b/examples/093/config/02/config.yml deleted file mode 100644 index ccba4c0..0000000 --- a/examples/093/config/02/config.yml +++ /dev/null @@ -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 diff --git a/examples/094/config/02/config.yml b/examples/094/config/02/config.yml deleted file mode 100644 index 307e175..0000000 --- a/examples/094/config/02/config.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -proxy_mode: Automatic proxy configuration URL -auto: https://auto.proxy.net/wpad.dat diff --git a/examples/095/README.md b/examples/095/README.md deleted file mode 100644 index 553d9c0..0000000 --- a/examples/095/README.md +++ /dev/null @@ -1 +0,0 @@ -A conditional disabled boolean variable diff --git a/examples/097/README.md b/examples/097/README.md deleted file mode 100644 index 4d33c92..0000000 --- a/examples/097/README.md +++ /dev/null @@ -1 +0,0 @@ -A Jinja conditional disabled boolean variable diff --git a/examples/097/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/097/structural_files/firefox/55-proxy_dns_socks5.yml deleted file mode 100644 index 052f0d1..0000000 --- a/examples/097/structural_files/firefox/55-proxy_dns_socks5.yml +++ /dev/null @@ -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" -... diff --git a/examples/098/README.md b/examples/098/README.md deleted file mode 100644 index c19e709..0000000 --- a/examples/098/README.md +++ /dev/null @@ -1 +0,0 @@ -A variable in avanced mode diff --git a/examples/098/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/098/structural_files/firefox/55-proxy_dns_socks5.yml deleted file mode 100644 index 0f1a65f..0000000 --- a/examples/098/structural_files/firefox/55-proxy_dns_socks5.yml +++ /dev/null @@ -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" -... diff --git a/examples/100/README.md b/examples/100/README.md index 4207bc8..1266a43 100644 --- a/examples/100/README.md +++ b/examples/100/README.md @@ -1 +1 @@ -A boolean variable +A conditional disabled variable with type domainname and parameters diff --git a/examples/100/TITLE.md b/examples/100/TITLE.md index f8bc264..a6d8a05 100644 --- a/examples/100/TITLE.md +++ b/examples/100/TITLE.md @@ -1 +1 @@ -Various variables +A full documented variable with multiple values and not mandatory diff --git a/examples/093/config/03/config.yml b/examples/100/config/02/config.yml similarity index 77% rename from examples/093/config/03/config.yml rename to examples/100/config/02/config.yml index 307e175..54956ea 100644 --- a/examples/093/config/03/config.yml +++ b/examples/100/config/02/config.yml @@ -1,3 +1,4 @@ --- proxy_mode: Automatic proxy configuration URL auto: https://auto.proxy.net/wpad.dat +no_proxy: 192.168.1.0/24 diff --git a/examples/100/firefox.png b/examples/100/firefox.png index d368003..16f5931 100644 Binary files a/examples/100/firefox.png and b/examples/100/firefox.png differ diff --git a/examples/100/firefox.xcf b/examples/100/firefox.xcf index c362607..5cc54d7 100644 Binary files a/examples/100/firefox.xcf and b/examples/100/firefox.xcf differ diff --git a/examples/090/structural_files/firefox/40-no_proxy.yml b/examples/100/structural_files/firefox/40-no_proxy.yml similarity index 100% rename from examples/090/structural_files/firefox/40-no_proxy.yml rename to examples/100/structural_files/firefox/40-no_proxy.yml diff --git a/examples/101/README.md b/examples/101/README.md index 9215d09..130d225 100644 --- a/examples/101/README.md +++ b/examples/101/README.md @@ -1 +1 @@ -A choice variable +A variable with multiple value diff --git a/examples/101/config/02/config.yml b/examples/101/config/02/config.yml index aee4796..ccba4c0 100644 --- a/examples/101/config/02/config.yml +++ b/examples/101/config/02/config.yml @@ -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 diff --git a/examples/091/config/03/config.yml b/examples/101/config/03/config.yml similarity index 100% rename from examples/091/config/03/config.yml rename to examples/101/config/03/config.yml diff --git a/examples/091/structural_files/firefox/40-no_proxy.yml b/examples/101/structural_files/firefox/40-no_proxy.yml similarity index 100% rename from examples/091/structural_files/firefox/40-no_proxy.yml rename to examples/101/structural_files/firefox/40-no_proxy.yml diff --git a/examples/102/README.md b/examples/102/README.md index 972da98..d83ef1b 100644 --- a/examples/102/README.md +++ b/examples/102/README.md @@ -1 +1 @@ -A web_address variable +A non mandatory variable diff --git a/examples/102/config/02/config.yml b/examples/102/config/02/config.yml index aee4796..ccba4c0 100644 --- a/examples/102/config/02/config.yml +++ b/examples/102/config/02/config.yml @@ -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 diff --git a/examples/102/config/03/config.yml b/examples/102/config/03/config.yml index 2497fc1..307e175 100644 --- a/examples/102/config/03/config.yml +++ b/examples/102/config/03/config.yml @@ -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 diff --git a/examples/092/structural_files/firefox/40-no_proxy.yml b/examples/102/structural_files/firefox/40-no_proxy.yml similarity index 100% rename from examples/092/structural_files/firefox/40-no_proxy.yml rename to examples/102/structural_files/firefox/40-no_proxy.yml diff --git a/examples/103/README.md b/examples/103/README.md index c11c818..ad6b7fb 100644 --- a/examples/103/README.md +++ b/examples/103/README.md @@ -1 +1 @@ -A variable with custom validation +Examples diff --git a/examples/103/config/02/config.yml b/examples/103/config/02/config.yml index aee4796..ccba4c0 100644 --- a/examples/103/config/02/config.yml +++ b/examples/103/config/02/config.yml @@ -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 diff --git a/examples/103/config/03/config.yml b/examples/103/config/03/config.yml index 2497fc1..307e175 100644 --- a/examples/103/config/03/config.yml +++ b/examples/103/config/03/config.yml @@ -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 diff --git a/examples/093/structural_files/firefox/40-no_proxy.yml b/examples/103/structural_files/firefox/40-no_proxy.yml similarity index 100% rename from examples/093/structural_files/firefox/40-no_proxy.yml rename to examples/103/structural_files/firefox/40-no_proxy.yml diff --git a/examples/094/README.md b/examples/104/README.md similarity index 100% rename from examples/094/README.md rename to examples/104/README.md diff --git a/examples/091/config/01/config.yml b/examples/104/config/01/config.yml similarity index 100% rename from examples/091/config/01/config.yml rename to examples/104/config/01/config.yml diff --git a/examples/092/config/03/config.yml b/examples/104/config/02/config.yml similarity index 100% rename from examples/092/config/03/config.yml rename to examples/104/config/02/config.yml diff --git a/examples/094/config/03/config.yml b/examples/104/config/03/config.yml similarity index 100% rename from examples/094/config/03/config.yml rename to examples/104/config/03/config.yml diff --git a/examples/094/structural_files/firefox/40-no_proxy.yml b/examples/104/structural_files/firefox/40-no_proxy.yml similarity index 100% rename from examples/094/structural_files/firefox/40-no_proxy.yml rename to examples/104/structural_files/firefox/40-no_proxy.yml diff --git a/examples/110/README.md b/examples/110/README.md index 86ff802..553d9c0 100644 --- a/examples/110/README.md +++ b/examples/110/README.md @@ -1 +1 @@ -Namespace +A conditional disabled boolean variable diff --git a/examples/110/TITLE.md b/examples/110/TITLE.md index 86ff802..f8bc264 100644 --- a/examples/110/TITLE.md +++ b/examples/110/TITLE.md @@ -1 +1 @@ -Namespace +Various variables diff --git a/examples/092/config/01/config.yml b/examples/110/config/01/config.yml similarity index 100% rename from examples/092/config/01/config.yml rename to examples/110/config/01/config.yml diff --git a/examples/095/config/02/config.yml b/examples/110/config/02/config.yml similarity index 100% rename from examples/095/config/02/config.yml rename to examples/110/config/02/config.yml diff --git a/examples/095/config/03/config.yml b/examples/110/config/03/config.yml similarity index 100% rename from examples/095/config/03/config.yml rename to examples/110/config/03/config.yml diff --git a/examples/095/config/04/config.yml b/examples/110/config/04/config.yml similarity index 100% rename from examples/095/config/04/config.yml rename to examples/110/config/04/config.yml diff --git a/examples/095/firefox.png b/examples/110/firefox.png similarity index 100% rename from examples/095/firefox.png rename to examples/110/firefox.png diff --git a/examples/095/firefox.xcf b/examples/110/firefox.xcf similarity index 100% rename from examples/095/firefox.xcf rename to examples/110/firefox.xcf diff --git a/examples/095/structural_files/firefox/50-prompt_authentication.yml b/examples/110/structural_files/firefox/50-prompt_authentication.yml similarity index 100% rename from examples/095/structural_files/firefox/50-prompt_authentication.yml rename to examples/110/structural_files/firefox/50-prompt_authentication.yml diff --git a/examples/111/README.md b/examples/111/README.md index d6459e0..4207bc8 100644 --- a/examples/111/README.md +++ b/examples/111/README.md @@ -1 +1 @@ -xxx +A boolean variable diff --git a/examples/096/config/02/config.yml b/examples/111/config/02/config.yml similarity index 100% rename from examples/096/config/02/config.yml rename to examples/111/config/02/config.yml diff --git a/examples/096/config/03/config.yml b/examples/111/config/03/config.yml similarity index 100% rename from examples/096/config/03/config.yml rename to examples/111/config/03/config.yml diff --git a/examples/096/config/04/config.yml b/examples/111/config/04/config.yml similarity index 100% rename from examples/096/config/04/config.yml rename to examples/111/config/04/config.yml diff --git a/examples/096/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/111/structural_files/firefox/55-proxy_dns_socks5.yml similarity index 100% rename from examples/096/structural_files/firefox/55-proxy_dns_socks5.yml rename to examples/111/structural_files/firefox/55-proxy_dns_socks5.yml diff --git a/examples/112/README.md b/examples/112/README.md index d6459e0..4d33c92 100644 --- a/examples/112/README.md +++ b/examples/112/README.md @@ -1 +1 @@ -xxx +A Jinja conditional disabled boolean variable diff --git a/examples/097/config/02/config.yml b/examples/112/config/02/config.yml similarity index 100% rename from examples/097/config/02/config.yml rename to examples/112/config/02/config.yml diff --git a/examples/097/config/03/config.yml b/examples/112/config/03/config.yml similarity index 100% rename from examples/097/config/03/config.yml rename to examples/112/config/03/config.yml diff --git a/examples/097/config/04/config.yml b/examples/112/config/04/config.yml similarity index 100% rename from examples/097/config/04/config.yml rename to examples/112/config/04/config.yml diff --git a/examples/112/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/112/structural_files/firefox/55-proxy_dns_socks5.yml new file mode 100644 index 0000000..2dbe9d1 --- /dev/null +++ b/examples/112/structural_files/firefox/55-proxy_dns_socks5.yml @@ -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" +... diff --git a/examples/120/README.md b/examples/120/README.md index d6459e0..c19e709 100644 --- a/examples/120/README.md +++ b/examples/120/README.md @@ -1 +1 @@ -xxx +A variable in avanced mode diff --git a/examples/098/TITLE.md b/examples/120/TITLE.md similarity index 100% rename from examples/098/TITLE.md rename to examples/120/TITLE.md diff --git a/examples/093/config/01/config.yml b/examples/120/config/01/config.yml similarity index 100% rename from examples/093/config/01/config.yml rename to examples/120/config/01/config.yml diff --git a/examples/098/config/02/config.yml b/examples/120/config/02/config.yml similarity index 100% rename from examples/098/config/02/config.yml rename to examples/120/config/02/config.yml diff --git a/examples/098/config/03/config.yml b/examples/120/config/03/config.yml similarity index 100% rename from examples/098/config/03/config.yml rename to examples/120/config/03/config.yml diff --git a/examples/098/config/04/config.yml b/examples/120/config/04/config.yml similarity index 100% rename from examples/098/config/04/config.yml rename to examples/120/config/04/config.yml diff --git a/examples/098/config/mode b/examples/120/config/mode similarity index 100% rename from examples/098/config/mode rename to examples/120/config/mode diff --git a/examples/120/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/120/structural_files/firefox/55-proxy_dns_socks5.yml new file mode 100644 index 0000000..02d2823 --- /dev/null +++ b/examples/120/structural_files/firefox/55-proxy_dns_socks5.yml @@ -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" +... diff --git a/examples/096/README.md b/examples/130/README.md similarity index 100% rename from examples/096/README.md rename to examples/130/README.md diff --git a/examples/095/TITLE.md b/examples/130/TITLE.md similarity index 100% rename from examples/095/TITLE.md rename to examples/130/TITLE.md diff --git a/examples/094/config/01/config.yml b/examples/130/config/01/config.yml similarity index 100% rename from examples/094/config/01/config.yml rename to examples/130/config/01/config.yml diff --git a/examples/130/firefox.png b/examples/130/firefox.png new file mode 100644 index 0000000..d368003 Binary files /dev/null and b/examples/130/firefox.png differ diff --git a/examples/130/firefox.xcf b/examples/130/firefox.xcf new file mode 100644 index 0000000..c362607 Binary files /dev/null and b/examples/130/firefox.xcf differ diff --git a/examples/100/structural_files/firefox/60-dns_over_https.yml b/examples/130/structural_files/firefox/60-dns_over_https.yml similarity index 100% rename from examples/100/structural_files/firefox/60-dns_over_https.yml rename to examples/130/structural_files/firefox/60-dns_over_https.yml diff --git a/examples/131/README.md b/examples/131/README.md new file mode 100644 index 0000000..9215d09 --- /dev/null +++ b/examples/131/README.md @@ -0,0 +1 @@ +A choice variable diff --git a/examples/095/config/01/config.yml b/examples/131/config/01/config.yml similarity index 100% rename from examples/095/config/01/config.yml rename to examples/131/config/01/config.yml diff --git a/examples/131/config/02/config.yml b/examples/131/config/02/config.yml new file mode 100644 index 0000000..aee4796 --- /dev/null +++ b/examples/131/config/02/config.yml @@ -0,0 +1,3 @@ +--- +dns_over_https: + enable_dns_over_https: true diff --git a/examples/101/structural_files/firefox/60-dns_over_https.yml b/examples/131/structural_files/firefox/60-dns_over_https.yml similarity index 100% rename from examples/101/structural_files/firefox/60-dns_over_https.yml rename to examples/131/structural_files/firefox/60-dns_over_https.yml diff --git a/examples/132/README.md b/examples/132/README.md new file mode 100644 index 0000000..972da98 --- /dev/null +++ b/examples/132/README.md @@ -0,0 +1 @@ +A web_address variable diff --git a/examples/096/config/01/config.yml b/examples/132/config/01/config.yml similarity index 100% rename from examples/096/config/01/config.yml rename to examples/132/config/01/config.yml diff --git a/examples/132/config/02/config.yml b/examples/132/config/02/config.yml new file mode 100644 index 0000000..aee4796 --- /dev/null +++ b/examples/132/config/02/config.yml @@ -0,0 +1,3 @@ +--- +dns_over_https: + enable_dns_over_https: true diff --git a/examples/132/config/03/config.yml b/examples/132/config/03/config.yml new file mode 100644 index 0000000..2497fc1 --- /dev/null +++ b/examples/132/config/03/config.yml @@ -0,0 +1,5 @@ +--- +dns_over_https: + enable_dns_over_https: true + provider: Custom + custom_dns_url: http://dns.net diff --git a/examples/102/config/04/config.yml b/examples/132/config/04/config.yml similarity index 100% rename from examples/102/config/04/config.yml rename to examples/132/config/04/config.yml diff --git a/examples/102/structural_files/firefox/60-dns_over_https.yml b/examples/132/structural_files/firefox/60-dns_over_https.yml similarity index 79% rename from examples/102/structural_files/firefox/60-dns_over_https.yml rename to examples/132/structural_files/firefox/60-dns_over_https.yml index 6ce2c7e..309c653 100644 --- a/examples/102/structural_files/firefox/60-dns_over_https.yml +++ b/examples/132/structural_files/firefox/60-dns_over_https.yml @@ -22,8 +22,7 @@ dns_over_https: # DNS over HTTPS type: web_address disabled: jinja: |- - {% if _.provider is propertyerror or _.provider != 'Custom' %} - provider is not custom - {% endif %} + {{ _.provider is propertyerror or _.provider != 'Custom' }} + return_type: boolean description: if "_.provider" is not "Custom" ... diff --git a/examples/140/README.md b/examples/140/README.md new file mode 100644 index 0000000..c11c818 --- /dev/null +++ b/examples/140/README.md @@ -0,0 +1 @@ +A variable with custom validation diff --git a/examples/103/TITLE.md b/examples/140/TITLE.md similarity index 100% rename from examples/103/TITLE.md rename to examples/140/TITLE.md diff --git a/examples/097/config/01/config.yml b/examples/140/config/01/config.yml similarity index 100% rename from examples/097/config/01/config.yml rename to examples/140/config/01/config.yml diff --git a/examples/140/config/02/config.yml b/examples/140/config/02/config.yml new file mode 100644 index 0000000..aee4796 --- /dev/null +++ b/examples/140/config/02/config.yml @@ -0,0 +1,3 @@ +--- +dns_over_https: + enable_dns_over_https: true diff --git a/examples/140/config/03/config.yml b/examples/140/config/03/config.yml new file mode 100644 index 0000000..2497fc1 --- /dev/null +++ b/examples/140/config/03/config.yml @@ -0,0 +1,5 @@ +--- +dns_over_https: + enable_dns_over_https: true + provider: Custom + custom_dns_url: http://dns.net diff --git a/examples/103/config/04/config.yml b/examples/140/config/04/config.yml similarity index 100% rename from examples/103/config/04/config.yml rename to examples/140/config/04/config.yml diff --git a/examples/103/structural_files/firefox/60-dns_over_https.yml b/examples/140/structural_files/firefox/60-dns_over_https.yml similarity index 70% rename from examples/103/structural_files/firefox/60-dns_over_https.yml rename to examples/140/structural_files/firefox/60-dns_over_https.yml index 55b37cc..8bd721b 100644 --- a/examples/103/structural_files/firefox/60-dns_over_https.yml +++ b/examples/140/structural_files/firefox/60-dns_over_https.yml @@ -22,14 +22,12 @@ dns_over_https: # DNS over HTTPS type: web_address validators: - jinja: |- - {% if _.custom_dns_url.startswith('http://') %} - only https is allowed - {% endif %} + {{ _.custom_dns_url.startswith('http://') }} + return_type: boolean description: must starts with 'https://' only disabled: jinja: |- - {% if _.provider is propertyerror or _.provider != 'Custom' %} - provider is not custom - {% endif %} + {{ _.provider is propertyerror or _.provider != 'Custom' }} + return_type: boolean description: if "_.provider" is not "Custom" ... diff --git a/examples/150/README.md b/examples/150/README.md new file mode 100644 index 0000000..86ff802 --- /dev/null +++ b/examples/150/README.md @@ -0,0 +1 @@ +Namespace diff --git a/examples/150/TITLE.md b/examples/150/TITLE.md new file mode 100644 index 0000000..86ff802 --- /dev/null +++ b/examples/150/TITLE.md @@ -0,0 +1 @@ +Namespace diff --git a/examples/110/namespace b/examples/150/namespace similarity index 100% rename from examples/110/namespace rename to examples/150/namespace diff --git a/examples/110/structural_files/firefox/empty b/examples/150/structural_files/firefox/empty similarity index 100% rename from examples/110/structural_files/firefox/empty rename to examples/150/structural_files/firefox/empty diff --git a/examples/110/structural_files/firefox/empty.yml b/examples/150/structural_files/firefox/empty.yml similarity index 100% rename from examples/110/structural_files/firefox/empty.yml rename to examples/150/structural_files/firefox/empty.yml diff --git a/examples/111/100/README.md b/examples/160/151/100/README.md similarity index 100% rename from examples/111/100/README.md rename to examples/160/151/100/README.md diff --git a/examples/098/config/01/config.yml b/examples/160/151/100/config/01/config.yml similarity index 100% rename from examples/098/config/01/config.yml rename to examples/160/151/100/config/01/config.yml diff --git a/examples/111/100/config/02/config.yml b/examples/160/151/100/config/02/config.yml similarity index 100% rename from examples/111/100/config/02/config.yml rename to examples/160/151/100/config/02/config.yml diff --git a/examples/111/100/config/03/config.yml b/examples/160/151/100/config/03/config.yml similarity index 100% rename from examples/111/100/config/03/config.yml rename to examples/160/151/100/config/03/config.yml diff --git a/examples/111/100/structural_files/foxyproxy/00-foxyproxy.yml b/examples/160/151/100/structural_files/foxyproxy/00-foxyproxy.yml similarity index 100% rename from examples/111/100/structural_files/foxyproxy/00-foxyproxy.yml rename to examples/160/151/100/structural_files/foxyproxy/00-foxyproxy.yml diff --git a/examples/113/README.md b/examples/160/151/README.md similarity index 100% rename from examples/113/README.md rename to examples/160/151/README.md diff --git a/examples/160/151/TITLE.md b/examples/160/151/TITLE.md new file mode 100644 index 0000000..528c054 --- /dev/null +++ b/examples/160/151/TITLE.md @@ -0,0 +1 @@ +A dynamically built family diff --git a/examples/111/100/config/01/config.yml b/examples/160/151/config/01/config.yml similarity index 100% rename from examples/111/100/config/01/config.yml rename to examples/160/151/config/01/config.yml diff --git a/examples/160/151/foxyproxy.png b/examples/160/151/foxyproxy.png new file mode 100644 index 0000000..418dad0 Binary files /dev/null and b/examples/160/151/foxyproxy.png differ diff --git a/examples/111/structural_files/foxyproxy/00-foxyproxy.yml b/examples/160/151/structural_files/foxyproxy/00-foxyproxy.yml similarity index 100% rename from examples/111/structural_files/foxyproxy/00-foxyproxy.yml rename to examples/160/151/structural_files/foxyproxy/00-foxyproxy.yml diff --git a/examples/114/README.md b/examples/160/README.md similarity index 100% rename from examples/114/README.md rename to examples/160/README.md diff --git a/examples/120/structural_files/foxyproxy/10-redefine.yml b/examples/160/structural_files/foxyproxy/10-redefine.yml similarity index 100% rename from examples/120/structural_files/foxyproxy/10-redefine.yml rename to examples/160/structural_files/foxyproxy/10-redefine.yml diff --git a/examples/170/README.md b/examples/170/README.md new file mode 100644 index 0000000..d6459e0 --- /dev/null +++ b/examples/170/README.md @@ -0,0 +1 @@ +xxx diff --git a/examples/113/config/01/config.yml b/examples/170/config/01/config.yml similarity index 100% rename from examples/113/config/01/config.yml rename to examples/170/config/01/config.yml diff --git a/examples/112/structural_files/foxyproxy/00-foxyproxy.yml b/examples/170/structural_files/foxyproxy/00-foxyproxy.yml similarity index 100% rename from examples/112/structural_files/foxyproxy/00-foxyproxy.yml rename to examples/170/structural_files/foxyproxy/00-foxyproxy.yml diff --git a/examples/171/README.md b/examples/171/README.md new file mode 100644 index 0000000..d6459e0 --- /dev/null +++ b/examples/171/README.md @@ -0,0 +1 @@ +xxx diff --git a/examples/114/config/01/config.yml b/examples/171/config/01/config.yml similarity index 100% rename from examples/114/config/01/config.yml rename to examples/171/config/01/config.yml diff --git a/examples/113/structural_files/foxyproxy/00-foxyproxy.yml b/examples/171/structural_files/foxyproxy/00-foxyproxy.yml similarity index 100% rename from examples/113/structural_files/foxyproxy/00-foxyproxy.yml rename to examples/171/structural_files/foxyproxy/00-foxyproxy.yml diff --git a/examples/172/README.md b/examples/172/README.md new file mode 100644 index 0000000..d6459e0 --- /dev/null +++ b/examples/172/README.md @@ -0,0 +1 @@ +xxx diff --git a/examples/172/config/01/config.yml b/examples/172/config/01/config.yml new file mode 100644 index 0000000..ed97d53 --- /dev/null +++ b/examples/172/config/01/config.yml @@ -0,0 +1 @@ +--- diff --git a/examples/114/structural_files/foxyproxy/00-foxyproxy.yml b/examples/172/structural_files/foxyproxy/00-foxyproxy.yml similarity index 100% rename from examples/114/structural_files/foxyproxy/00-foxyproxy.yml rename to examples/172/structural_files/foxyproxy/00-foxyproxy.yml