diff --git a/build.py b/build.py index 183a415..82e3ed4 100755 --- a/build.py +++ b/build.py @@ -47,7 +47,7 @@ if __name__ == "__main__": # print(config.value.get()) rougailconfig['doc.output_format'] = 'github' rougailconfig['doc.title_level'] = 3 - inventory = RougailOutputDoc(config, rougailconfig=rougailconfig.copy()) + inventory = RougailOutputDoc(config, rougailconfig=rougailconfig) inventory.load_formatter() inv_formatter = inventory.formatter rougailconfig['step.output'] = 'console' @@ -79,9 +79,9 @@ if __name__ == "__main__": with tree.open() as fh: soup = BeautifulSoup(fh.read(), features="lxml") doc += str(soup.find('p')) + "\n\n" - for f in Path('.').iterdir(): + for f in Path(".").iterdir(): if f.name.startswith('DISPLAY_'): - filename = f.name[9:] + filename = f.name[8:] display_yml = Path(dirname) / filename break else: @@ -116,12 +116,12 @@ if __name__ == "__main__": if previous.is_file(): rougailconfig["doc.contents"] = ["changelog"] rougailconfig["doc.previous_json_file"] = str(previous) - 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" - doc += f'```shell\n{cmd}\n```\n' - doc += inv_doc + "\n" + 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" + doc += f'```shell\n{cmd}\n```\n' + doc += inv_doc + "\n" # save PREVIOUS rougailconfig["doc.contents"] = ["variables"] rougailconfig['doc.output_format'] = 'json' @@ -209,6 +209,7 @@ if __name__ == "__main__": doc += conv_data with open(dirname / 'output_rw.html', 'w') as fh_output: fh_output.write(conv_data) + tiramisu_config.property.read_only() # summary = Path('summary_after.md') if summary.is_file(): diff --git a/build.sh b/build.sh index 8a0824f..65591ca 100755 --- a/build.sh +++ b/build.sh @@ -15,7 +15,7 @@ export LC_ALL=C.UTF-8 BUILDER="$(pwd)" mkdir -p $DEST/firefox -rm -f summary.md +rm -f summary.md previous.yml touch summary.md rm -f summary_total.md touch summary_total.md @@ -44,7 +44,8 @@ for i in $(ls -d "examples"/* | sort); do num=$(echo $(basename "$i")) echo "$num" commit_id="v${VERSION}_$num" - summary="[tutorial $commit_id] $(head -n 1 $i/README.md)" + title="$(head -n 1 $i/README.md)" + summary="[tutorial $commit_id] $title" echo "- [$summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/$commit_id/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/${commit_id}~1..$commit_id))" >> summary_total.md done @@ -60,29 +61,32 @@ for i in $(ls -d "examples"/* | sort); do num=$(echo $(basename "$i")) echo "$num" commit_id="v${VERSION}_$num" - summary="[tutorial $commit_id)] $(head -n 1 $i/README.md)" + title=$(head -n 1 $i/README.md) + summary="[tutorial $commit_id)] $title" + if [ -f $i/URL ]; then + base_url_doc=$(cat $i/URL) + fi + url_doc="$base_url_doc#$(echo $title | tr A-Z a-z | 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) ([diff]($diff_url))" >> summary.md + 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" BEFORE=$PWD cd "$i/structural_files" - echo "=====================" if [ -d firefox ]; then for j in $(ls firefox/*.yml 2>/dev/null); do - echo "++++ $j" - cp "$j" "$DEST/$j" + cp -v "$j" "$DEST/$j" done fi if [ -d foxyproxy ]; then mkdir -p $DEST/foxyproxy for j in $(ls foxyproxy/*.yml 2>/dev/null); do - cp "$j" "$DEST/$j" + cp -v "$j" "$DEST/$j" done fi - cp "DISPLAY_*" "$DEST/" 2> /dev/null || true cd $DEST tree -H $TUTO_ROOT/$commit_id/ -P "*.yml" > tree.html cd - > /dev/null + cp -v DISPLAY_* "$DEST/" 2> /dev/null || true cp -f ../README.md "$DEST" if [ -d ../config ]; then cp -aL ../config "$DEST" @@ -102,6 +106,8 @@ for i in $(ls -d "examples"/* | sort); do echo "# $summary" >> summary_before.md echo "" >> summary_before.md echo "[View the diff]($diff_url)" >> summary_before.md + echo "" >> summary_before.md + echo "[Read the documentation]($url_doc)" >> summary_before.md after=$(grep "commit/$commit_id/README.md" summary_total.md -A1 | wc -l) if [ "$after" = "2" ]; then echo $(grep "commit/$commit_id/README.md" summary_total.md -A1 | tail -n 1) > summary_after.md diff --git a/examples/000/README.md b/examples/000/README.md index 4128c51..01556d4 100644 --- a/examples/000/README.md +++ b/examples/000/README.md @@ -1 +1 @@ -An empty structured file with format version +Creating a structure file diff --git a/examples/000/URL b/examples/000/URL new file mode 100644 index 0000000..161a4e9 --- /dev/null +++ b/examples/000/URL @@ -0,0 +1 @@ +https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/preliminary.html diff --git a/examples/001/README.md b/examples/001/README.md index 5abcd36..3693cb2 100644 --- a/examples/001/README.md +++ b/examples/001/README.md @@ -1 +1 @@ -A first variable with only a name +Let’s add our first variable diff --git a/examples/010/URL b/examples/010/URL new file mode 100644 index 0000000..69173b8 --- /dev/null +++ b/examples/010/URL @@ -0,0 +1 @@ +https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/proxymode.html diff --git a/examples/020/URL b/examples/020/URL new file mode 100644 index 0000000..5a5e1ce --- /dev/null +++ b/examples/020/URL @@ -0,0 +1 @@ +https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/disabled.html diff --git a/examples/024/README.md b/examples/024/README.md deleted file mode 100644 index 7d9b8be..0000000 --- a/examples/024/README.md +++ /dev/null @@ -1 +0,0 @@ -Copy HTTP manual proxy to HTTPS manual proxy diff --git a/examples/024/config b/examples/024/config deleted file mode 120000 index f6f691c..0000000 --- a/examples/024/config +++ /dev/null @@ -1 +0,0 @@ -../020/config \ No newline at end of file diff --git a/examples/024/structural_files/firefox/20-manual.yml b/examples/024/structural_files/firefox/20-manual.yml deleted file mode 100644 index 442fb2d..0000000 --- a/examples/024/structural_files/firefox/20-manual.yml +++ /dev/null @@ -1,21 +0,0 @@ -%YAML 1.2 ---- -version: 1.1 - -manual: - - use_for_https: true # Also use this proxy for HTTPS - - https_proxy: # HTTPS Proxy - - address: - description: HTTPS address - type: domainname - params: - allow_ip: true - - port: - description: HTTPS Port - type: port - default: 8080 -... diff --git a/examples/030/SUBTITLE.md b/examples/030/SUBTITLE.md index a457f0c..8d5eb23 100644 --- a/examples/030/SUBTITLE.md +++ b/examples/030/SUBTITLE.md @@ -1 +1 @@ -Disable a family +Property disabled diff --git a/examples/030/config/05/README.md b/examples/030/config/02/README.md similarity index 100% rename from examples/030/config/05/README.md rename to examples/030/config/02/README.md diff --git a/examples/030/config/02/config.yml b/examples/030/config/02/config.yml index 74edb22..9b246a4 100644 --- a/examples/030/config/02/config.yml +++ b/examples/030/config/02/config.yml @@ -1,2 +1,7 @@ --- proxy_mode: Manual proxy configuration +manual: + http_proxy: + address: http.proxy.net + port: 3128 + use_for_https: false diff --git a/examples/030/config/02/read_write b/examples/030/config/02/read_write deleted file mode 100644 index e69de29..0000000 diff --git a/examples/030/config/03/read_write b/examples/030/config/03/read_write deleted file mode 100644 index e69de29..0000000 diff --git a/examples/030/config/04/config.yml b/examples/030/config/04/config.yml deleted file mode 100644 index c8d73af..0000000 --- a/examples/030/config/04/config.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -proxy_mode: Manual proxy configuration -manual: - http_proxy: - address: example.net - port: '3128' diff --git a/examples/030/config/04/read_write b/examples/030/config/04/read_write deleted file mode 100644 index e69de29..0000000 diff --git a/examples/030/config/05/read_write b/examples/030/config/05/read_write deleted file mode 100644 index e69de29..0000000 diff --git a/examples/024/structural_files/DISPLAY_10-manual.yml b/examples/030/structural_files/DISPLAY_10-manual.yml similarity index 100% rename from examples/024/structural_files/DISPLAY_10-manual.yml rename to examples/030/structural_files/DISPLAY_10-manual.yml diff --git a/examples/031/README.md b/examples/031/README.md index dbdd290..eac87eb 100644 --- a/examples/031/README.md +++ b/examples/031/README.md @@ -1 +1 @@ -A conditional disabled family with a variable +A conditional disabled family diff --git a/examples/031/config b/examples/031/config deleted file mode 120000 index d36ce75..0000000 --- a/examples/031/config +++ /dev/null @@ -1 +0,0 @@ -../030/config \ No newline at end of file diff --git a/examples/071/config/01/config.yml b/examples/031/config/01/config.yml similarity index 100% rename from examples/071/config/01/config.yml rename to examples/031/config/01/config.yml diff --git a/examples/031/config/02/README.md b/examples/031/config/02/README.md new file mode 100644 index 0000000..765a56e --- /dev/null +++ b/examples/031/config/02/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/031/config/02/config.yml b/examples/031/config/02/config.yml new file mode 100644 index 0000000..9b246a4 --- /dev/null +++ b/examples/031/config/02/config.yml @@ -0,0 +1,7 @@ +--- +proxy_mode: Manual proxy configuration +manual: + http_proxy: + address: http.proxy.net + port: 3128 + use_for_https: false diff --git a/examples/030/config/01/read_write b/examples/031/structural_files/DISPLAY_10-manual.yml similarity index 100% rename from examples/030/config/01/read_write rename to examples/031/structural_files/DISPLAY_10-manual.yml diff --git a/examples/032/README.md b/examples/032/README.md index be99f7f..7d9b8be 100644 --- a/examples/032/README.md +++ b/examples/032/README.md @@ -1 +1 @@ -An hidden family +Copy HTTP manual proxy to HTTPS manual proxy diff --git a/examples/032/SUBTITLE.md b/examples/032/SUBTITLE.md index 4da43d8..6f8a582 100644 --- a/examples/032/SUBTITLE.md +++ b/examples/032/SUBTITLE.md @@ -1 +1 @@ -Property: hidden +Property hidden diff --git a/examples/032/config b/examples/032/config deleted file mode 120000 index d36ce75..0000000 --- a/examples/032/config +++ /dev/null @@ -1 +0,0 @@ -../030/config \ No newline at end of file diff --git a/examples/032/structural_files/firefox/20-manual.yml b/examples/032/structural_files/firefox/20-manual.yml index 42f47c9..442fb2d 100644 --- a/examples/032/structural_files/firefox/20-manual.yml +++ b/examples/032/structural_files/firefox/20-manual.yml @@ -6,9 +6,7 @@ manual: use_for_https: true # Also use this proxy for HTTPS - https_proxy: - description: HTTPS Proxy - hidden: true + https_proxy: # HTTPS Proxy address: description: HTTPS address diff --git a/examples/033/README.md b/examples/033/README.md index 7e740c0..16d6e46 100644 --- a/examples/033/README.md +++ b/examples/033/README.md @@ -1 +1 @@ -A conditional hidden family with a variable +A conditional hidden family diff --git a/examples/033/config b/examples/033/config deleted file mode 120000 index d36ce75..0000000 --- a/examples/033/config +++ /dev/null @@ -1 +0,0 @@ -../030/config \ No newline at end of file diff --git a/examples/033/config/01/README.md b/examples/033/config/01/README.md new file mode 100644 index 0000000..765a56e --- /dev/null +++ b/examples/033/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/030/config/05/config.yml b/examples/033/config/01/config.yml similarity index 90% rename from examples/030/config/05/config.yml rename to examples/033/config/01/config.yml index 4a1f789..84547fa 100644 --- a/examples/030/config/05/config.yml +++ b/examples/033/config/01/config.yml @@ -3,7 +3,7 @@ proxy_mode: Manual proxy configuration manual: http_proxy: address: http.proxy.net - port: '3128' + port: 3128 use_for_https: false https_proxy: address: https.proxy.net diff --git a/examples/033/config/02/README.md b/examples/033/config/02/README.md new file mode 100644 index 0000000..765a56e --- /dev/null +++ b/examples/033/config/02/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/030/config/03/config.yml b/examples/033/config/02/config.yml similarity index 50% rename from examples/030/config/03/config.yml rename to examples/033/config/02/config.yml index e3db924..7455217 100644 --- a/examples/030/config/03/config.yml +++ b/examples/033/config/02/config.yml @@ -2,4 +2,6 @@ proxy_mode: Manual proxy configuration manual: http_proxy: - address: example.net + address: http.proxy.net + port: 3128 + use_for_https: true diff --git a/examples/040/TITLE.md b/examples/040/TITLE.md index 9f51301..d4769fe 100644 --- a/examples/040/TITLE.md +++ b/examples/040/TITLE.md @@ -1 +1 @@ -Variable: calculated default value +Calculated default value for a variable diff --git a/examples/040/config b/examples/040/config deleted file mode 120000 index dce6a43..0000000 --- a/examples/040/config +++ /dev/null @@ -1 +0,0 @@ -../013/config \ No newline at end of file diff --git a/examples/040/config/01/README.md b/examples/040/config/01/README.md new file mode 100644 index 0000000..765a56e --- /dev/null +++ b/examples/040/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/040/config/01/config.yml b/examples/040/config/01/config.yml new file mode 100644 index 0000000..84547fa --- /dev/null +++ b/examples/040/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/040/structural_files/firefox/20-manual.yml b/examples/040/structural_files/firefox/20-manual.yml index 3e15a0b..f25bcd9 100644 --- a/examples/040/structural_files/firefox/20-manual.yml +++ b/examples/040/structural_files/firefox/20-manual.yml @@ -13,15 +13,11 @@ manual: address: description: HTTPS address - type: domainname - params: - allow_ip: true default: variable: __.http_proxy.address port: description: HTTPS Port - type: port default: variable: __.http_proxy.port ... diff --git a/examples/041/README.md b/examples/041/README.md deleted file mode 100644 index 26a03cf..0000000 --- a/examples/041/README.md +++ /dev/null @@ -1 +0,0 @@ -Variable type and parameters type are copied with default value diff --git a/examples/041/config b/examples/041/config deleted file mode 120000 index 12177f8..0000000 --- a/examples/041/config +++ /dev/null @@ -1 +0,0 @@ -../017/config \ No newline at end of file diff --git a/examples/041/structural_files/firefox/20-manual.yml b/examples/041/structural_files/firefox/20-manual.yml deleted file mode 100644 index f25bcd9..0000000 --- a/examples/041/structural_files/firefox/20-manual.yml +++ /dev/null @@ -1,23 +0,0 @@ -%YAML 1.2 ---- -version: 1.1 - -manual: - - use_for_https: true # Also use this proxy for HTTPS - - https_proxy: - description: HTTPS Proxy - hidden: - variable: _.use_for_https - - address: - description: HTTPS address - default: - variable: __.http_proxy.address - - port: - description: HTTPS Port - default: - variable: __.http_proxy.port -... diff --git a/examples/050/SUBTITLE.md b/examples/050/SUBTITLE.md deleted file mode 100644 index 9ec8d33..0000000 --- a/examples/050/SUBTITLE.md +++ /dev/null @@ -1 +0,0 @@ -Family: dynamic diff --git a/examples/050/TITLE.md b/examples/050/TITLE.md index c9a10b1..5fface9 100644 --- a/examples/050/TITLE.md +++ b/examples/050/TITLE.md @@ -1 +1 @@ -SOCKS Manual mode +Dynamic family diff --git a/examples/050/URL b/examples/050/URL new file mode 100644 index 0000000..ef892f0 --- /dev/null +++ b/examples/050/URL @@ -0,0 +1 @@ +https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/dynfam.html diff --git a/examples/051/README.md b/examples/051/README.md index 3a47ef4..78e2e1b 100644 --- a/examples/051/README.md +++ b/examples/051/README.md @@ -1 +1 @@ -A conditional hidden family with Jinja +A conditional disabled variable with dynamic identifier diff --git a/examples/051/SUBTITLE.md b/examples/051/SUBTITLE.md deleted file mode 100644 index f479e14..0000000 --- a/examples/051/SUBTITLE.md +++ /dev/null @@ -1 +0,0 @@ -Property: Jinja and identifier condition diff --git a/examples/051/structural_files/firefox/20-manual.yml b/examples/051/structural_files/firefox/20-manual.yml index 53b6fe6..ae857ce 100644 --- a/examples/051/structural_files/firefox/20-manual.yml +++ b/examples/051/structural_files/firefox/20-manual.yml @@ -9,10 +9,7 @@ manual: '{{ identifier }}_proxy': description: '{{ identifier }} Proxy' hidden: - jinja: |- - {% if _.use_for_https %} - HTTPS is same has HTTP - {% endif %} + variable: _.use_for_https dynamic: - HTTPS - SOCKS @@ -26,4 +23,14 @@ manual: description: '{{ identifier }} port' default: variable: __.http_proxy.port + + version: + description: SOCKS host version used by proxy + choices: + - v4 + - v5 + default: v5 + disabled: + type: identifier + when: HTTPS ... diff --git a/examples/053/README.md b/examples/053/README.md deleted file mode 100644 index 3723340..0000000 --- a/examples/053/README.md +++ /dev/null @@ -1 +0,0 @@ -Jinja with a description diff --git a/examples/054/README.md b/examples/054/README.md deleted file mode 100644 index 4326a26..0000000 --- a/examples/054/README.md +++ /dev/null @@ -1 +0,0 @@ -A conditional disabled variable with identifier diff --git a/examples/060/README.md b/examples/060/README.md index 3306546..3a47ef4 100644 --- a/examples/060/README.md +++ b/examples/060/README.md @@ -1 +1 @@ -A variable with type "web_address" +A conditional hidden family with Jinja diff --git a/examples/060/TITLE.md b/examples/060/TITLE.md index f8448e5..5282e00 100644 --- a/examples/060/TITLE.md +++ b/examples/060/TITLE.md @@ -1 +1 @@ -Automatic proxy +Playing with Jinja diff --git a/examples/060/URL b/examples/060/URL new file mode 100644 index 0000000..ac03324 --- /dev/null +++ b/examples/060/URL @@ -0,0 +1 @@ +https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/calculation.html diff --git a/examples/052/config b/examples/060/config similarity index 100% rename from examples/052/config rename to examples/060/config diff --git a/examples/060/config/01/config.yml b/examples/060/config/01/config.yml deleted file mode 100644 index 1edbe91..0000000 --- a/examples/060/config/01/config.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -auto: https://auto.proxy.net/wpad.dat diff --git a/examples/060/config/02/config.yml b/examples/060/config/02/config.yml deleted file mode 100644 index 26df130..0000000 --- a/examples/060/config/02/config.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -proxy_mode: Automatic proxy configuration URL diff --git a/examples/060/firefox.png b/examples/060/firefox.png deleted file mode 100644 index 20701e2..0000000 Binary files a/examples/060/firefox.png and /dev/null differ diff --git a/examples/052/structural_files/firefox/20-manual.yml b/examples/060/structural_files/firefox/20-manual.yml similarity index 69% rename from examples/052/structural_files/firefox/20-manual.yml rename to examples/060/structural_files/firefox/20-manual.yml index ac20090..f1f87d9 100644 --- a/examples/052/structural_files/firefox/20-manual.yml +++ b/examples/060/structural_files/firefox/20-manual.yml @@ -10,12 +10,9 @@ manual: description: '{{ identifier }} Proxy' hidden: jinja: |- - {% if my_identifier == 'HTTPS' and _.use_for_https %} + {% if _.use_for_https %} HTTPS is same has HTTP {% endif %} - params: - my_identifier: - type: identifier dynamic: - HTTPS - SOCKS @@ -29,4 +26,14 @@ manual: description: '{{ identifier }} port' default: variable: __.http_proxy.port + + version: + description: SOCKS host version used by proxy + choices: + - v4 + - v5 + default: v5 + disabled: + type: identifier + when: HTTPS ... diff --git a/examples/060/structural_files/firefox/30-auto.yml b/examples/060/structural_files/firefox/30-auto.yml deleted file mode 100644 index 77e252b..0000000 --- a/examples/060/structural_files/firefox/30-auto.yml +++ /dev/null @@ -1,8 +0,0 @@ -%YAML 1.2 ---- -version: 1.1 - -auto: - description: Automatic proxy configuration URL - type: web_address -... diff --git a/examples/061/README.md b/examples/061/README.md index 7c3c2fe..3723340 100644 --- a/examples/061/README.md +++ b/examples/061/README.md @@ -1 +1 @@ -A conditional disabled variable +Jinja with a description diff --git a/examples/053/config b/examples/061/config similarity index 100% rename from examples/053/config rename to examples/061/config diff --git a/examples/061/config/01/README.md b/examples/061/config/01/README.md deleted file mode 100644 index 2e2d78a..0000000 --- a/examples/061/config/01/README.md +++ /dev/null @@ -1 +0,0 @@ -We cannot configure "auto" if "proxy_mode" is not "Automatic proxy configuration URL". diff --git a/examples/061/config/01/config.yml b/examples/061/config/01/config.yml deleted file mode 100644 index 1edbe91..0000000 --- a/examples/061/config/01/config.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -auto: https://auto.proxy.net/wpad.dat diff --git a/examples/061/config/02/config.yml b/examples/061/config/02/config.yml deleted file mode 100644 index 26df130..0000000 --- a/examples/061/config/02/config.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -proxy_mode: Automatic proxy configuration URL diff --git a/examples/053/structural_files/firefox/20-manual.yml b/examples/061/structural_files/firefox/20-manual.yml similarity index 71% rename from examples/053/structural_files/firefox/20-manual.yml rename to examples/061/structural_files/firefox/20-manual.yml index 06db3cd..a298cb4 100644 --- a/examples/053/structural_files/firefox/20-manual.yml +++ b/examples/061/structural_files/firefox/20-manual.yml @@ -10,13 +10,10 @@ manual: description: '{{ identifier }} Proxy' hidden: jinja: |- - {% if my_identifier == 'HTTPS' and _.use_for_https %} + {% if _.use_for_https %} HTTPS is same has HTTP {% endif %} - description: in HTTPS case if "_.use_for_https" is set to True - params: - my_identifier: - type: identifier + description: in HTTPS case if "_.use_for_https" is set to "true" dynamic: - HTTPS - SOCKS @@ -30,4 +27,14 @@ manual: description: '{{ identifier }} port' default: variable: __.http_proxy.port + + version: + description: SOCKS host version used by proxy + choices: + - v4 + - v5 + default: v5 + disabled: + type: identifier + when: HTTPS ... diff --git a/examples/052/README.md b/examples/062/README.md similarity index 100% rename from examples/052/README.md rename to examples/062/README.md diff --git a/examples/054/config b/examples/062/config similarity index 100% rename from examples/054/config rename to examples/062/config diff --git a/examples/054/structural_files/firefox/20-manual.yml b/examples/062/structural_files/firefox/20-manual.yml similarity index 99% rename from examples/054/structural_files/firefox/20-manual.yml rename to examples/062/structural_files/firefox/20-manual.yml index 298db34..eed0a57 100644 --- a/examples/054/structural_files/firefox/20-manual.yml +++ b/examples/062/structural_files/firefox/20-manual.yml @@ -13,7 +13,7 @@ manual: {% if my_identifier == 'HTTPS' and _.use_for_https %} HTTPS is same has HTTP {% endif %} - description: in HTTPS case if "_.use_for_https" is set to True + description: in HTTPS case if "_.use_for_https" is set to "true" params: my_identifier: type: identifier diff --git a/examples/070/README.md b/examples/070/README.md index 057f856..c17fb19 100644 --- a/examples/070/README.md +++ b/examples/070/README.md @@ -1 +1 @@ -A variable with type "domainname", parameters type and disabled +A conditional disabled variable with type web_address diff --git a/examples/070/SUBTITLE.md b/examples/070/SUBTITLE.md deleted file mode 100644 index 8a9df99..0000000 --- a/examples/070/SUBTITLE.md +++ /dev/null @@ -1 +0,0 @@ -Variable: multi and non mandatory diff --git a/examples/070/TITLE.md b/examples/070/TITLE.md index 90ad7d2..f8bc264 100644 --- a/examples/070/TITLE.md +++ b/examples/070/TITLE.md @@ -1 +1 @@ -Address for which proxy will be desactivated +Various variables diff --git a/examples/060/config/01/README.md b/examples/070/config/01/README.md similarity index 100% rename from examples/060/config/01/README.md rename to examples/070/config/01/README.md diff --git a/examples/070/config/01/config.yml b/examples/070/config/01/config.yml index ed97d53..1edbe91 100644 --- a/examples/070/config/01/config.yml +++ b/examples/070/config/01/config.yml @@ -1 +1,2 @@ --- +auto: https://auto.proxy.net/wpad.dat diff --git a/examples/070/config/02/config.yml b/examples/070/config/02/config.yml index 54956ea..26df130 100644 --- a/examples/070/config/02/config.yml +++ b/examples/070/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/060/config/03/config.yml b/examples/070/config/03/config.yml similarity index 100% rename from examples/060/config/03/config.yml rename to examples/070/config/03/config.yml diff --git a/examples/070/firefox.png b/examples/070/firefox.png deleted file mode 100644 index 16f5931..0000000 Binary files a/examples/070/firefox.png and /dev/null differ diff --git a/examples/070/firefox.xcf b/examples/070/firefox.xcf deleted file mode 100644 index 5cc54d7..0000000 Binary files a/examples/070/firefox.xcf and /dev/null differ diff --git a/examples/061/structural_files/firefox/30-auto.yml b/examples/070/structural_files/firefox/30-auto.yml similarity index 100% rename from examples/061/structural_files/firefox/30-auto.yml rename to examples/070/structural_files/firefox/30-auto.yml diff --git a/examples/071/README.md b/examples/071/README.md deleted file mode 100644 index 130d225..0000000 --- a/examples/071/README.md +++ /dev/null @@ -1 +0,0 @@ -A variable with multiple value diff --git a/examples/071/config/02/config.yml b/examples/071/config/02/config.yml deleted file mode 100644 index ccba4c0..0000000 --- a/examples/071/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/072/README.md b/examples/072/README.md deleted file mode 100644 index d83ef1b..0000000 --- a/examples/072/README.md +++ /dev/null @@ -1 +0,0 @@ -A non mandatory variable diff --git a/examples/073/README.md b/examples/073/README.md deleted file mode 100644 index ad6b7fb..0000000 --- a/examples/073/README.md +++ /dev/null @@ -1 +0,0 @@ -Examples diff --git a/examples/073/SUBTITLE.md b/examples/073/SUBTITLE.md deleted file mode 100644 index 5edfb9c..0000000 --- a/examples/073/SUBTITLE.md +++ /dev/null @@ -1 +0,0 @@ -Variable: extra description diff --git a/examples/075/README.md b/examples/075/README.md deleted file mode 100644 index d2a15d5..0000000 --- a/examples/075/README.md +++ /dev/null @@ -1 +0,0 @@ -A variable diff --git a/examples/075/TITLE.md b/examples/075/TITLE.md deleted file mode 100644 index 78cfd01..0000000 --- a/examples/075/TITLE.md +++ /dev/null @@ -1 +0,0 @@ -Prompt for authentication if password is saved diff --git a/examples/076/README.md b/examples/076/README.md deleted file mode 100644 index d2a15d5..0000000 --- a/examples/076/README.md +++ /dev/null @@ -1 +0,0 @@ -A variable diff --git a/examples/076/TITLE.md b/examples/076/TITLE.md deleted file mode 100644 index 1776034..0000000 --- a/examples/076/TITLE.md +++ /dev/null @@ -1 +0,0 @@ -Use proxy DNS when using SOCKS v5 diff --git a/examples/077/README.md b/examples/077/README.md deleted file mode 100644 index 89e0450..0000000 --- a/examples/077/README.md +++ /dev/null @@ -1 +0,0 @@ -Jinja calculation for an hidden variable with a potential inaccessible varible diff --git a/examples/080/README.md b/examples/080/README.md index 4207bc8..1266a43 100644 --- a/examples/080/README.md +++ b/examples/080/README.md @@ -1 +1 @@ -A boolean variable +A conditional disabled variable with type domainname and parameters diff --git a/examples/080/TITLE.md b/examples/080/TITLE.md deleted file mode 100644 index fc1521c..0000000 --- a/examples/080/TITLE.md +++ /dev/null @@ -1 +0,0 @@ -DNS over HTTPS diff --git a/examples/074/config/02/config.yml b/examples/080/config/02/config.yml similarity index 77% rename from examples/074/config/02/config.yml rename to examples/080/config/02/config.yml index 307e175..54956ea 100644 --- a/examples/074/config/02/config.yml +++ b/examples/080/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/080/firefox.png b/examples/080/firefox.png index d368003..16f5931 100644 Binary files a/examples/080/firefox.png and b/examples/080/firefox.png differ diff --git a/examples/080/firefox.xcf b/examples/080/firefox.xcf index c362607..5cc54d7 100644 Binary files a/examples/080/firefox.xcf and b/examples/080/firefox.xcf differ diff --git a/examples/070/structural_files/firefox/40-no_proxy.yml b/examples/080/structural_files/firefox/40-no_proxy.yml similarity index 100% rename from examples/070/structural_files/firefox/40-no_proxy.yml rename to examples/080/structural_files/firefox/40-no_proxy.yml diff --git a/examples/081/README.md b/examples/081/README.md index 9215d09..130d225 100644 --- a/examples/081/README.md +++ b/examples/081/README.md @@ -1 +1 @@ -A choice variable +A variable with multiple value diff --git a/examples/081/TITLE.md b/examples/081/TITLE.md new file mode 100644 index 0000000..b57c4df --- /dev/null +++ b/examples/081/TITLE.md @@ -0,0 +1 @@ +Multiple variable diff --git a/examples/081/config/02/config.yml b/examples/081/config/02/config.yml index aee4796..ccba4c0 100644 --- a/examples/081/config/02/config.yml +++ b/examples/081/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/061/config/03/config.yml b/examples/081/config/03/config.yml similarity index 100% rename from examples/061/config/03/config.yml rename to examples/081/config/03/config.yml diff --git a/examples/071/structural_files/firefox/40-no_proxy.yml b/examples/081/structural_files/firefox/40-no_proxy.yml similarity index 100% rename from examples/071/structural_files/firefox/40-no_proxy.yml rename to examples/081/structural_files/firefox/40-no_proxy.yml diff --git a/examples/082/README.md b/examples/082/README.md index 972da98..d83ef1b 100644 --- a/examples/082/README.md +++ b/examples/082/README.md @@ -1 +1 @@ -A web_address variable +A non mandatory variable diff --git a/examples/082/TITLE.md b/examples/082/TITLE.md new file mode 100644 index 0000000..1274fc5 --- /dev/null +++ b/examples/082/TITLE.md @@ -0,0 +1 @@ +Mandatory diff --git a/examples/072/config b/examples/082/config similarity index 100% rename from examples/072/config rename to examples/082/config diff --git a/examples/072/structural_files/firefox/40-no_proxy.yml b/examples/082/structural_files/firefox/40-no_proxy.yml similarity index 100% rename from examples/072/structural_files/firefox/40-no_proxy.yml rename to examples/082/structural_files/firefox/40-no_proxy.yml diff --git a/examples/083/README.md b/examples/083/README.md index c11c818..ad6b7fb 100644 --- a/examples/083/README.md +++ b/examples/083/README.md @@ -1 +1 @@ -A variable with custom validation +Examples diff --git a/examples/083/TITLE.md b/examples/083/TITLE.md new file mode 100644 index 0000000..7512a0c --- /dev/null +++ b/examples/083/TITLE.md @@ -0,0 +1 @@ +Extras informations for a variable diff --git a/examples/073/config b/examples/083/config similarity index 100% rename from examples/073/config rename to examples/083/config diff --git a/examples/073/structural_files/firefox/40-no_proxy.yml b/examples/083/structural_files/firefox/40-no_proxy.yml similarity index 100% rename from examples/073/structural_files/firefox/40-no_proxy.yml rename to examples/083/structural_files/firefox/40-no_proxy.yml diff --git a/examples/074/README.md b/examples/084/README.md similarity index 100% rename from examples/074/README.md rename to examples/084/README.md diff --git a/examples/074/config/01/config.yml b/examples/084/config/01/config.yml similarity index 100% rename from examples/074/config/01/config.yml rename to examples/084/config/01/config.yml diff --git a/examples/071/config/03/config.yml b/examples/084/config/02/config.yml similarity index 100% rename from examples/071/config/03/config.yml rename to examples/084/config/02/config.yml diff --git a/examples/074/config/03/config.yml b/examples/084/config/03/config.yml similarity index 100% rename from examples/074/config/03/config.yml rename to examples/084/config/03/config.yml diff --git a/examples/074/structural_files/firefox/40-no_proxy.yml b/examples/084/structural_files/firefox/40-no_proxy.yml similarity index 100% rename from examples/074/structural_files/firefox/40-no_proxy.yml rename to examples/084/structural_files/firefox/40-no_proxy.yml diff --git a/examples/085/README.md b/examples/085/README.md new file mode 100644 index 0000000..553d9c0 --- /dev/null +++ b/examples/085/README.md @@ -0,0 +1 @@ +A conditional disabled boolean variable diff --git a/examples/085/TITLE.md b/examples/085/TITLE.md new file mode 100644 index 0000000..f8bc264 --- /dev/null +++ b/examples/085/TITLE.md @@ -0,0 +1 @@ +Various variables diff --git a/examples/075/config/01/config.yml b/examples/085/config/01/config.yml similarity index 100% rename from examples/075/config/01/config.yml rename to examples/085/config/01/config.yml diff --git a/examples/075/config/02/config.yml b/examples/085/config/02/config.yml similarity index 100% rename from examples/075/config/02/config.yml rename to examples/085/config/02/config.yml diff --git a/examples/075/config/03/config.yml b/examples/085/config/03/config.yml similarity index 100% rename from examples/075/config/03/config.yml rename to examples/085/config/03/config.yml diff --git a/examples/075/config/04/config.yml b/examples/085/config/04/config.yml similarity index 100% rename from examples/075/config/04/config.yml rename to examples/085/config/04/config.yml diff --git a/examples/075/firefox.png b/examples/085/firefox.png similarity index 100% rename from examples/075/firefox.png rename to examples/085/firefox.png diff --git a/examples/075/firefox.xcf b/examples/085/firefox.xcf similarity index 100% rename from examples/075/firefox.xcf rename to examples/085/firefox.xcf diff --git a/examples/075/structural_files/firefox/50-prompt_authentication.yml b/examples/085/structural_files/firefox/50-prompt_authentication.yml similarity index 100% rename from examples/075/structural_files/firefox/50-prompt_authentication.yml rename to examples/085/structural_files/firefox/50-prompt_authentication.yml diff --git a/examples/086/README.md b/examples/086/README.md new file mode 100644 index 0000000..4207bc8 --- /dev/null +++ b/examples/086/README.md @@ -0,0 +1 @@ +A boolean variable diff --git a/examples/076/config/01/config.yml b/examples/086/config/01/config.yml similarity index 100% rename from examples/076/config/01/config.yml rename to examples/086/config/01/config.yml diff --git a/examples/076/config/02/config.yml b/examples/086/config/02/config.yml similarity index 100% rename from examples/076/config/02/config.yml rename to examples/086/config/02/config.yml diff --git a/examples/076/config/03/config.yml b/examples/086/config/03/config.yml similarity index 100% rename from examples/076/config/03/config.yml rename to examples/086/config/03/config.yml diff --git a/examples/076/config/04/config.yml b/examples/086/config/04/config.yml similarity index 100% rename from examples/076/config/04/config.yml rename to examples/086/config/04/config.yml diff --git a/examples/076/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/086/structural_files/firefox/55-proxy_dns_socks5.yml similarity index 100% rename from examples/076/structural_files/firefox/55-proxy_dns_socks5.yml rename to examples/086/structural_files/firefox/55-proxy_dns_socks5.yml diff --git a/examples/087/README.md b/examples/087/README.md new file mode 100644 index 0000000..4d33c92 --- /dev/null +++ b/examples/087/README.md @@ -0,0 +1 @@ +A Jinja conditional disabled boolean variable diff --git a/examples/077/config/01/config.yml b/examples/087/config/01/config.yml similarity index 100% rename from examples/077/config/01/config.yml rename to examples/087/config/01/config.yml diff --git a/examples/077/config/02/config.yml b/examples/087/config/02/config.yml similarity index 100% rename from examples/077/config/02/config.yml rename to examples/087/config/02/config.yml diff --git a/examples/077/config/03/config.yml b/examples/087/config/03/config.yml similarity index 100% rename from examples/077/config/03/config.yml rename to examples/087/config/03/config.yml diff --git a/examples/077/config/04/config.yml b/examples/087/config/04/config.yml similarity index 100% rename from examples/077/config/04/config.yml rename to examples/087/config/04/config.yml diff --git a/examples/077/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/087/structural_files/firefox/55-proxy_dns_socks5.yml similarity index 100% rename from examples/077/structural_files/firefox/55-proxy_dns_socks5.yml rename to examples/087/structural_files/firefox/55-proxy_dns_socks5.yml diff --git a/examples/078/README.md b/examples/088/README.md similarity index 100% rename from examples/078/README.md rename to examples/088/README.md diff --git a/examples/088/TITLE.md b/examples/088/TITLE.md new file mode 100644 index 0000000..6de1769 --- /dev/null +++ b/examples/088/TITLE.md @@ -0,0 +1 @@ +Mode diff --git a/examples/078/config/01/config.yml b/examples/088/config/01/config.yml similarity index 100% rename from examples/078/config/01/config.yml rename to examples/088/config/01/config.yml diff --git a/examples/078/config/02/config.yml b/examples/088/config/02/config.yml similarity index 100% rename from examples/078/config/02/config.yml rename to examples/088/config/02/config.yml diff --git a/examples/078/config/03/config.yml b/examples/088/config/03/config.yml similarity index 100% rename from examples/078/config/03/config.yml rename to examples/088/config/03/config.yml diff --git a/examples/078/config/04/config.yml b/examples/088/config/04/config.yml similarity index 100% rename from examples/078/config/04/config.yml rename to examples/088/config/04/config.yml diff --git a/examples/078/config/mode b/examples/088/config/mode similarity index 100% rename from examples/078/config/mode rename to examples/088/config/mode diff --git a/examples/078/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/088/structural_files/firefox/55-proxy_dns_socks5.yml similarity index 100% rename from examples/078/structural_files/firefox/55-proxy_dns_socks5.yml rename to examples/088/structural_files/firefox/55-proxy_dns_socks5.yml diff --git a/examples/090/README.md b/examples/090/README.md new file mode 100644 index 0000000..4207bc8 --- /dev/null +++ b/examples/090/README.md @@ -0,0 +1 @@ +A boolean variable diff --git a/examples/090/TITLE.md b/examples/090/TITLE.md new file mode 100644 index 0000000..f8bc264 --- /dev/null +++ b/examples/090/TITLE.md @@ -0,0 +1 @@ +Various variables diff --git a/examples/082/config/01/config.yml b/examples/090/config/01/config.yml similarity index 100% rename from examples/082/config/01/config.yml rename to examples/090/config/01/config.yml diff --git a/examples/090/firefox.png b/examples/090/firefox.png new file mode 100644 index 0000000..d368003 Binary files /dev/null and b/examples/090/firefox.png differ diff --git a/examples/060/firefox.xcf b/examples/090/firefox.xcf similarity index 75% rename from examples/060/firefox.xcf rename to examples/090/firefox.xcf index 89c7f4b..c362607 100644 Binary files a/examples/060/firefox.xcf and b/examples/090/firefox.xcf differ diff --git a/examples/080/structural_files/firefox/60-dns_over_https.yml b/examples/090/structural_files/firefox/60-dns_over_https.yml similarity index 100% rename from examples/080/structural_files/firefox/60-dns_over_https.yml rename to examples/090/structural_files/firefox/60-dns_over_https.yml diff --git a/examples/091/README.md b/examples/091/README.md new file mode 100644 index 0000000..9215d09 --- /dev/null +++ b/examples/091/README.md @@ -0,0 +1 @@ +A choice variable diff --git a/examples/083/config/01/config.yml b/examples/091/config/01/config.yml similarity index 100% rename from examples/083/config/01/config.yml rename to examples/091/config/01/config.yml diff --git a/examples/082/config/02/config.yml b/examples/091/config/02/config.yml similarity index 100% rename from examples/082/config/02/config.yml rename to examples/091/config/02/config.yml diff --git a/examples/081/structural_files/firefox/60-dns_over_https.yml b/examples/091/structural_files/firefox/60-dns_over_https.yml similarity index 100% rename from examples/081/structural_files/firefox/60-dns_over_https.yml rename to examples/091/structural_files/firefox/60-dns_over_https.yml diff --git a/examples/092/README.md b/examples/092/README.md new file mode 100644 index 0000000..972da98 --- /dev/null +++ b/examples/092/README.md @@ -0,0 +1 @@ +A web_address variable diff --git a/examples/092/config/01/config.yml b/examples/092/config/01/config.yml new file mode 100644 index 0000000..ed97d53 --- /dev/null +++ b/examples/092/config/01/config.yml @@ -0,0 +1 @@ +--- diff --git a/examples/083/config/02/config.yml b/examples/092/config/02/config.yml similarity index 100% rename from examples/083/config/02/config.yml rename to examples/092/config/02/config.yml diff --git a/examples/082/config/03/config.yml b/examples/092/config/03/config.yml similarity index 100% rename from examples/082/config/03/config.yml rename to examples/092/config/03/config.yml diff --git a/examples/082/config/04/config.yml b/examples/092/config/04/config.yml similarity index 100% rename from examples/082/config/04/config.yml rename to examples/092/config/04/config.yml diff --git a/examples/082/structural_files/firefox/60-dns_over_https.yml b/examples/092/structural_files/firefox/60-dns_over_https.yml similarity index 100% rename from examples/082/structural_files/firefox/60-dns_over_https.yml rename to examples/092/structural_files/firefox/60-dns_over_https.yml diff --git a/examples/093/README.md b/examples/093/README.md new file mode 100644 index 0000000..c11c818 --- /dev/null +++ b/examples/093/README.md @@ -0,0 +1 @@ +A variable with custom validation diff --git a/examples/093/TITLE.md b/examples/093/TITLE.md new file mode 100644 index 0000000..11c2e41 --- /dev/null +++ b/examples/093/TITLE.md @@ -0,0 +1 @@ +Validators diff --git a/examples/093/config/01/config.yml b/examples/093/config/01/config.yml new file mode 100644 index 0000000..ed97d53 --- /dev/null +++ b/examples/093/config/01/config.yml @@ -0,0 +1 @@ +--- diff --git a/examples/093/config/02/config.yml b/examples/093/config/02/config.yml new file mode 100644 index 0000000..aee4796 --- /dev/null +++ b/examples/093/config/02/config.yml @@ -0,0 +1,3 @@ +--- +dns_over_https: + enable_dns_over_https: true diff --git a/examples/083/config/03/config.yml b/examples/093/config/03/config.yml similarity index 100% rename from examples/083/config/03/config.yml rename to examples/093/config/03/config.yml diff --git a/examples/083/config/04/config.yml b/examples/093/config/04/config.yml similarity index 100% rename from examples/083/config/04/config.yml rename to examples/093/config/04/config.yml diff --git a/examples/083/structural_files/firefox/60-dns_over_https.yml b/examples/093/structural_files/firefox/60-dns_over_https.yml similarity index 91% rename from examples/083/structural_files/firefox/60-dns_over_https.yml rename to examples/093/structural_files/firefox/60-dns_over_https.yml index 3a57e00..55b37cc 100644 --- a/examples/083/structural_files/firefox/60-dns_over_https.yml +++ b/examples/093/structural_files/firefox/60-dns_over_https.yml @@ -22,7 +22,7 @@ dns_over_https: # DNS over HTTPS type: web_address validators: - jinja: |- - {% if dns_over_https.custom_dns_url.startswith('http://') %} + {% if _.custom_dns_url.startswith('http://') %} only https is allowed {% endif %} description: must starts with 'https://' only diff --git a/examples/100/TITLE.md b/examples/100/TITLE.md new file mode 100644 index 0000000..86ff802 --- /dev/null +++ b/examples/100/TITLE.md @@ -0,0 +1 @@ +Namespace