diff --git a/build.py b/build.py index 9cebbf6..9c843a7 100755 --- a/build.py +++ b/build.py @@ -13,11 +13,12 @@ from rougail.user_data_yaml import RougailUserDataYaml from rougail.output_doc import RougailOutputDoc -PREVIOUS = Path("previous.yml") if __name__ == "__main__": - commit_id = sys.argv[1] + builder_dir = sys.argv[1] + previous = Path(builder_dir) / "previous.yml" + commit_id = sys.argv[2] # rougailconfig = RougailConfig.copy() rougailconfig = get_rougail_config(backward_compatibility=False, add_extra_options=False) rougailconfig['main_structural_directories'] = ['firefox'] @@ -39,10 +40,10 @@ if __name__ == "__main__": has_mode = True else: has_mode = False + rougailconfig['step.output'] = 'doc' rougail = Rougail(rougailconfig) config = rougail.run() # print(config.value.get()) - rougailconfig['step.output'] = 'doc' rougailconfig['doc.output_format'] = 'github' rougailconfig['doc.title_level'] = 3 inventory = RougailOutputDoc(config, rougailconfig=rougailconfig.copy()) @@ -85,42 +86,42 @@ if __name__ == "__main__": doc += file_fh.read() doc += '\n```\n' rougailconfig['step.output'] = 'doc' + rougailconfig["doc.title_level"] = 4 inv_doc = inventory.run()[1] + CMD = f"foo@bar:~$ git switch --detach {commit_id}\n" + CMD += "foo@bar:~$ rougail -m firefox/ " + if has_namespace: + CMD += "-s Firefox " + if has_foxyproxy: + CMD += "-xn FoxyProxy -xd 0 foxyproxy/ " + if has_mode: + CMD += "--modes_level basic standard advanced " if file_found and inv_doc: - doc += inv_formatter.title('Generated documentation', 3) - CMD = f"foo@bar:~$ git switch --detach {commit_id}\n" - CMD += "foo@bar:~$ rougail -m firefox/ " - if has_namespace: - CMD += "-s Firefox " - if has_foxyproxy: - CMD += "-xn FoxyProxy -xd 0 foxyproxy/ " - if has_mode: - CMD += "--modes_level basic standard advanced " - cmd = CMD + "-o doc -do github" + doc += inv_formatter.title("Let's generate the documentation", 3) + cmd = CMD + "-o doc" doc += f'```console\n{cmd}\n```\n' doc += inv_doc - if PREVIOUS.is_file(): - rougailconfig["doc.title_level"] = 5 + if previous.is_file(): rougailconfig["doc.contents"] = ["changelog"] - rougailconfig["doc.previous_json_file"] = str(PREVIOUS) + rougailconfig["doc.previous_json_file"] = str(previous) inv_doc = inventory.run()[1] if file_found and inv_doc: - doc += inv_formatter.title('Changelog', 3) - cmd = CMD + "-o doc --doc.contents variables changelog -do github" + doc += inv_formatter.title("Let's generate the changelog", 3) + cmd = CMD + "-o doc --doc.contents changelog" doc += f'```console\n{cmd}\n```\n' - doc += inv_doc + doc += inv_doc + "\n" # save PREVIOUS rougailconfig["doc.contents"] = ["variables"] rougailconfig['doc.output_format'] = 'json' data = inventory.run()[1] if data: - with PREVIOUS.open('w') as fh: + with previous.open('w') as fh: dump(loads(data), fh) # rougailconfig['step.output'] = 'console' config = Path('config') if config.is_dir(): - doc += inv_formatter.title('User data', 2) + doc += inv_formatter.title('User datas', 2) configs = list(config.iterdir()) configs.sort() for idx, dirname in enumerate(configs): @@ -167,16 +168,15 @@ if __name__ == "__main__": tiramisu_config.property.read_write export = RougailOutputConsole(tiramisu_config, rougailconfig=rougailconfig, - user_data_errors=data.errors, - user_data_warnings=data.warnings, + user_data_errors=errors['errors'], + user_data_warnings=errors['warnings'], ) console = export.run()[1] conv = Ansi2HTMLConverter(inline=True) doc += inv_formatter.title('Output in read write mode', 4) cmd = cmd + " --cli.read_write" doc += f"```console\n{cmd}\n```\n" - conv_data = '
' + conv.convert(console, full=False) + "
\n" - doc += '
' + conv_data + "
\n" + doc += '
' + conv.convert(console, full=False) + "
\n" with open(dirname / 'output_rw.html', 'w') as fh_output: fh_output.write(conv_data) # diff --git a/build.sh b/build.sh index d497dd2..9903ae7 100755 --- a/build.sh +++ b/build.sh @@ -27,7 +27,7 @@ cp "$BUILDER"/firefox.png . cp "$BUILDER"/foxyproxy.png . cp "$BUILDER"/summary.md . touch README.md -"$BUILDER"/build.py "$VERSION" +"$BUILDER"/build.py "$BUILDER" "$VERSION" rm -rf summary.md rm -rf summary_total.md rm -rf jinja_caches @@ -41,7 +41,7 @@ for i in $(ls -d "examples"/* | sort); do num=$(echo $(basename "$i")) echo "$num" commit_id="v${VERSION}_$num" - summary="[tutorial $(basename $i)] $(head -n 1 $i/README.md)" + summary="[tutorial $commit_id] $(head -n 1 $i/README.md)" 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 @@ -57,7 +57,7 @@ for i in $(ls -d "examples"/* | sort); do num=$(echo $(basename "$i")) echo "$num" commit_id="v${VERSION}_$num" - summary="[tutorial $(basename $i)] $(head -n 1 $i/README.md)" + summary="[tutorial $commit_id)] $(head -n 1 $i/README.md)" 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 cp "summary_total.md" "$DEST" @@ -100,7 +100,7 @@ for i in $(ls -d "examples"/* | sort); do if [ -f config/mode ]; then mv config/mode mode fi - "$BUILDER"/build.py "$commit_id" + "$BUILDER"/build.py "$BUILDER" "$commit_id" rm -rf config/*/README.md config/read_write config/namespace rm -rf jinja_caches summary.md summary_before.md summary_after.md summary_total.md if [ -f mode ]; then @@ -146,6 +146,8 @@ This is what the page looks like: echo '# Installation ```bash +# git clone -b 1.1 https://forge.cloud.silique.fr/stove/rougail-tutorials.git +# cd rougail-tutorials # python -m venv rougail # . rougail/bin/activate # pip install rougail-cli rougail-output-exporter rougail-output-doc rougail-user-data-file diff --git a/examples/000/README.md b/examples/000/README.md index 184d736..4128c51 100644 --- a/examples/000/README.md +++ b/examples/000/README.md @@ -1 +1 @@ -A structured file with format version +An empty structured file with format version diff --git a/examples/000/SUBTITLE.md b/examples/000/SUBTITLE.md index bd5e267..34d0d9e 100644 --- a/examples/000/SUBTITLE.md +++ b/examples/000/SUBTITLE.md @@ -1 +1 @@ -Structural file +Making a structure file diff --git a/examples/010/config/01/README.md b/examples/000/config/01/README.md similarity index 100% rename from examples/010/config/01/README.md rename to examples/000/config/01/README.md diff --git a/examples/010/config/01/config.yaml b/examples/000/config/01/config.yaml similarity index 100% rename from examples/010/config/01/config.yaml rename to examples/000/config/01/config.yaml diff --git a/examples/001/README.md b/examples/001/README.md new file mode 100644 index 0000000..5abcd36 --- /dev/null +++ b/examples/001/README.md @@ -0,0 +1 @@ +A first variable with only a name diff --git a/examples/001/SUBTITLE.md b/examples/001/SUBTITLE.md new file mode 100644 index 0000000..fb61c88 --- /dev/null +++ b/examples/001/SUBTITLE.md @@ -0,0 +1 @@ +Let's create our first "variable" diff --git a/examples/001/config/01/README.md b/examples/001/config/01/README.md new file mode 100644 index 0000000..63072c4 --- /dev/null +++ b/examples/001/config/01/README.md @@ -0,0 +1 @@ +The user data file is empty. So it's only default value that will be used. diff --git a/examples/022/config/01/config.yaml b/examples/001/config/01/config.yaml similarity index 100% rename from examples/022/config/01/config.yaml rename to examples/001/config/01/config.yaml diff --git a/examples/010/config/02/config.yaml b/examples/001/config/02/config.yaml similarity index 100% rename from examples/010/config/02/config.yaml rename to examples/001/config/02/config.yaml diff --git a/examples/010/config/03/config.yaml b/examples/001/config/03/config.yaml similarity index 100% rename from examples/010/config/03/config.yaml rename to examples/001/config/03/config.yaml diff --git a/examples/010/config/04/README.md b/examples/001/config/04/README.md similarity index 100% rename from examples/010/config/04/README.md rename to examples/001/config/04/README.md diff --git a/examples/010/config/04/config.yaml b/examples/001/config/04/config.yaml similarity index 100% rename from examples/010/config/04/config.yaml rename to examples/001/config/04/config.yaml diff --git a/examples/010/config/05/README.md b/examples/001/config/05/README.md similarity index 100% rename from examples/010/config/05/README.md rename to examples/001/config/05/README.md diff --git a/examples/010/config/05/config.yaml b/examples/001/config/05/config.yaml similarity index 100% rename from examples/010/config/05/config.yaml rename to examples/001/config/05/config.yaml diff --git a/examples/001/firefox.png b/examples/001/firefox.png new file mode 100644 index 0000000..45725ac Binary files /dev/null and b/examples/001/firefox.png differ diff --git a/examples/020/firefox.xcf b/examples/001/firefox.xcf similarity index 62% rename from examples/020/firefox.xcf rename to examples/001/firefox.xcf index a2160e6..1101ae9 100644 Binary files a/examples/020/firefox.xcf and b/examples/001/firefox.xcf differ diff --git a/examples/010/structural_files/firefox/00-proxy.yml b/examples/001/structural_files/firefox/00-proxy.yml similarity index 100% rename from examples/010/structural_files/firefox/00-proxy.yml rename to examples/001/structural_files/firefox/00-proxy.yml diff --git a/examples/002/README.md b/examples/002/README.md new file mode 100644 index 0000000..affa716 --- /dev/null +++ b/examples/002/README.md @@ -0,0 +1,9 @@ +Describe the variable + +We can add a description to this first variable. + +This information is useful for: + +- documentation +- error message +- help user to known which value to set to this variable (for example with [the user data plugin Questionary](https://forge.cloud.silique.fr/stove/rougail-user-data-questionary)). diff --git a/examples/011/config b/examples/002/config similarity index 100% rename from examples/011/config rename to examples/002/config diff --git a/examples/011/structural_files/firefox/00-proxy.yml b/examples/002/structural_files/firefox/00-proxy.yml similarity index 100% rename from examples/011/structural_files/firefox/00-proxy.yml rename to examples/002/structural_files/firefox/00-proxy.yml diff --git a/examples/003/README.md b/examples/003/README.md new file mode 100644 index 0000000..12250ff --- /dev/null +++ b/examples/003/README.md @@ -0,0 +1,7 @@ +Set a default value + +Now we can define the default value of this variable. + +If the user doesn't touch this variable's value, the value is "No proxy" + +As user intervention is no more required, so the variable change it's default mode too (from "basic" to "standard"). diff --git a/examples/012/config b/examples/003/config similarity index 100% rename from examples/012/config rename to examples/003/config diff --git a/examples/012/structural_files/firefox/00-proxy.yml b/examples/003/structural_files/firefox/00-proxy.yml similarity index 100% rename from examples/012/structural_files/firefox/00-proxy.yml rename to examples/003/structural_files/firefox/00-proxy.yml diff --git a/examples/013/README.md b/examples/004/README.md similarity index 87% rename from examples/013/README.md rename to examples/004/README.md index 5f84ecf..9a85396 100644 --- a/examples/013/README.md +++ b/examples/004/README.md @@ -1,4 +1,4 @@ -A variable with type "choice" +Limits the possible values for the variable "Foo" should not be an option to the "proxy_mode" variable. diff --git a/examples/013/config b/examples/004/config similarity index 100% rename from examples/013/config rename to examples/004/config diff --git a/examples/014/structural_files/firefox/00-proxy.yml b/examples/004/structural_files/firefox/00-proxy.yml similarity index 100% rename from examples/014/structural_files/firefox/00-proxy.yml rename to examples/004/structural_files/firefox/00-proxy.yml diff --git a/examples/010/README.md b/examples/010/README.md index 5abcd36..6afc5c2 100644 --- a/examples/010/README.md +++ b/examples/010/README.md @@ -1 +1 @@ -A first variable with only a name +Creating a new family diff --git a/examples/010/SUBTITLE.md b/examples/010/SUBTITLE.md index 50b3d6b..fed1939 100644 --- a/examples/010/SUBTITLE.md +++ b/examples/010/SUBTITLE.md @@ -1 +1 @@ -Variable: choice the proxy mode +Group variables inside "families" diff --git a/examples/010/firefox.png b/examples/010/firefox.png index 45725ac..e40ce96 100644 Binary files a/examples/010/firefox.png and b/examples/010/firefox.png differ diff --git a/examples/010/firefox.xcf b/examples/010/firefox.xcf index 1101ae9..a2160e6 100644 Binary files a/examples/010/firefox.xcf and b/examples/010/firefox.xcf differ diff --git a/examples/010/structural_files/firefox/10-manual.yml b/examples/010/structural_files/firefox/10-manual.yml new file mode 100644 index 0000000..7626e80 --- /dev/null +++ b/examples/010/structural_files/firefox/10-manual.yml @@ -0,0 +1,8 @@ +%YAML 1.2 +--- +version: 1.1 + +manual: + description: Manual proxy configuration + type: family +... diff --git a/examples/011/README.md b/examples/011/README.md index e5a66f6..5ae0405 100644 --- a/examples/011/README.md +++ b/examples/011/README.md @@ -1,9 +1,8 @@ -The variable description +Or a sub family -We can add a description to this first variable. +Inside a family, we can have variables or families. -This information is useful for: +The "type" for family "manual" became unecessary because container an other family, so it's not a variable. +The description can now be has family comment. -- documentation -- error message -- help user to known which value to set to this variable (for example with [the user data plugin Questionary](https://forge.cloud.silique.fr/stove/rougail-user-data-questionary)). +In disabled attribute, it's better tu use relative path (we will see the reason in an other slide). diff --git a/examples/011/structural_files/firefox/10-manual.yml b/examples/011/structural_files/firefox/10-manual.yml new file mode 100644 index 0000000..5d6d2b0 --- /dev/null +++ b/examples/011/structural_files/firefox/10-manual.yml @@ -0,0 +1,10 @@ +%YAML 1.2 +--- +version: 1.1 + +manual: # Manual proxy configuration + + http_proxy: + description: HTTP Proxy + type: family +... diff --git a/examples/012/README.md b/examples/012/README.md index 2931300..56d9fbd 100644 --- a/examples/012/README.md +++ b/examples/012/README.md @@ -1,7 +1 @@ -A default value - -Now we can define the default value of this variable. - -If the user doesn't touch this variable's value, the value is "No proxy" - -As user intervention is no more required, so the variable change it's default mode too (from "basic" to "standard"). +Putting a variable inside of a family or a sub family diff --git a/examples/023/config/01/config.yaml b/examples/012/config/01/config.yaml similarity index 100% rename from examples/023/config/01/config.yaml rename to examples/012/config/01/config.yaml diff --git a/examples/022/config/02/config.yaml b/examples/012/config/02/config.yaml similarity index 100% rename from examples/022/config/02/config.yaml rename to examples/012/config/02/config.yaml diff --git a/examples/022/config/03/config.yaml b/examples/012/config/03/config.yaml similarity index 100% rename from examples/022/config/03/config.yaml rename to examples/012/config/03/config.yaml diff --git a/examples/022/config/04/config.yaml b/examples/012/config/04/config.yaml similarity index 100% rename from examples/022/config/04/config.yaml rename to examples/012/config/04/config.yaml diff --git a/examples/022/config/05/README.md b/examples/012/config/05/README.md similarity index 100% rename from examples/022/config/05/README.md rename to examples/012/config/05/README.md diff --git a/examples/022/config/05/config.yaml b/examples/012/config/05/config.yaml similarity index 100% rename from examples/022/config/05/config.yaml rename to examples/012/config/05/config.yaml diff --git a/examples/022/config/read_write b/examples/012/config/read_write similarity index 100% rename from examples/022/config/read_write rename to examples/012/config/read_write diff --git a/examples/023/structural_files/firefox/10-manual.yml b/examples/012/structural_files/firefox/10-manual.yml similarity index 59% rename from examples/023/structural_files/firefox/10-manual.yml rename to examples/012/structural_files/firefox/10-manual.yml index 39f4cb2..316c6ce 100644 --- a/examples/023/structural_files/firefox/10-manual.yml +++ b/examples/012/structural_files/firefox/10-manual.yml @@ -6,7 +6,5 @@ manual: # Manual proxy configuration http_proxy: # HTTP Proxy - address: - description: HTTP address - type: domainname + address: # HTTP address ... diff --git a/examples/013/structural_files/firefox/00-proxy.yml b/examples/013/structural_files/firefox/00-proxy.yml deleted file mode 100644 index 71c2c5e..0000000 --- a/examples/013/structural_files/firefox/00-proxy.yml +++ /dev/null @@ -1,15 +0,0 @@ -%YAML 1.2 ---- -version: 1.1 - -proxy_mode: - description: Configure Proxy Access to the Internet - type: choice - choices: - - No proxy - - Auto-detect proxy settings for this network - - Use system proxy settings - - Manual proxy configuration - - Automatic proxy configuration URL - default: No proxy -... diff --git a/examples/014/README.md b/examples/014/README.md deleted file mode 100644 index 4f83f97..0000000 --- a/examples/014/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Choice type is optional - -The type is optional in choice type (if we have choices attributes, it's a choice option). diff --git a/examples/014/config b/examples/014/config deleted file mode 120000 index 160a2a6..0000000 --- a/examples/014/config +++ /dev/null @@ -1 +0,0 @@ -../010/config \ No newline at end of file diff --git a/examples/020/README.md b/examples/020/README.md index 6a27bc7..d3326ec 100644 --- a/examples/020/README.md +++ b/examples/020/README.md @@ -1,14 +1 @@ -A family - -The "manual" mode structural descriptions are write in a new files to separate things. But Rougail will concatenate variables and families. - -We create a family, which will contain other variables. - -This family has: - -- a description -- a type - -As there is no variable inside this family, the type is mandatory. Without it, Rougail will create a variable. - -In fact, this family will be deleted by Rougail too because it is empty. +A variable with type "domainname" diff --git a/examples/020/SUBTITLE.md b/examples/020/SUBTITLE.md deleted file mode 100644 index cb4592b..0000000 --- a/examples/020/SUBTITLE.md +++ /dev/null @@ -1 +0,0 @@ -Family: proxy manual diff --git a/examples/020/TITLE.md b/examples/020/TITLE.md new file mode 100644 index 0000000..ee57e08 --- /dev/null +++ b/examples/020/TITLE.md @@ -0,0 +1 @@ +Constrainte the value of a variable with it's type diff --git a/examples/064/config/01/config.yaml b/examples/020/config/01/config.yaml similarity index 100% rename from examples/064/config/01/config.yaml rename to examples/020/config/01/config.yaml diff --git a/examples/023/config/02/config.yaml b/examples/020/config/02/config.yaml similarity index 100% rename from examples/023/config/02/config.yaml rename to examples/020/config/02/config.yaml diff --git a/examples/023/config/03/config.yaml b/examples/020/config/03/config.yaml similarity index 100% rename from examples/023/config/03/config.yaml rename to examples/020/config/03/config.yaml diff --git a/examples/023/config/04/config.yaml b/examples/020/config/04/config.yaml similarity index 100% rename from examples/023/config/04/config.yaml rename to examples/020/config/04/config.yaml diff --git a/examples/023/config/05/README.md b/examples/020/config/05/README.md similarity index 100% rename from examples/023/config/05/README.md rename to examples/020/config/05/README.md diff --git a/examples/023/config/05/config.yaml b/examples/020/config/05/config.yaml similarity index 100% rename from examples/023/config/05/config.yaml rename to examples/020/config/05/config.yaml diff --git a/examples/023/config/read_write b/examples/020/config/read_write similarity index 100% rename from examples/023/config/read_write rename to examples/020/config/read_write diff --git a/examples/020/firefox.png b/examples/020/firefox.png deleted file mode 100644 index e40ce96..0000000 Binary files a/examples/020/firefox.png and /dev/null differ diff --git a/examples/020/structural_files/firefox/10-manual.yml b/examples/020/structural_files/firefox/10-manual.yml index 7626e80..39f4cb2 100644 --- a/examples/020/structural_files/firefox/10-manual.yml +++ b/examples/020/structural_files/firefox/10-manual.yml @@ -2,7 +2,11 @@ --- version: 1.1 -manual: - description: Manual proxy configuration - type: family +manual: # Manual proxy configuration + + http_proxy: # HTTP Proxy + + address: + description: HTTP address + type: domainname ... diff --git a/examples/021/README.md b/examples/021/README.md index 06a13e3..57a7fb3 100644 --- a/examples/021/README.md +++ b/examples/021/README.md @@ -1,8 +1 @@ -A sub family - -Inside a family, we can have variables or families. - -The "type" for family "manual" became unecessary because container an other family, so it's not a variable. -The description can now be has family comment. - -In disabled attribute, it's better tu use relative path (we will see the reason in an other slide). +A variable with type's parameters diff --git a/examples/025/config b/examples/021/config similarity index 100% rename from examples/025/config rename to examples/021/config diff --git a/examples/021/structural_files/firefox/10-manual.yml b/examples/021/structural_files/firefox/10-manual.yml index 5d6d2b0..973e436 100644 --- a/examples/021/structural_files/firefox/10-manual.yml +++ b/examples/021/structural_files/firefox/10-manual.yml @@ -4,7 +4,11 @@ version: 1.1 manual: # Manual proxy configuration - http_proxy: - description: HTTP Proxy - type: family + http_proxy: # HTTP Proxy + + address: + description: HTTP address + type: domainname + params: + allow_ip: true ... diff --git a/examples/022/README.md b/examples/022/README.md index 830d642..da8667a 100644 --- a/examples/022/README.md +++ b/examples/022/README.md @@ -1 +1 @@ -A variable inside sub family +A variable with type "port" diff --git a/examples/026/config b/examples/022/config similarity index 100% rename from examples/026/config rename to examples/022/config diff --git a/examples/022/structural_files/firefox/10-manual.yml b/examples/022/structural_files/firefox/10-manual.yml index 316c6ce..304fc84 100644 --- a/examples/022/structural_files/firefox/10-manual.yml +++ b/examples/022/structural_files/firefox/10-manual.yml @@ -6,5 +6,14 @@ manual: # Manual proxy configuration http_proxy: # HTTP Proxy - address: # HTTP address + address: + description: HTTP address + type: domainname + params: + allow_ip: true + + port: + description: HTTP Port + type: port + default: 8080 ... diff --git a/examples/023/README.md b/examples/023/README.md index d3326ec..fe24996 100644 --- a/examples/023/README.md +++ b/examples/023/README.md @@ -1 +1 @@ -A variable with type "domainname" +A variable with type "boolean" diff --git a/examples/023/SUBTITLE.md b/examples/023/SUBTITLE.md deleted file mode 100644 index cf6541b..0000000 --- a/examples/023/SUBTITLE.md +++ /dev/null @@ -1 +0,0 @@ -Variable: type and type parameters diff --git a/examples/023/TITLE.md b/examples/023/TITLE.md deleted file mode 100644 index 7ff24c3..0000000 --- a/examples/023/TITLE.md +++ /dev/null @@ -1 +0,0 @@ -HTTP Manual mode diff --git a/examples/034/config b/examples/023/config similarity index 100% rename from examples/034/config rename to examples/023/config diff --git a/examples/030/firefox.png b/examples/023/firefox.png similarity index 100% rename from examples/030/firefox.png rename to examples/023/firefox.png diff --git a/examples/030/firefox.xcf b/examples/023/firefox.xcf similarity index 100% rename from examples/030/firefox.xcf rename to examples/023/firefox.xcf diff --git a/examples/030/structural_files/firefox/20-manual.yml b/examples/023/structural_files/firefox/20-manual.yml similarity index 100% rename from examples/030/structural_files/firefox/20-manual.yml rename to examples/023/structural_files/firefox/20-manual.yml diff --git a/examples/024/README.md b/examples/024/README.md index 57a7fb3..7d9b8be 100644 --- a/examples/024/README.md +++ b/examples/024/README.md @@ -1 +1 @@ -A variable with type's parameters +Copy HTTP manual proxy to HTTPS manual proxy diff --git a/examples/024/config b/examples/024/config index de1b26f..dce6a43 120000 --- a/examples/024/config +++ b/examples/024/config @@ -1 +1 @@ -../022/config \ No newline at end of file +../013/config \ No newline at end of file diff --git a/examples/024/structural_files/firefox/10-manual.yml b/examples/024/structural_files/firefox/10-manual.yml deleted file mode 100644 index 973e436..0000000 --- a/examples/024/structural_files/firefox/10-manual.yml +++ /dev/null @@ -1,14 +0,0 @@ -%YAML 1.2 ---- -version: 1.1 - -manual: # Manual proxy configuration - - http_proxy: # HTTP Proxy - - address: - description: HTTP address - type: domainname - params: - allow_ip: true -... diff --git a/examples/031/structural_files/firefox/20-manual.yml b/examples/024/structural_files/firefox/20-manual.yml similarity index 100% rename from examples/031/structural_files/firefox/20-manual.yml rename to examples/024/structural_files/firefox/20-manual.yml diff --git a/examples/025/README.md b/examples/025/README.md deleted file mode 100644 index da8667a..0000000 --- a/examples/025/README.md +++ /dev/null @@ -1 +0,0 @@ -A variable with type "port" diff --git a/examples/025/structural_files/firefox/10-manual.yml b/examples/025/structural_files/firefox/10-manual.yml deleted file mode 100644 index 304fc84..0000000 --- a/examples/025/structural_files/firefox/10-manual.yml +++ /dev/null @@ -1,19 +0,0 @@ -%YAML 1.2 ---- -version: 1.1 - -manual: # Manual proxy configuration - - http_proxy: # HTTP Proxy - - address: - description: HTTP address - type: domainname - params: - allow_ip: true - - port: - description: HTTP Port - type: port - default: 8080 -... diff --git a/examples/026/README.md b/examples/026/README.md deleted file mode 100644 index 553282f..0000000 --- a/examples/026/README.md +++ /dev/null @@ -1 +0,0 @@ -A disabled family diff --git a/examples/026/SUBTITLE.md b/examples/026/SUBTITLE.md deleted file mode 100644 index bf25510..0000000 --- a/examples/026/SUBTITLE.md +++ /dev/null @@ -1 +0,0 @@ -Property: disabled diff --git a/examples/027/README.md b/examples/027/README.md deleted file mode 100644 index dbdd290..0000000 --- a/examples/027/README.md +++ /dev/null @@ -1 +0,0 @@ -A conditional disabled family with a variable diff --git a/examples/027/config b/examples/027/config deleted file mode 120000 index de1b26f..0000000 --- a/examples/027/config +++ /dev/null @@ -1 +0,0 @@ -../022/config \ No newline at end of file diff --git a/examples/030/README.md b/examples/030/README.md index fe24996..553282f 100644 --- a/examples/030/README.md +++ b/examples/030/README.md @@ -1 +1 @@ -A variable with type "boolean" +A disabled family diff --git a/examples/030/SUBTITLE.md b/examples/030/SUBTITLE.md new file mode 100644 index 0000000..a457f0c --- /dev/null +++ b/examples/030/SUBTITLE.md @@ -0,0 +1 @@ +Disable a family diff --git a/examples/030/TITLE.md b/examples/030/TITLE.md index 3730688..5202295 100644 --- a/examples/030/TITLE.md +++ b/examples/030/TITLE.md @@ -1 +1 @@ -HTTP proxy provides HTTPS proxy +Define access to variable or family diff --git a/examples/030/config b/examples/030/config index dce6a43..de1b26f 120000 --- a/examples/030/config +++ b/examples/030/config @@ -1 +1 @@ -../013/config \ No newline at end of file +../022/config \ No newline at end of file diff --git a/examples/026/structural_files/firefox/10-manual.yml b/examples/030/structural_files/firefox/10-manual.yml similarity index 100% rename from examples/026/structural_files/firefox/10-manual.yml rename to examples/030/structural_files/firefox/10-manual.yml diff --git a/examples/031/README.md b/examples/031/README.md index 7d9b8be..dbdd290 100644 --- a/examples/031/README.md +++ b/examples/031/README.md @@ -1 +1 @@ -Copy HTTP manual proxy to HTTPS manual proxy +A conditional disabled family with a variable diff --git a/examples/031/TITLE.md b/examples/031/TITLE.md deleted file mode 100644 index b033e3d..0000000 --- a/examples/031/TITLE.md +++ /dev/null @@ -1 +0,0 @@ -HTTPS Manual mode diff --git a/examples/031/config b/examples/031/config index dce6a43..de1b26f 120000 --- a/examples/031/config +++ b/examples/031/config @@ -1 +1 @@ -../013/config \ No newline at end of file +../022/config \ No newline at end of file diff --git a/examples/027/structural_files/firefox/10-manual.yml b/examples/031/structural_files/firefox/10-manual.yml similarity index 100% rename from examples/027/structural_files/firefox/10-manual.yml rename to examples/031/structural_files/firefox/10-manual.yml diff --git a/examples/031/SUBTITLE.md b/examples/032/SUBTITLE.md similarity index 100% rename from examples/031/SUBTITLE.md rename to examples/032/SUBTITLE.md diff --git a/examples/034/README.md b/examples/034/README.md deleted file mode 100644 index 1be0e6e..0000000 --- a/examples/034/README.md +++ /dev/null @@ -1 +0,0 @@ -A calculated default value diff --git a/examples/034/SUBTITLE.md b/examples/034/SUBTITLE.md deleted file mode 100644 index 9f51301..0000000 --- a/examples/034/SUBTITLE.md +++ /dev/null @@ -1 +0,0 @@ -Variable: calculated default value diff --git a/examples/034/structural_files/firefox/20-manual.yml b/examples/034/structural_files/firefox/20-manual.yml deleted file mode 100644 index 3e15a0b..0000000 --- a/examples/034/structural_files/firefox/20-manual.yml +++ /dev/null @@ -1,27 +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 - 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/035/README.md b/examples/035/README.md deleted file mode 100644 index 26a03cf..0000000 --- a/examples/035/README.md +++ /dev/null @@ -1 +0,0 @@ -Variable type and parameters type are copied with default value diff --git a/examples/035/config b/examples/035/config deleted file mode 120000 index 12177f8..0000000 --- a/examples/035/config +++ /dev/null @@ -1 +0,0 @@ -../017/config \ No newline at end of file diff --git a/examples/040/README.md b/examples/040/README.md index e245b81..1be0e6e 100644 --- a/examples/040/README.md +++ b/examples/040/README.md @@ -1 +1 @@ -Family: a dynamic family +A calculated default value diff --git a/examples/040/TITLE.md b/examples/040/TITLE.md index c9a10b1..9f51301 100644 --- a/examples/040/TITLE.md +++ b/examples/040/TITLE.md @@ -1 +1 @@ -SOCKS Manual mode +Variable: calculated default value diff --git a/examples/040/config b/examples/040/config index 3bac45d..dce6a43 120000 --- a/examples/040/config +++ b/examples/040/config @@ -1 +1 @@ -../018/config \ No newline at end of file +../013/config \ No newline at end of file diff --git a/examples/040/structural_files/firefox/20-manual.yml b/examples/040/structural_files/firefox/20-manual.yml index fc35af3..3e15a0b 100644 --- a/examples/040/structural_files/firefox/20-manual.yml +++ b/examples/040/structural_files/firefox/20-manual.yml @@ -6,21 +6,22 @@ manual: use_for_https: true # Also use this proxy for HTTPS - '{{ identifier }}_proxy': - description: '{{ identifier }} Proxy' + https_proxy: + description: HTTPS Proxy hidden: variable: _.use_for_https - dynamic: - - HTTPS - - SOCKS address: - description: '{{ identifier }} address' + description: HTTPS address + type: domainname + params: + allow_ip: true default: variable: __.http_proxy.address port: - description: '{{ identifier }} port' + description: HTTPS Port + type: port default: variable: __.http_proxy.port ... diff --git a/examples/041/README.md b/examples/041/README.md index 3a47ef4..26a03cf 100644 --- a/examples/041/README.md +++ b/examples/041/README.md @@ -1 +1 @@ -A conditional hidden family with Jinja +Variable type and parameters type are copied with default value diff --git a/examples/041/config b/examples/041/config index 3bac45d..12177f8 120000 --- a/examples/041/config +++ b/examples/041/config @@ -1 +1 @@ -../018/config \ No newline at end of file +../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 index 4ecd6ab..f25bcd9 100644 --- a/examples/041/structural_files/firefox/20-manual.yml +++ b/examples/041/structural_files/firefox/20-manual.yml @@ -6,24 +6,18 @@ manual: use_for_https: true # Also use this proxy for HTTPS - '{{ identifier }}_proxy': - description: '{{ identifier }} Proxy' + https_proxy: + description: HTTPS Proxy hidden: - jinja: |- - {% if manual.use_for_https %} - HTTPS is same has HTTP - {% endif %} - dynamic: - - HTTPS - - SOCKS + variable: _.use_for_https address: - description: '{{ identifier }} address' + description: HTTPS address default: variable: __.http_proxy.address port: - description: '{{ identifier }} port' + description: HTTPS Port default: variable: __.http_proxy.port ... diff --git a/examples/050/README.md b/examples/050/README.md index 3306546..e245b81 100644 --- a/examples/050/README.md +++ b/examples/050/README.md @@ -1 +1 @@ -A variable with type "web_address" +Family: a dynamic family diff --git a/examples/040/SUBTITLE.md b/examples/050/SUBTITLE.md similarity index 100% rename from examples/040/SUBTITLE.md rename to examples/050/SUBTITLE.md diff --git a/examples/050/TITLE.md b/examples/050/TITLE.md index f8448e5..c9a10b1 100644 --- a/examples/050/TITLE.md +++ b/examples/050/TITLE.md @@ -1 +1 @@ -Automatic proxy +SOCKS Manual mode diff --git a/examples/042/config b/examples/050/config similarity index 100% rename from examples/042/config rename to examples/050/config diff --git a/examples/050/config/01/config.yaml b/examples/050/config/01/config.yaml deleted file mode 100644 index 1edbe91..0000000 --- a/examples/050/config/01/config.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -auto: https://auto.proxy.net/wpad.dat diff --git a/examples/050/config/02/config.yaml b/examples/050/config/02/config.yaml deleted file mode 100644 index 26df130..0000000 --- a/examples/050/config/02/config.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -proxy_mode: Automatic proxy configuration URL diff --git a/examples/050/firefox.png b/examples/050/firefox.png deleted file mode 100644 index 20701e2..0000000 Binary files a/examples/050/firefox.png and /dev/null differ diff --git a/examples/035/structural_files/firefox/20-manual.yml b/examples/050/structural_files/firefox/20-manual.yml similarity index 57% rename from examples/035/structural_files/firefox/20-manual.yml rename to examples/050/structural_files/firefox/20-manual.yml index f25bcd9..fc35af3 100644 --- a/examples/035/structural_files/firefox/20-manual.yml +++ b/examples/050/structural_files/firefox/20-manual.yml @@ -6,18 +6,21 @@ manual: use_for_https: true # Also use this proxy for HTTPS - https_proxy: - description: HTTPS Proxy + '{{ identifier }}_proxy': + description: '{{ identifier }} Proxy' hidden: variable: _.use_for_https + dynamic: + - HTTPS + - SOCKS address: - description: HTTPS address + description: '{{ identifier }} address' default: variable: __.http_proxy.address port: - description: HTTPS Port + description: '{{ identifier }} port' default: variable: __.http_proxy.port ... diff --git a/examples/051/README.md b/examples/051/README.md index 7c3c2fe..3a47ef4 100644 --- a/examples/051/README.md +++ b/examples/051/README.md @@ -1 +1 @@ -A conditional disabled variable +A conditional hidden family with Jinja diff --git a/examples/041/SUBTITLE.md b/examples/051/SUBTITLE.md similarity index 100% rename from examples/041/SUBTITLE.md rename to examples/051/SUBTITLE.md diff --git a/examples/043/config b/examples/051/config similarity index 100% rename from examples/043/config rename to examples/051/config diff --git a/examples/051/config/01/config.yaml b/examples/051/config/01/config.yaml deleted file mode 100644 index 1edbe91..0000000 --- a/examples/051/config/01/config.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -auto: https://auto.proxy.net/wpad.dat diff --git a/examples/051/config/02/config.yaml b/examples/051/config/02/config.yaml deleted file mode 100644 index 26df130..0000000 --- a/examples/051/config/02/config.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -proxy_mode: Automatic proxy configuration URL diff --git a/examples/044/structural_files/firefox/20-manual.yml b/examples/051/structural_files/firefox/20-manual.yml similarity index 56% rename from examples/044/structural_files/firefox/20-manual.yml rename to examples/051/structural_files/firefox/20-manual.yml index 66119e8..53b6fe6 100644 --- a/examples/044/structural_files/firefox/20-manual.yml +++ b/examples/051/structural_files/firefox/20-manual.yml @@ -10,13 +10,9 @@ manual: description: '{{ identifier }} Proxy' hidden: jinja: |- - {% if my_identifier == 'HTTPS' and manual.use_for_https %} + {% if _.use_for_https %} HTTPS is same has HTTP {% endif %} - description: in HTTPS case if "manual.use_for_https" is set to True - params: - my_identifier: - type: identifier dynamic: - HTTPS - SOCKS @@ -30,14 +26,4 @@ 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/042/README.md b/examples/052/README.md similarity index 100% rename from examples/042/README.md rename to examples/052/README.md diff --git a/examples/044/config b/examples/052/config similarity index 100% rename from examples/044/config rename to examples/052/config diff --git a/examples/042/structural_files/firefox/20-manual.yml b/examples/052/structural_files/firefox/20-manual.yml similarity index 89% rename from examples/042/structural_files/firefox/20-manual.yml rename to examples/052/structural_files/firefox/20-manual.yml index 9598f96..ac20090 100644 --- a/examples/042/structural_files/firefox/20-manual.yml +++ b/examples/052/structural_files/firefox/20-manual.yml @@ -10,7 +10,7 @@ manual: description: '{{ identifier }} Proxy' hidden: jinja: |- - {% if my_identifier == 'HTTPS' and manual.use_for_https %} + {% if my_identifier == 'HTTPS' and _.use_for_https %} HTTPS is same has HTTP {% endif %} params: diff --git a/examples/043/README.md b/examples/053/README.md similarity index 100% rename from examples/043/README.md rename to examples/053/README.md diff --git a/examples/053/config b/examples/053/config new file mode 120000 index 0000000..3bac45d --- /dev/null +++ b/examples/053/config @@ -0,0 +1 @@ +../018/config \ No newline at end of file diff --git a/examples/043/structural_files/firefox/20-manual.yml b/examples/053/structural_files/firefox/20-manual.yml similarity index 80% rename from examples/043/structural_files/firefox/20-manual.yml rename to examples/053/structural_files/firefox/20-manual.yml index db07b74..06db3cd 100644 --- a/examples/043/structural_files/firefox/20-manual.yml +++ b/examples/053/structural_files/firefox/20-manual.yml @@ -10,10 +10,10 @@ manual: description: '{{ identifier }} Proxy' hidden: jinja: |- - {% if my_identifier == 'HTTPS' and manual.use_for_https %} + {% if my_identifier == 'HTTPS' and _.use_for_https %} HTTPS is same has HTTP {% endif %} - description: in HTTPS case if "manual.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/044/README.md b/examples/054/README.md similarity index 100% rename from examples/044/README.md rename to examples/054/README.md diff --git a/examples/054/config b/examples/054/config new file mode 120000 index 0000000..3bac45d --- /dev/null +++ b/examples/054/config @@ -0,0 +1 @@ +../018/config \ No newline at end of file diff --git a/examples/080/structural_files/firefox/20-manual.yml b/examples/054/structural_files/firefox/20-manual.yml similarity index 91% rename from examples/080/structural_files/firefox/20-manual.yml rename to examples/054/structural_files/firefox/20-manual.yml index 2bd707b..298db34 100644 --- a/examples/080/structural_files/firefox/20-manual.yml +++ b/examples/054/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 "manual.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/060/README.md b/examples/060/README.md index 057f856..3306546 100644 --- a/examples/060/README.md +++ b/examples/060/README.md @@ -1 +1 @@ -A variable with type "domainname", parameters type and disabled +A variable with type "web_address" diff --git a/examples/060/TITLE.md b/examples/060/TITLE.md index 90ad7d2..f8448e5 100644 --- a/examples/060/TITLE.md +++ b/examples/060/TITLE.md @@ -1 +1 @@ -Address for which proxy will be desactivated +Automatic proxy diff --git a/examples/050/config/01/README.md b/examples/060/config/01/README.md similarity index 100% rename from examples/050/config/01/README.md rename to examples/060/config/01/README.md diff --git a/examples/060/config/01/config.yaml b/examples/060/config/01/config.yaml index ed97d53..1edbe91 100644 --- a/examples/060/config/01/config.yaml +++ b/examples/060/config/01/config.yaml @@ -1 +1,2 @@ --- +auto: https://auto.proxy.net/wpad.dat diff --git a/examples/060/config/02/config.yaml b/examples/060/config/02/config.yaml index 54956ea..26df130 100644 --- a/examples/060/config/02/config.yaml +++ b/examples/060/config/02/config.yaml @@ -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/050/config/03/config.yaml b/examples/060/config/03/config.yaml similarity index 100% rename from examples/050/config/03/config.yaml rename to examples/060/config/03/config.yaml diff --git a/examples/060/firefox.png b/examples/060/firefox.png index 16f5931..20701e2 100644 Binary files a/examples/060/firefox.png and b/examples/060/firefox.png differ diff --git a/examples/060/firefox.xcf b/examples/060/firefox.xcf index 5cc54d7..89c7f4b 100644 Binary files a/examples/060/firefox.xcf and b/examples/060/firefox.xcf differ diff --git a/examples/050/structural_files/firefox/30-auto.yml b/examples/060/structural_files/firefox/30-auto.yml similarity index 100% rename from examples/050/structural_files/firefox/30-auto.yml rename to examples/060/structural_files/firefox/30-auto.yml diff --git a/examples/061/README.md b/examples/061/README.md index 130d225..7c3c2fe 100644 --- a/examples/061/README.md +++ b/examples/061/README.md @@ -1 +1 @@ -A variable with multiple value +A conditional disabled variable diff --git a/examples/051/config/01/README.md b/examples/061/config/01/README.md similarity index 100% rename from examples/051/config/01/README.md rename to examples/061/config/01/README.md diff --git a/examples/061/config/01/config.yaml b/examples/061/config/01/config.yaml index ed97d53..1edbe91 100644 --- a/examples/061/config/01/config.yaml +++ b/examples/061/config/01/config.yaml @@ -1 +1,2 @@ --- +auto: https://auto.proxy.net/wpad.dat diff --git a/examples/061/config/02/config.yaml b/examples/061/config/02/config.yaml index ccba4c0..26df130 100644 --- a/examples/061/config/02/config.yaml +++ b/examples/061/config/02/config.yaml @@ -1,6 +1,2 @@ --- 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/051/structural_files/firefox/30-auto.yml b/examples/061/structural_files/firefox/30-auto.yml similarity index 100% rename from examples/051/structural_files/firefox/30-auto.yml rename to examples/061/structural_files/firefox/30-auto.yml diff --git a/examples/062/README.md b/examples/062/README.md deleted file mode 100644 index d83ef1b..0000000 --- a/examples/062/README.md +++ /dev/null @@ -1 +0,0 @@ -A non mandatory variable diff --git a/examples/063/README.md b/examples/063/README.md deleted file mode 100644 index ad6b7fb..0000000 --- a/examples/063/README.md +++ /dev/null @@ -1 +0,0 @@ -Examples diff --git a/examples/068/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/068/structural_files/firefox/55-proxy_dns_socks5.yml deleted file mode 100644 index e67b694..0000000 --- a/examples/068/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/070/README.md b/examples/070/README.md index 4207bc8..057f856 100644 --- a/examples/070/README.md +++ b/examples/070/README.md @@ -1 +1 @@ -A boolean variable +A variable with type "domainname", parameters type and disabled diff --git a/examples/060/SUBTITLE.md b/examples/070/SUBTITLE.md similarity index 100% rename from examples/060/SUBTITLE.md rename to examples/070/SUBTITLE.md diff --git a/examples/070/TITLE.md b/examples/070/TITLE.md index fc1521c..90ad7d2 100644 --- a/examples/070/TITLE.md +++ b/examples/070/TITLE.md @@ -1 +1 @@ -DNS over HTTPS +Address for which proxy will be desactivated diff --git a/examples/070/config/02/config.yaml b/examples/070/config/02/config.yaml new file mode 100644 index 0000000..54956ea --- /dev/null +++ b/examples/070/config/02/config.yaml @@ -0,0 +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/070/firefox.png b/examples/070/firefox.png index d368003..16f5931 100644 Binary files a/examples/070/firefox.png and b/examples/070/firefox.png differ diff --git a/examples/070/firefox.xcf b/examples/070/firefox.xcf index c362607..5cc54d7 100644 Binary files a/examples/070/firefox.xcf and b/examples/070/firefox.xcf differ diff --git a/examples/060/structural_files/firefox/40-no_proxy.yml b/examples/070/structural_files/firefox/40-no_proxy.yml similarity index 100% rename from examples/060/structural_files/firefox/40-no_proxy.yml rename to examples/070/structural_files/firefox/40-no_proxy.yml diff --git a/examples/070/structural_files/firefox/60-dns_over_https.yml b/examples/070/structural_files/firefox/60-dns_over_https.yml deleted file mode 100644 index 754f2a8..0000000 --- a/examples/070/structural_files/firefox/60-dns_over_https.yml +++ /dev/null @@ -1,8 +0,0 @@ -%YAML 1.2 ---- -version: 1.1 - -dns_over_https: # DNS over HTTPS - - enable_dns_over_https: false # Enable DNS over HTTPS -... diff --git a/examples/071/README.md b/examples/071/README.md index 9215d09..130d225 100644 --- a/examples/071/README.md +++ b/examples/071/README.md @@ -1 +1 @@ -A choice variable +A variable with multiple value diff --git a/examples/071/config/02/config.yaml b/examples/071/config/02/config.yaml index aee4796..ccba4c0 100644 --- a/examples/071/config/02/config.yaml +++ b/examples/071/config/02/config.yaml @@ -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/051/config/03/config.yaml b/examples/071/config/03/config.yaml similarity index 100% rename from examples/051/config/03/config.yaml rename to examples/071/config/03/config.yaml diff --git a/examples/061/structural_files/firefox/40-no_proxy.yml b/examples/071/structural_files/firefox/40-no_proxy.yml similarity index 100% rename from examples/061/structural_files/firefox/40-no_proxy.yml rename to examples/071/structural_files/firefox/40-no_proxy.yml diff --git a/examples/072/README.md b/examples/072/README.md index 972da98..d83ef1b 100644 --- a/examples/072/README.md +++ b/examples/072/README.md @@ -1 +1 @@ -A web_address variable +A non mandatory variable diff --git a/examples/062/config b/examples/072/config similarity index 100% rename from examples/062/config rename to examples/072/config diff --git a/examples/062/structural_files/firefox/40-no_proxy.yml b/examples/072/structural_files/firefox/40-no_proxy.yml similarity index 100% rename from examples/062/structural_files/firefox/40-no_proxy.yml rename to examples/072/structural_files/firefox/40-no_proxy.yml diff --git a/examples/073/README.md b/examples/073/README.md index c11c818..ad6b7fb 100644 --- a/examples/073/README.md +++ b/examples/073/README.md @@ -1 +1 @@ -A variable with custom validation +Examples diff --git a/examples/063/SUBTITLE.md b/examples/073/SUBTITLE.md similarity index 100% rename from examples/063/SUBTITLE.md rename to examples/073/SUBTITLE.md diff --git a/examples/063/config b/examples/073/config similarity index 100% rename from examples/063/config rename to examples/073/config diff --git a/examples/063/structural_files/firefox/40-no_proxy.yml b/examples/073/structural_files/firefox/40-no_proxy.yml similarity index 100% rename from examples/063/structural_files/firefox/40-no_proxy.yml rename to examples/073/structural_files/firefox/40-no_proxy.yml diff --git a/examples/064/README.md b/examples/074/README.md similarity index 100% rename from examples/064/README.md rename to examples/074/README.md diff --git a/examples/065/config/01/config.yaml b/examples/074/config/01/config.yaml similarity index 100% rename from examples/065/config/01/config.yaml rename to examples/074/config/01/config.yaml diff --git a/examples/064/config/02/config.yaml b/examples/074/config/02/config.yaml similarity index 100% rename from examples/064/config/02/config.yaml rename to examples/074/config/02/config.yaml diff --git a/examples/064/config/03/config.yaml b/examples/074/config/03/config.yaml similarity index 100% rename from examples/064/config/03/config.yaml rename to examples/074/config/03/config.yaml diff --git a/examples/064/structural_files/firefox/40-no_proxy.yml b/examples/074/structural_files/firefox/40-no_proxy.yml similarity index 100% rename from examples/064/structural_files/firefox/40-no_proxy.yml rename to examples/074/structural_files/firefox/40-no_proxy.yml diff --git a/examples/065/README.md b/examples/075/README.md similarity index 100% rename from examples/065/README.md rename to examples/075/README.md diff --git a/examples/065/TITLE.md b/examples/075/TITLE.md similarity index 100% rename from examples/065/TITLE.md rename to examples/075/TITLE.md diff --git a/examples/066/config/01/config.yaml b/examples/075/config/01/config.yaml similarity index 100% rename from examples/066/config/01/config.yaml rename to examples/075/config/01/config.yaml diff --git a/examples/065/config/02/config.yaml b/examples/075/config/02/config.yaml similarity index 100% rename from examples/065/config/02/config.yaml rename to examples/075/config/02/config.yaml diff --git a/examples/065/config/03/config.yaml b/examples/075/config/03/config.yaml similarity index 100% rename from examples/065/config/03/config.yaml rename to examples/075/config/03/config.yaml diff --git a/examples/065/config/04/config.yaml b/examples/075/config/04/config.yaml similarity index 100% rename from examples/065/config/04/config.yaml rename to examples/075/config/04/config.yaml diff --git a/examples/065/firefox.png b/examples/075/firefox.png similarity index 100% rename from examples/065/firefox.png rename to examples/075/firefox.png diff --git a/examples/065/firefox.xcf b/examples/075/firefox.xcf similarity index 100% rename from examples/065/firefox.xcf rename to examples/075/firefox.xcf diff --git a/examples/065/structural_files/firefox/50-prompt_authentication.yml b/examples/075/structural_files/firefox/50-prompt_authentication.yml similarity index 100% rename from examples/065/structural_files/firefox/50-prompt_authentication.yml rename to examples/075/structural_files/firefox/50-prompt_authentication.yml diff --git a/examples/066/README.md b/examples/076/README.md similarity index 100% rename from examples/066/README.md rename to examples/076/README.md diff --git a/examples/066/TITLE.md b/examples/076/TITLE.md similarity index 100% rename from examples/066/TITLE.md rename to examples/076/TITLE.md diff --git a/examples/067/config/01/config.yaml b/examples/076/config/01/config.yaml similarity index 100% rename from examples/067/config/01/config.yaml rename to examples/076/config/01/config.yaml diff --git a/examples/066/config/02/config.yaml b/examples/076/config/02/config.yaml similarity index 100% rename from examples/066/config/02/config.yaml rename to examples/076/config/02/config.yaml diff --git a/examples/066/config/03/config.yaml b/examples/076/config/03/config.yaml similarity index 100% rename from examples/066/config/03/config.yaml rename to examples/076/config/03/config.yaml diff --git a/examples/066/config/04/config.yaml b/examples/076/config/04/config.yaml similarity index 100% rename from examples/066/config/04/config.yaml rename to examples/076/config/04/config.yaml diff --git a/examples/066/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/076/structural_files/firefox/55-proxy_dns_socks5.yml similarity index 100% rename from examples/066/structural_files/firefox/55-proxy_dns_socks5.yml rename to examples/076/structural_files/firefox/55-proxy_dns_socks5.yml diff --git a/examples/067/README.md b/examples/077/README.md similarity index 100% rename from examples/067/README.md rename to examples/077/README.md diff --git a/examples/068/config/01/config.yaml b/examples/077/config/01/config.yaml similarity index 100% rename from examples/068/config/01/config.yaml rename to examples/077/config/01/config.yaml diff --git a/examples/067/config/02/config.yaml b/examples/077/config/02/config.yaml similarity index 100% rename from examples/067/config/02/config.yaml rename to examples/077/config/02/config.yaml diff --git a/examples/067/config/03/config.yaml b/examples/077/config/03/config.yaml similarity index 100% rename from examples/067/config/03/config.yaml rename to examples/077/config/03/config.yaml diff --git a/examples/067/config/04/config.yaml b/examples/077/config/04/config.yaml similarity index 100% rename from examples/067/config/04/config.yaml rename to examples/077/config/04/config.yaml diff --git a/examples/067/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/077/structural_files/firefox/55-proxy_dns_socks5.yml similarity index 76% rename from examples/067/structural_files/firefox/55-proxy_dns_socks5.yml rename to examples/077/structural_files/firefox/55-proxy_dns_socks5.yml index 0b92e44..052f0d1 100644 --- a/examples/067/structural_files/firefox/55-proxy_dns_socks5.yml +++ b/examples/077/structural_files/firefox/55-proxy_dns_socks5.yml @@ -7,9 +7,9 @@ proxy_dns_socks5: default: false disabled: jinja: |- - {% if manual.socks_proxy.version is propertyerror %} + {% if _.manual.socks_proxy.version is propertyerror %} the proxy mode is not manual - {% elif manual.socks_proxy.version == 'v4' %} + {% elif _.manual.socks_proxy.version == 'v4' %} socks version is v4 {% endif %} description: |- diff --git a/examples/068/README.md b/examples/078/README.md similarity index 100% rename from examples/068/README.md rename to examples/078/README.md diff --git a/examples/072/config/01/config.yaml b/examples/078/config/01/config.yaml similarity index 100% rename from examples/072/config/01/config.yaml rename to examples/078/config/01/config.yaml diff --git a/examples/068/config/02/config.yaml b/examples/078/config/02/config.yaml similarity index 100% rename from examples/068/config/02/config.yaml rename to examples/078/config/02/config.yaml diff --git a/examples/068/config/03/config.yaml b/examples/078/config/03/config.yaml similarity index 100% rename from examples/068/config/03/config.yaml rename to examples/078/config/03/config.yaml diff --git a/examples/068/config/04/config.yaml b/examples/078/config/04/config.yaml similarity index 100% rename from examples/068/config/04/config.yaml rename to examples/078/config/04/config.yaml diff --git a/examples/068/config/mode b/examples/078/config/mode similarity index 100% rename from examples/068/config/mode rename to examples/078/config/mode diff --git a/examples/080/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/078/structural_files/firefox/55-proxy_dns_socks5.yml similarity index 100% rename from examples/080/structural_files/firefox/55-proxy_dns_socks5.yml rename to examples/078/structural_files/firefox/55-proxy_dns_socks5.yml diff --git a/examples/080/README.md b/examples/080/README.md index 8025287..4207bc8 100644 --- a/examples/080/README.md +++ b/examples/080/README.md @@ -1 +1 @@ -Variable in same family +A boolean variable diff --git a/examples/080/SUBTITLE.md b/examples/080/SUBTITLE.md deleted file mode 100644 index a3fa3f8..0000000 --- a/examples/080/SUBTITLE.md +++ /dev/null @@ -1 +0,0 @@ -Relative path diff --git a/examples/080/TITLE.md b/examples/080/TITLE.md index 86ff802..fc1521c 100644 --- a/examples/080/TITLE.md +++ b/examples/080/TITLE.md @@ -1 +1 @@ -Namespace +DNS over HTTPS diff --git a/examples/073/config/01/config.yaml b/examples/080/config/01/config.yaml similarity index 100% rename from examples/073/config/01/config.yaml rename to examples/080/config/01/config.yaml diff --git a/examples/080/firefox.png b/examples/080/firefox.png new file mode 100644 index 0000000..d368003 Binary files /dev/null and b/examples/080/firefox.png differ diff --git a/examples/050/firefox.xcf b/examples/080/firefox.xcf similarity index 75% rename from examples/050/firefox.xcf rename to examples/080/firefox.xcf index 89c7f4b..c362607 100644 Binary files a/examples/050/firefox.xcf and b/examples/080/firefox.xcf differ diff --git a/examples/080/structural_files/firefox/00-proxy.yml b/examples/080/structural_files/firefox/00-proxy.yml deleted file mode 100644 index 92b75f5..0000000 --- a/examples/080/structural_files/firefox/00-proxy.yml +++ /dev/null @@ -1,14 +0,0 @@ -%YAML 1.2 ---- -version: 1.1 - -proxy_mode: - description: Configure Proxy Access to the Internet - choices: - - No proxy - - Auto-detect proxy settings for this network - - Use system proxy settings - - Manual proxy configuration - - Automatic proxy configuration URL - default: No proxy -... diff --git a/examples/080/structural_files/firefox/10-manual.yml b/examples/080/structural_files/firefox/10-manual.yml deleted file mode 100644 index 047ff8a..0000000 --- a/examples/080/structural_files/firefox/10-manual.yml +++ /dev/null @@ -1,23 +0,0 @@ -%YAML 1.2 ---- -version: 1.1 - -manual: - description: Manual proxy configuration - disabled: - variable: _.proxy_mode - when_not: Manual proxy configuration - - http_proxy: # HTTP Proxy - - address: - description: HTTP address - type: domainname - params: - allow_ip: true - - port: - description: HTTP Port - type: port - default: 8080 -... diff --git a/examples/080/structural_files/firefox/30-auto.yml b/examples/080/structural_files/firefox/30-auto.yml deleted file mode 100644 index 5096139..0000000 --- a/examples/080/structural_files/firefox/30-auto.yml +++ /dev/null @@ -1,11 +0,0 @@ -%YAML 1.2 ---- -version: 1.1 - -auto: - description: Automatic proxy configuration URL - type: web_address - disabled: - variable: _.proxy_mode - when_not: Automatic proxy configuration URL -... diff --git a/examples/080/structural_files/firefox/40-no_proxy.yml b/examples/080/structural_files/firefox/40-no_proxy.yml deleted file mode 100644 index 55a5724..0000000 --- a/examples/080/structural_files/firefox/40-no_proxy.yml +++ /dev/null @@ -1,23 +0,0 @@ -%YAML 1.2 ---- -version: 1.1 - -no_proxy: - description: Address for which proxy will be desactivated - help: Connections to localhost, 127.0.0.1/8 and ::1 are never proxied - examples: - - .mozilla.org - - .net.nz - - 192.168.1.0/24 - type: domainname - params: - allow_ip: true - allow_cidr_network: true - allow_without_dot: true - allow_startswith_dot: true - multi: true - mandatory: false - disabled: - variable: _.proxy_mode - when: No proxy -... diff --git a/examples/080/structural_files/firefox/50-prompt_authentication.yml b/examples/080/structural_files/firefox/50-prompt_authentication.yml deleted file mode 100644 index 57a548e..0000000 --- a/examples/080/structural_files/firefox/50-prompt_authentication.yml +++ /dev/null @@ -1,11 +0,0 @@ -%YAML 1.2 ---- -version: 1.1 - -prompt_authentication: - description: Prompt for authentication if password is saved - default: true - disabled: - variable: _.proxy_mode - when: No proxy -... diff --git a/examples/080/structural_files/firefox/60-dns_over_https.yml b/examples/080/structural_files/firefox/60-dns_over_https.yml index ccc4a5a..754f2a8 100644 --- a/examples/080/structural_files/firefox/60-dns_over_https.yml +++ b/examples/080/structural_files/firefox/60-dns_over_https.yml @@ -5,31 +5,4 @@ version: 1.1 dns_over_https: # DNS over HTTPS enable_dns_over_https: false # Enable DNS over HTTPS - - provider: - description: Use Provider - choices: - - Cloudflare - - NextDNS - - Custom - default: Cloudflare - disabled: - variable: _.enable_dns_over_https - when: false - - custom_dns_url: - description: Custom DNS URL - type: web_address - validators: - - jinja: |- - {% if dns_over_https.custom_dns_url.startswith('http://') %} - only https is allowed - {% endif %} - description: must starts with 'https://' only - disabled: - jinja: |- - {% if _.provider is propertyerror or _.provider != 'Custom' %} - provider is not custom - {% endif %} - description: if "dns_over_https.provider" is not "Custom" ... diff --git a/examples/081/README.md b/examples/081/README.md index 86ff802..9215d09 100644 --- a/examples/081/README.md +++ b/examples/081/README.md @@ -1 +1 @@ -Namespace +A choice variable diff --git a/examples/100/config/01/config.yaml b/examples/081/config/01/config.yaml similarity index 100% rename from examples/100/config/01/config.yaml rename to examples/081/config/01/config.yaml diff --git a/examples/072/config/02/config.yaml b/examples/081/config/02/config.yaml similarity index 100% rename from examples/072/config/02/config.yaml rename to examples/081/config/02/config.yaml diff --git a/examples/071/structural_files/firefox/60-dns_over_https.yml b/examples/081/structural_files/firefox/60-dns_over_https.yml similarity index 100% rename from examples/071/structural_files/firefox/60-dns_over_https.yml rename to examples/081/structural_files/firefox/60-dns_over_https.yml diff --git a/examples/082/README.md b/examples/082/README.md new file mode 100644 index 0000000..972da98 --- /dev/null +++ b/examples/082/README.md @@ -0,0 +1 @@ +A web_address variable diff --git a/examples/082/config/01/config.yaml b/examples/082/config/01/config.yaml new file mode 100644 index 0000000..ed97d53 --- /dev/null +++ b/examples/082/config/01/config.yaml @@ -0,0 +1 @@ +--- diff --git a/examples/073/config/02/config.yaml b/examples/082/config/02/config.yaml similarity index 100% rename from examples/073/config/02/config.yaml rename to examples/082/config/02/config.yaml diff --git a/examples/072/config/03/config.yaml b/examples/082/config/03/config.yaml similarity index 100% rename from examples/072/config/03/config.yaml rename to examples/082/config/03/config.yaml diff --git a/examples/072/config/04/config.yaml b/examples/082/config/04/config.yaml similarity index 100% rename from examples/072/config/04/config.yaml rename to examples/082/config/04/config.yaml diff --git a/examples/072/structural_files/firefox/60-dns_over_https.yml b/examples/082/structural_files/firefox/60-dns_over_https.yml similarity index 74% rename from examples/072/structural_files/firefox/60-dns_over_https.yml rename to examples/082/structural_files/firefox/60-dns_over_https.yml index c6292d5..6ce2c7e 100644 --- a/examples/072/structural_files/firefox/60-dns_over_https.yml +++ b/examples/082/structural_files/firefox/60-dns_over_https.yml @@ -22,8 +22,8 @@ dns_over_https: # DNS over HTTPS type: web_address disabled: jinja: |- - {% if dns_over_https.provider is propertyerror or dns_over_https.provider != 'Custom' %} + {% if _.provider is propertyerror or _.provider != 'Custom' %} provider is not custom {% endif %} - description: if "dns_over_https.provider" is not "Custom" + description: if "_.provider" is not "Custom" ... diff --git a/examples/083/README.md b/examples/083/README.md new file mode 100644 index 0000000..c11c818 --- /dev/null +++ b/examples/083/README.md @@ -0,0 +1 @@ +A variable with custom validation diff --git a/examples/083/config/01/config.yaml b/examples/083/config/01/config.yaml new file mode 100644 index 0000000..ed97d53 --- /dev/null +++ b/examples/083/config/01/config.yaml @@ -0,0 +1 @@ +--- diff --git a/examples/083/config/02/config.yaml b/examples/083/config/02/config.yaml new file mode 100644 index 0000000..aee4796 --- /dev/null +++ b/examples/083/config/02/config.yaml @@ -0,0 +1,3 @@ +--- +dns_over_https: + enable_dns_over_https: true diff --git a/examples/073/config/03/config.yaml b/examples/083/config/03/config.yaml similarity index 100% rename from examples/073/config/03/config.yaml rename to examples/083/config/03/config.yaml diff --git a/examples/073/config/04/config.yaml b/examples/083/config/04/config.yaml similarity index 100% rename from examples/073/config/04/config.yaml rename to examples/083/config/04/config.yaml diff --git a/examples/073/structural_files/firefox/60-dns_over_https.yml b/examples/083/structural_files/firefox/60-dns_over_https.yml similarity index 81% rename from examples/073/structural_files/firefox/60-dns_over_https.yml rename to examples/083/structural_files/firefox/60-dns_over_https.yml index 52bda37..3a57e00 100644 --- a/examples/073/structural_files/firefox/60-dns_over_https.yml +++ b/examples/083/structural_files/firefox/60-dns_over_https.yml @@ -28,8 +28,8 @@ dns_over_https: # DNS over HTTPS description: must starts with 'https://' only disabled: jinja: |- - {% if dns_over_https.provider is propertyerror or dns_over_https.provider != 'Custom' %} + {% if _.provider is propertyerror or _.provider != 'Custom' %} provider is not custom {% endif %} - description: if "dns_over_https.provider" is not "Custom" + description: if "_.provider" is not "Custom" ... diff --git a/examples/100/README.md b/examples/100/README.md index d6459e0..86ff802 100644 --- a/examples/100/README.md +++ b/examples/100/README.md @@ -1 +1 @@ -xxx +Namespace diff --git a/examples/081/namespace b/examples/100/namespace similarity index 100% rename from examples/081/namespace rename to examples/100/namespace diff --git a/examples/081/structural_files/firefox/empty b/examples/100/structural_files/firefox/empty similarity index 100% rename from examples/081/structural_files/firefox/empty rename to examples/100/structural_files/firefox/empty diff --git a/examples/081/structural_files/firefox/empty.yml b/examples/100/structural_files/firefox/empty.yml similarity index 100% rename from examples/081/structural_files/firefox/empty.yml rename to examples/100/structural_files/firefox/empty.yml diff --git a/examples/102/README.md b/examples/101/100/README.md similarity index 100% rename from examples/102/README.md rename to examples/101/100/README.md diff --git a/examples/101/100/config/01/config.yaml b/examples/101/100/config/01/config.yaml new file mode 100644 index 0000000..ed97d53 --- /dev/null +++ b/examples/101/100/config/01/config.yaml @@ -0,0 +1 @@ +--- diff --git a/examples/100/config/02/config.yaml b/examples/101/100/config/02/config.yaml similarity index 100% rename from examples/100/config/02/config.yaml rename to examples/101/100/config/02/config.yaml diff --git a/examples/100/config/03/config.yaml b/examples/101/100/config/03/config.yaml similarity index 100% rename from examples/100/config/03/config.yaml rename to examples/101/100/config/03/config.yaml diff --git a/examples/100/structural_files/foxyproxy/00-foxyproxy.yml b/examples/101/100/structural_files/foxyproxy/00-foxyproxy.yml similarity index 100% rename from examples/100/structural_files/foxyproxy/00-foxyproxy.yml rename to examples/101/100/structural_files/foxyproxy/00-foxyproxy.yml diff --git a/examples/102/structural_files/foxyproxy/00-foxyproxy.yml b/examples/102/structural_files/foxyproxy/00-foxyproxy.yml deleted file mode 100644 index 9a292c7..0000000 --- a/examples/102/structural_files/foxyproxy/00-foxyproxy.yml +++ /dev/null @@ -1,25 +0,0 @@ -%YAML 1.2 ---- -version: 1.1 - -proxies: - description: Proxy configuration - type: leadership - - title: - description: Title or Description - mandatory: false - - color: - description: Color - regexp: ^#(?:[0-9a-f]{3}){1,2}$ - default: - jinja: >- - # - - {%- for i in range(6) -%} - {{- '0123456789abcdef' | random -}} - {%- endfor -%} - description: random color value - auto_save: true -... diff --git a/examples/103/structural_files/foxyproxy/00-foxyproxy.yml b/examples/103/structural_files/foxyproxy/00-foxyproxy.yml index 97123de..9a292c7 100644 --- a/examples/103/structural_files/foxyproxy/00-foxyproxy.yml +++ b/examples/103/structural_files/foxyproxy/00-foxyproxy.yml @@ -4,25 +4,12 @@ version: 1.1 proxies: description: Proxy configuration - _type: leadership + type: leadership title: description: Title or Description mandatory: false - type: - description: Proxy Type - choices: - - HTTP - - HTTPS/SSL - - SOCKS4 - - SOCKS5 - - PAC URL - - WPAD - - System (use system settings) - - Direct (no proxy) - default: Direct (no proxy) - color: description: Color regexp: ^#(?:[0-9a-f]{3}){1,2}$ diff --git a/examples/104/structural_files/foxyproxy/00-foxyproxy.yml b/examples/104/structural_files/foxyproxy/00-foxyproxy.yml index d8cfaaa..97123de 100644 --- a/examples/104/structural_files/foxyproxy/00-foxyproxy.yml +++ b/examples/104/structural_files/foxyproxy/00-foxyproxy.yml @@ -35,105 +35,4 @@ proxies: {%- endfor -%} description: random color value auto_save: true - - address: - description: IP address, DNS name, server name - type: domainname - params: - allow_ip: true - allow_without_dot: true - default: - jinja: >- - {% if firefox.manual.http_proxy.address is not propertyerror %} - {{ firefox.manual.http_proxy.address }} - {% endif %} - description: copy HTTP address if proxy is not "Manual" - disabled: - jinja: |- - {% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %} - disabled - {% endif %} - description: |- - if type not in: - - HTTP - - HTTPS/SSL - - SOCKS4 - - SOCKS5 - - port: - description: Port - type: port - default: - jinja: >- - {% if firefox.manual.http_proxy.port is not propertyerror %} - {{ firefox.manual.http_proxy.port }} - {% endif %} - description: copy HTTP port if proxy is not "Manual" - disabled: - jinja: |- - {% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %} - disabled - {% endif %} - description: |- - if type not in: - - HTTP - - HTTPS/SSL - - SOCKS4 - - SOCKS5 - - username: - description: Username - type: unix_user - mandatory: - jinja: |- - {% if _.password is not propertyerror and _.password %} - username is mandatory - {% endif %} - description: if a password is set - disabled: - jinja: |- - {% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %} - disabled - {% endif %} - description: |- - if type not in: - - HTTP - - HTTPS/SSL - - SOCKS4 - - SOCKS5 - - password: - description: Password - type: secret - mandatory: false - disabled: - jinja: |- - {% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %} - disabled - {% endif %} - description: |- - if type not in: - - HTTP - - HTTPS/SSL - - SOCKS4 - - SOCKS5 - - url: - description: URL - type: web_address - default: - jinja: >- - {% if firefox.auto is not propertyerror %} - {{ firefox.auto }} - {% endif %} - description: copy HTTP address if proxy is "Auto" - disabled: - jinja: |- - {% if _.type not in ['PAC URL', 'WPAD'] %} - proxy does not need url - {% endif %} - description: |- - if type is not in: - - PAC URL - - WPAD ... diff --git a/examples/105/README.md b/examples/105/README.md new file mode 100644 index 0000000..d6459e0 --- /dev/null +++ b/examples/105/README.md @@ -0,0 +1 @@ +xxx diff --git a/examples/102/config b/examples/105/config similarity index 100% rename from examples/102/config rename to examples/105/config diff --git a/examples/105/structural_files/foxyproxy/00-foxyproxy.yml b/examples/105/structural_files/foxyproxy/00-foxyproxy.yml new file mode 100644 index 0000000..d8cfaaa --- /dev/null +++ b/examples/105/structural_files/foxyproxy/00-foxyproxy.yml @@ -0,0 +1,139 @@ +%YAML 1.2 +--- +version: 1.1 + +proxies: + description: Proxy configuration + _type: leadership + + title: + description: Title or Description + mandatory: false + + type: + description: Proxy Type + choices: + - HTTP + - HTTPS/SSL + - SOCKS4 + - SOCKS5 + - PAC URL + - WPAD + - System (use system settings) + - Direct (no proxy) + default: Direct (no proxy) + + color: + description: Color + regexp: ^#(?:[0-9a-f]{3}){1,2}$ + default: + jinja: >- + # + + {%- for i in range(6) -%} + {{- '0123456789abcdef' | random -}} + {%- endfor -%} + description: random color value + auto_save: true + + address: + description: IP address, DNS name, server name + type: domainname + params: + allow_ip: true + allow_without_dot: true + default: + jinja: >- + {% if firefox.manual.http_proxy.address is not propertyerror %} + {{ firefox.manual.http_proxy.address }} + {% endif %} + description: copy HTTP address if proxy is not "Manual" + disabled: + jinja: |- + {% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %} + disabled + {% endif %} + description: |- + if type not in: + - HTTP + - HTTPS/SSL + - SOCKS4 + - SOCKS5 + + port: + description: Port + type: port + default: + jinja: >- + {% if firefox.manual.http_proxy.port is not propertyerror %} + {{ firefox.manual.http_proxy.port }} + {% endif %} + description: copy HTTP port if proxy is not "Manual" + disabled: + jinja: |- + {% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %} + disabled + {% endif %} + description: |- + if type not in: + - HTTP + - HTTPS/SSL + - SOCKS4 + - SOCKS5 + + username: + description: Username + type: unix_user + mandatory: + jinja: |- + {% if _.password is not propertyerror and _.password %} + username is mandatory + {% endif %} + description: if a password is set + disabled: + jinja: |- + {% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %} + disabled + {% endif %} + description: |- + if type not in: + - HTTP + - HTTPS/SSL + - SOCKS4 + - SOCKS5 + + password: + description: Password + type: secret + mandatory: false + disabled: + jinja: |- + {% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %} + disabled + {% endif %} + description: |- + if type not in: + - HTTP + - HTTPS/SSL + - SOCKS4 + - SOCKS5 + + url: + description: URL + type: web_address + default: + jinja: >- + {% if firefox.auto is not propertyerror %} + {{ firefox.auto }} + {% endif %} + description: copy HTTP address if proxy is "Auto" + disabled: + jinja: |- + {% if _.type not in ['PAC URL', 'WPAD'] %} + proxy does not need url + {% endif %} + description: |- + if type is not in: + - PAC URL + - WPAD +...