diff --git a/TITLE b/TITLE new file mode 100644 index 0000000..f7d7fd7 --- /dev/null +++ b/TITLE @@ -0,0 +1 @@ +[init] Discover Rougail diff --git a/build.py b/build.py index 97c9eab..6cb7b23 100755 --- a/build.py +++ b/build.py @@ -7,8 +7,8 @@ from ansi2html import Ansi2HTMLConverter from rougail import Rougail from rougail.config import get_rougail_config -from rougail.output_exporter import RougailOutputExporter -from rougail.user_data_file import RougailUserDataFile +from rougail.output_console import RougailOutputConsole +from rougail.user_data_yaml import RougailUserDataYaml from rougail.output_doc import RougailOutputDoc @@ -16,8 +16,8 @@ if __name__ == "__main__": version = sys.argv[1] # rougailconfig = RougailConfig.copy() rougailconfig = get_rougail_config(backward_compatibility=False, add_extra_options=False) - rougailconfig['main_dictionaries'] = ['firefox'] - rougailconfig['default_dictionary_format_version'] = version + rougailconfig['main_structural_directories'] = ['firefox'] + rougailconfig['default_structural_format_version'] = version if Path('config/namespace').is_file(): has_namespace = True has_foxyproxy = False @@ -25,26 +25,26 @@ if __name__ == "__main__": has_foxyproxy = True has_namespace = True rougailconfig['main_namespace'] = 'Firefox' - rougailconfig['extra_dictionaries'] = {'FoxyProxy': ['foxyproxy']} + rougailconfig['extra_namespaces'] = {'FoxyProxy': ['foxyproxy']} else: has_foxyproxy = False has_namespace = False rougailconfig['main_namespace'] = None # rougailconfig['tiramisu_cache'] = "cache.py" -# rougail = Rougail(rougailconfig) -# config = rougail.get_config() -# print(config.value.get()) - rougailconfig['step.output'] = 'doc' - rougailconfig['doc.output_format'] = 'github' - rougailconfig['doc.title_level'] = 3 if Path('mode').is_file(): rougailconfig['modes_level'] = ['basic', 'standard', 'advanced'] has_mode = True else: has_mode = False - inventory = RougailOutputDoc(rougailconfig=rougailconfig.copy()) - rougailconfig['step.output'] = 'exporter' - header = inventory.formater.header() + 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()) + inventory.load_formatter() + rougailconfig['step.output'] = 'console' summary = Path('summary_before.md') if summary.is_file(): with summary.open('r') as sfh: @@ -55,32 +55,36 @@ if __name__ == "__main__": namespace = 'firefox' file_found = False if rougailconfig['main_namespace']: - all_dirs = [[rougailconfig['main_dictionaries']], rougailconfig['extra_dictionaries'].values()] + all_dirs = [[rougailconfig['main_structural_directories']], [['foxyproxy']]] else: - all_dirs = [[rougailconfig['main_dictionaries']]] + all_dirs = [[rougailconfig['main_structural_directories']]] - doc += inventory.formater.title('Screenshot', 2) + '\n' + doc += inventory.formatter.title('Screenshot', 2) + '\n' doc += f'{namespace.capitalize()} Proxy setting\n\n' # with doc_file.open('r') as docfh: # doc += docfh.read() - doc += '\n' + inventory.formater.title('Structure', 2) + '\n' + doc += '\n' + inventory.formatter.title('Structure', 2) + '\n' + print(all_dirs) for r in all_dirs: for dirs in r: for d in dirs: + print(d) files = list(Path(d).iterdir()) files.sort() for f in files: namespace = f.parent.name file_found = True if f.name.endswith('.yml') or f.name.endswith('.yaml'): - doc += inventory.formater.title(str(f), 3) + doc += inventory.formatter.title(str(f), 3) doc += '\n```yml\n' with f.open(encoding="utf8") as file_fh: doc += file_fh.read() doc += '\n```\n' - inv_doc = inventory.gen_doc() + rougailconfig['step.output'] = 'doc' + inv_doc = inventory.run()[1] + rougailconfig['step.output'] = 'console' if file_found and inv_doc: - doc += inventory.formater.title('Generated documentation', 3) + doc += inventory.formatter.title('Generated documentation', 3) CMD = f"foo@bar:~$ rougail -v {version} -m firefox/ " if has_namespace: CMD += "-s Firefox " @@ -94,7 +98,7 @@ if __name__ == "__main__": # config = Path('config') if config.is_dir(): - doc += inventory.formater.title('User data', 2) + doc += inventory.formatter.title('User data', 2) configs = list(config.iterdir()) configs.sort() for idx, dirname in enumerate(configs): @@ -102,58 +106,54 @@ if __name__ == "__main__": continue for filename in dirname.iterdir(): if filename.name.endswith('.yml') or filename.name.endswith('.yaml'): - doc += inventory.formater.title(f'Example {idx + 1}', 3) - doc += inventory.formater.title(str(filename), 4) + doc += inventory.formatter.title(f'Example {idx + 1}', 3) + doc += inventory.formatter.title(str(filename), 4) doc += '\n```yml\n' with filename.open(encoding="utf8") as file_fh: doc += file_fh.read() doc += '\n```\n' # with filename.open(encoding="utf8") as file_fh: # objects = yaml.load(file_fh) -# doc += inventory.formater.yaml(objects) +# doc += inventory.formatter.yaml(objects) #readme = dirname / 'README.md' #if readme.is_file(): - # doc += inventory.formater.title('Description', 4) + # doc += inventory.formatter.title('Description', 4) # with readme.open() as fh: # doc += fh.read() + '\n\n' rougail = Rougail(rougailconfig) - tiramisu_config = rougail.get_config() - rougailconfig['step.user_data'] = ['file'] - rougailconfig['file.filename'] = [str(filename.absolute())] - data = RougailUserDataFile(tiramisu_config, rougailconfig=rougailconfig) + tiramisu_config = rougail.run() + rougailconfig['step.user_data'] = ['yaml'] + rougailconfig['yaml.filename'] = [str(filename.absolute())] + data = RougailUserDataYaml(tiramisu_config, rougailconfig=rougailconfig) ret = data.run() errors = rougail.user_datas(ret) - export = RougailOutputExporter(tiramisu_config, - rougailconfig=rougailconfig, - user_data_errors=errors['errors'], - user_data_warnings=errors['warnings'], - ) - export.exporter() - with export.formater.console.capture() as capture: - export.print() + export = RougailOutputConsole(tiramisu_config, + rougailconfig=rougailconfig, + user_data_errors=errors['errors'], + user_data_warnings=errors['warnings'], + ) + console = export.run()[1] conv = Ansi2HTMLConverter(inline=True) - doc += inventory.formater.title('Output', 4) - cmd = CMD + f"-u file -ff {filename}" + doc += inventory.formatter.title('Output', 4) + cmd = CMD + f"-u yaml -ff {filename}" doc += f"```console\n{cmd}\n```\n" - conv_data = '
' + conv.convert(capture.get(), full=False) + "
\n" + conv_data = '
' + conv.convert(console, full=False) + "
\n" doc += conv_data with open(dirname / 'output_ro.html', 'w') as fh_output: fh_output.write(conv_data) if (config / 'read_write').is_file(): - rougailconfig['exporter.read_write'] = True - export = RougailOutputExporter(tiramisu_config, - rougailconfig=rougailconfig, - user_data_errors=data.errors, - user_data_warnings=data.warnings, - ) - export.exporter() - with export.formater.console.capture() as capture: - export.print() + tiramisu_config.property.read_write + export = RougailOutputConsole(tiramisu_config, + rougailconfig=rougailconfig, + user_data_errors=data.errors, + user_data_warnings=data.warnings, + ) + console = export.run()[1] conv = Ansi2HTMLConverter(inline=True) - doc += inventory.formater.title('Output in read write mode', 4) - cmd = cmd + " --exporter.read_write" + doc += inventory.formatter.title('Output in read write mode', 4) + cmd = cmd + " --cli.read_write" doc += f"```console\n{cmd}\n```\n" - conv_data = '
' + conv.convert(capture.get(), full=False) + "
\n" + conv_data = '
' + conv.convert(console, full=False) + "
\n" doc += '
' + conv_data + "
\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 ed95bb1..66cf648 100755 --- a/build.sh +++ b/build.sh @@ -61,7 +61,7 @@ for i in $(ls -d "examples"/* | sort); do 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" - cd "$i/dictionaries" + cd "$i/structural_files" if [ -d firefox ]; then for j in $(ls firefox/*.yml 2>/dev/null); do cp "$j" "$DEST/$j" diff --git a/examples/000/dictionaries/firefox/00-proxy.yml b/examples/000/structural_files/firefox/00-proxy.yml similarity index 54% rename from examples/000/dictionaries/firefox/00-proxy.yml rename to examples/000/structural_files/firefox/00-proxy.yml index 525ab79..94a82bd 100644 --- a/examples/000/dictionaries/firefox/00-proxy.yml +++ b/examples/000/structural_files/firefox/00-proxy.yml @@ -1,2 +1,4 @@ +%YAML 1.2 --- version: 1.1 +... diff --git a/examples/001/dictionaries/firefox/00-proxy.yml b/examples/001/dictionaries/firefox/00-proxy.yml deleted file mode 100644 index ed97d53..0000000 --- a/examples/001/dictionaries/firefox/00-proxy.yml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/examples/001/structural_files/firefox/00-proxy.yml b/examples/001/structural_files/firefox/00-proxy.yml new file mode 100644 index 0000000..94a82bd --- /dev/null +++ b/examples/001/structural_files/firefox/00-proxy.yml @@ -0,0 +1,4 @@ +%YAML 1.2 +--- +version: 1.1 +... diff --git a/examples/010/dictionaries/firefox/00-proxy.yml b/examples/010/structural_files/firefox/00-proxy.yml similarity index 68% rename from examples/010/dictionaries/firefox/00-proxy.yml rename to examples/010/structural_files/firefox/00-proxy.yml index 12f129a..1ddc369 100644 --- a/examples/010/dictionaries/firefox/00-proxy.yml +++ b/examples/010/structural_files/firefox/00-proxy.yml @@ -1,4 +1,6 @@ %YAML 1.2 --- +version: 1.1 + proxy_mode: ... diff --git a/examples/011/README.md b/examples/011/README.md index bd15787..e5a66f6 100644 --- a/examples/011/README.md +++ b/examples/011/README.md @@ -6,4 +6,4 @@ 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/gnunux/rougail-user-data-questionary)). +- 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/dictionaries/firefox/00-proxy.yml b/examples/011/dictionaries/firefox/00-proxy.yml deleted file mode 100644 index 28a4cad..0000000 --- a/examples/011/dictionaries/firefox/00-proxy.yml +++ /dev/null @@ -1,5 +0,0 @@ -%YAML 1.2 ---- -proxy_mode: - description: Configure Proxy Access to the Internet -... diff --git a/examples/011/structural_files/firefox/00-proxy.yml b/examples/011/structural_files/firefox/00-proxy.yml new file mode 100644 index 0000000..5b6478f --- /dev/null +++ b/examples/011/structural_files/firefox/00-proxy.yml @@ -0,0 +1,6 @@ +%YAML 1.2 +--- +version: 1.1 + +proxy_mode: # Configure Proxy Access to the Internet +... diff --git a/examples/012/dictionaries/firefox/00-proxy.yml b/examples/012/dictionaries/firefox/00-proxy.yml deleted file mode 100644 index ce5db5a..0000000 --- a/examples/012/dictionaries/firefox/00-proxy.yml +++ /dev/null @@ -1,6 +0,0 @@ -%YAML 1.2 ---- -proxy_mode: - description: Configure Proxy Access to the Internet - default: No proxy -... diff --git a/examples/012/structural_files/firefox/00-proxy.yml b/examples/012/structural_files/firefox/00-proxy.yml new file mode 100644 index 0000000..b358551 --- /dev/null +++ b/examples/012/structural_files/firefox/00-proxy.yml @@ -0,0 +1,6 @@ +%YAML 1.2 +--- +version: 1.1 + +proxy_mode: No proxy # Configure Proxy Access to the Internet +... diff --git a/examples/013/dictionaries/firefox/00-proxy.yml b/examples/013/structural_files/firefox/00-proxy.yml similarity index 95% rename from examples/013/dictionaries/firefox/00-proxy.yml rename to examples/013/structural_files/firefox/00-proxy.yml index 2cb6687..71c2c5e 100644 --- a/examples/013/dictionaries/firefox/00-proxy.yml +++ b/examples/013/structural_files/firefox/00-proxy.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + proxy_mode: description: Configure Proxy Access to the Internet type: choice diff --git a/examples/014/dictionaries/firefox/00-proxy.yml b/examples/014/structural_files/firefox/00-proxy.yml similarity index 95% rename from examples/014/dictionaries/firefox/00-proxy.yml rename to examples/014/structural_files/firefox/00-proxy.yml index b7a8bcb..92b75f5 100644 --- a/examples/014/dictionaries/firefox/00-proxy.yml +++ b/examples/014/structural_files/firefox/00-proxy.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + proxy_mode: description: Configure Proxy Access to the Internet choices: diff --git a/examples/020/dictionaries/firefox/10-manual.yml b/examples/020/structural_files/firefox/10-manual.yml similarity index 85% rename from examples/020/dictionaries/firefox/10-manual.yml rename to examples/020/structural_files/firefox/10-manual.yml index ef2132c..7626e80 100644 --- a/examples/020/dictionaries/firefox/10-manual.yml +++ b/examples/020/structural_files/firefox/10-manual.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + manual: description: Manual proxy configuration type: family diff --git a/examples/021/README.md b/examples/021/README.md index 3a2fca9..06a13e3 100644 --- a/examples/021/README.md +++ b/examples/021/README.md @@ -3,5 +3,6 @@ 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). diff --git a/examples/021/dictionaries/firefox/10-manual.yml b/examples/021/structural_files/firefox/10-manual.yml similarity index 54% rename from examples/021/dictionaries/firefox/10-manual.yml rename to examples/021/structural_files/firefox/10-manual.yml index 82d385d..5d6d2b0 100644 --- a/examples/021/dictionaries/firefox/10-manual.yml +++ b/examples/021/structural_files/firefox/10-manual.yml @@ -1,8 +1,8 @@ %YAML 1.2 --- -manual: - description: Manual proxy configuration - type: family +version: 1.1 + +manual: # Manual proxy configuration http_proxy: description: HTTP Proxy diff --git a/examples/022/dictionaries/firefox/10-manual.yml b/examples/022/dictionaries/firefox/10-manual.yml deleted file mode 100644 index 56431b3..0000000 --- a/examples/022/dictionaries/firefox/10-manual.yml +++ /dev/null @@ -1,13 +0,0 @@ -%YAML 1.2 ---- -manual: - description: Manual proxy configuration - type: family - - http_proxy: - description: HTTP Proxy - type: family - - address: - description: HTTP address -... diff --git a/examples/022/structural_files/firefox/10-manual.yml b/examples/022/structural_files/firefox/10-manual.yml new file mode 100644 index 0000000..316c6ce --- /dev/null +++ b/examples/022/structural_files/firefox/10-manual.yml @@ -0,0 +1,10 @@ +%YAML 1.2 +--- +version: 1.1 + +manual: # Manual proxy configuration + + http_proxy: # HTTP Proxy + + address: # HTTP address +... diff --git a/examples/023/README.md b/examples/023/README.md index fa78fb2..d3326ec 100644 --- a/examples/023/README.md +++ b/examples/023/README.md @@ -1 +1 @@ -Family type is optional +A variable with type "domainname" diff --git a/examples/024/SUBTITLE.md b/examples/023/SUBTITLE.md similarity index 100% rename from examples/024/SUBTITLE.md rename to examples/023/SUBTITLE.md diff --git a/examples/024/TITLE.md b/examples/023/TITLE.md similarity index 100% rename from examples/024/TITLE.md rename to examples/023/TITLE.md diff --git a/examples/023/config b/examples/023/config deleted file mode 120000 index 160a2a6..0000000 --- a/examples/023/config +++ /dev/null @@ -1 +0,0 @@ -../010/config \ No newline at end of file diff --git a/examples/024/config/01/config.yaml b/examples/023/config/01/config.yaml similarity index 100% rename from examples/024/config/01/config.yaml rename to examples/023/config/01/config.yaml diff --git a/examples/024/config/02/config.yaml b/examples/023/config/02/config.yaml similarity index 100% rename from examples/024/config/02/config.yaml rename to examples/023/config/02/config.yaml diff --git a/examples/024/config/03/config.yaml b/examples/023/config/03/config.yaml similarity index 100% rename from examples/024/config/03/config.yaml rename to examples/023/config/03/config.yaml diff --git a/examples/024/config/04/config.yaml b/examples/023/config/04/config.yaml similarity index 100% rename from examples/024/config/04/config.yaml rename to examples/023/config/04/config.yaml diff --git a/examples/024/config/05/README.md b/examples/023/config/05/README.md similarity index 100% rename from examples/024/config/05/README.md rename to examples/023/config/05/README.md diff --git a/examples/024/config/05/config.yaml b/examples/023/config/05/config.yaml similarity index 100% rename from examples/024/config/05/config.yaml rename to examples/023/config/05/config.yaml diff --git a/examples/024/config/read_write b/examples/023/config/read_write similarity index 100% rename from examples/024/config/read_write rename to examples/023/config/read_write diff --git a/examples/023/dictionaries/firefox/10-manual.yml b/examples/023/dictionaries/firefox/10-manual.yml deleted file mode 100644 index 0af22a3..0000000 --- a/examples/023/dictionaries/firefox/10-manual.yml +++ /dev/null @@ -1,11 +0,0 @@ -%YAML 1.2 ---- -manual: - description: Manual proxy configuration - - http_proxy: - description: HTTP Proxy - - address: - description: HTTP address -... diff --git a/examples/023/structural_files/firefox/10-manual.yml b/examples/023/structural_files/firefox/10-manual.yml new file mode 100644 index 0000000..39f4cb2 --- /dev/null +++ b/examples/023/structural_files/firefox/10-manual.yml @@ -0,0 +1,12 @@ +%YAML 1.2 +--- +version: 1.1 + +manual: # Manual proxy configuration + + http_proxy: # HTTP Proxy + + address: + description: HTTP address + type: domainname +... diff --git a/examples/024/README.md b/examples/024/README.md index d3326ec..57a7fb3 100644 --- a/examples/024/README.md +++ b/examples/024/README.md @@ -1 +1 @@ -A variable with type "domainname" +A variable with type's parameters diff --git a/examples/028/config b/examples/024/config similarity index 100% rename from examples/028/config rename to examples/024/config diff --git a/examples/024/dictionaries/firefox/10-manual.yml b/examples/024/dictionaries/firefox/10-manual.yml deleted file mode 100644 index ae7cdf4..0000000 --- a/examples/024/dictionaries/firefox/10-manual.yml +++ /dev/null @@ -1,12 +0,0 @@ -%YAML 1.2 ---- -manual: - description: Manual proxy configuration - - http_proxy: - description: HTTP Proxy - - address: - description: HTTP address - type: domainname -... diff --git a/examples/025/dictionaries/firefox/10-manual.yml b/examples/024/structural_files/firefox/10-manual.yml similarity index 57% rename from examples/025/dictionaries/firefox/10-manual.yml rename to examples/024/structural_files/firefox/10-manual.yml index 5609c9b..973e436 100644 --- a/examples/025/dictionaries/firefox/10-manual.yml +++ b/examples/024/structural_files/firefox/10-manual.yml @@ -1,10 +1,10 @@ %YAML 1.2 --- -manual: - description: Manual proxy configuration +version: 1.1 - http_proxy: - description: HTTP Proxy +manual: # Manual proxy configuration + + http_proxy: # HTTP Proxy address: description: HTTP address diff --git a/examples/025/README.md b/examples/025/README.md index 57a7fb3..da8667a 100644 --- a/examples/025/README.md +++ b/examples/025/README.md @@ -1 +1 @@ -A variable with type's parameters +A variable with type "port" diff --git a/examples/026/dictionaries/firefox/10-manual.yml b/examples/025/structural_files/firefox/10-manual.yml similarity index 68% rename from examples/026/dictionaries/firefox/10-manual.yml rename to examples/025/structural_files/firefox/10-manual.yml index 9e89737..304fc84 100644 --- a/examples/026/dictionaries/firefox/10-manual.yml +++ b/examples/025/structural_files/firefox/10-manual.yml @@ -1,10 +1,10 @@ %YAML 1.2 --- -manual: - description: Manual proxy configuration +version: 1.1 - http_proxy: - description: HTTP Proxy +manual: # Manual proxy configuration + + http_proxy: # HTTP Proxy address: description: HTTP address diff --git a/examples/026/README.md b/examples/026/README.md index da8667a..553282f 100644 --- a/examples/026/README.md +++ b/examples/026/README.md @@ -1 +1 @@ -A variable with type "port" +A disabled family diff --git a/examples/027/SUBTITLE.md b/examples/026/SUBTITLE.md similarity index 100% rename from examples/027/SUBTITLE.md rename to examples/026/SUBTITLE.md diff --git a/examples/027/dictionaries/firefox/10-manual.yml b/examples/026/structural_files/firefox/10-manual.yml similarity index 86% rename from examples/027/dictionaries/firefox/10-manual.yml rename to examples/026/structural_files/firefox/10-manual.yml index 1b7d9e0..596b79e 100644 --- a/examples/027/dictionaries/firefox/10-manual.yml +++ b/examples/026/structural_files/firefox/10-manual.yml @@ -1,11 +1,12 @@ %YAML 1.2 --- +version: 1.1 + manual: description: Manual proxy configuration disabled: true - http_proxy: - description: HTTP Proxy + http_proxy: # HTTP Proxy address: description: HTTP address diff --git a/examples/027/README.md b/examples/027/README.md index 553282f..dbdd290 100644 --- a/examples/027/README.md +++ b/examples/027/README.md @@ -1 +1 @@ -A disabled family +A conditional disabled family with a variable diff --git a/examples/090/dictionaries/firefox/10-manual.yml b/examples/027/structural_files/firefox/10-manual.yml similarity index 96% rename from examples/090/dictionaries/firefox/10-manual.yml rename to examples/027/structural_files/firefox/10-manual.yml index b5e71fd..047ff8a 100644 --- a/examples/090/dictionaries/firefox/10-manual.yml +++ b/examples/027/structural_files/firefox/10-manual.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + manual: description: Manual proxy configuration disabled: diff --git a/examples/028/README.md b/examples/028/README.md index dbdd290..e84df81 100644 --- a/examples/028/README.md +++ b/examples/028/README.md @@ -1 +1 @@ -A conditional disabled family with a variable +Type variable is optional diff --git a/examples/028/dictionaries/firefox/10-manual.yml b/examples/028/dictionaries/firefox/10-manual.yml deleted file mode 100644 index af258e2..0000000 --- a/examples/028/dictionaries/firefox/10-manual.yml +++ /dev/null @@ -1,23 +0,0 @@ -%YAML 1.2 ---- -manual: - description: Manual proxy configuration - disabled: - type: variable - variable: proxy_mode - when_not: 'Manual proxy configuration' - - http_proxy: - description: HTTP Proxy - - address: - description: HTTP address - type: domainname - params: - allow_ip: true - - port: - description: HTTP Port - type: port - default: 8080 -... diff --git a/examples/050/dictionaries/firefox/10-manual.yml b/examples/028/structural_files/firefox/10-manual.yml similarity index 89% rename from examples/050/dictionaries/firefox/10-manual.yml rename to examples/028/structural_files/firefox/10-manual.yml index 013508d..047ff8a 100644 --- a/examples/050/dictionaries/firefox/10-manual.yml +++ b/examples/028/structural_files/firefox/10-manual.yml @@ -1,9 +1,11 @@ %YAML 1.2 --- +version: 1.1 + manual: description: Manual proxy configuration disabled: - variable: proxy_mode + variable: _.proxy_mode when_not: Manual proxy configuration http_proxy: # HTTP Proxy diff --git a/examples/029/README.md b/examples/029/README.md deleted file mode 100644 index e84df81..0000000 --- a/examples/029/README.md +++ /dev/null @@ -1 +0,0 @@ -Type variable is optional diff --git a/examples/030/dictionaries/firefox/20-manual.yml b/examples/030/dictionaries/firefox/20-manual.yml deleted file mode 100644 index c06545a..0000000 --- a/examples/030/dictionaries/firefox/20-manual.yml +++ /dev/null @@ -1,9 +0,0 @@ -%YAML 1.2 ---- -manual: - - use_for_https: - description: Also use this proxy for HTTPS - type: boolean - default: true -... diff --git a/examples/030/structural_files/firefox/20-manual.yml b/examples/030/structural_files/firefox/20-manual.yml new file mode 100644 index 0000000..bbd0f25 --- /dev/null +++ b/examples/030/structural_files/firefox/20-manual.yml @@ -0,0 +1,8 @@ +%YAML 1.2 +--- +version: 1.1 + +manual: + + use_for_https: true # Also use this proxy for HTTPS +... diff --git a/examples/031/dictionaries/firefox/20-manual.yml b/examples/031/dictionaries/firefox/20-manual.yml deleted file mode 100644 index 46bc7e3..0000000 --- a/examples/031/dictionaries/firefox/20-manual.yml +++ /dev/null @@ -1,8 +0,0 @@ -%YAML 1.2 ---- -manual: - - use_for_https: - description: Also use this proxy for HTTPS - default: true -... diff --git a/examples/031/structural_files/firefox/20-manual.yml b/examples/031/structural_files/firefox/20-manual.yml new file mode 100644 index 0000000..bbd0f25 --- /dev/null +++ b/examples/031/structural_files/firefox/20-manual.yml @@ -0,0 +1,8 @@ +%YAML 1.2 +--- +version: 1.1 + +manual: + + use_for_https: true # Also use this proxy for HTTPS +... diff --git a/examples/034/dictionaries/firefox/20-manual.yml b/examples/032/structural_files/firefox/20-manual.yml similarity index 54% rename from examples/034/dictionaries/firefox/20-manual.yml rename to examples/032/structural_files/firefox/20-manual.yml index 5370b9f..442fb2d 100644 --- a/examples/034/dictionaries/firefox/20-manual.yml +++ b/examples/032/structural_files/firefox/20-manual.yml @@ -1,15 +1,12 @@ %YAML 1.2 --- +version: 1.1 + manual: - use_for_https: - description: Also use this proxy for HTTPS - default: true + use_for_https: true # Also use this proxy for HTTPS - https_proxy: - description: HTTPS Proxy - hidden: - variable: manual.use_for_https + https_proxy: # HTTPS Proxy address: description: HTTPS address diff --git a/examples/033/dictionaries/firefox/20-manual.yml b/examples/033/structural_files/firefox/20-manual.yml similarity index 76% rename from examples/033/dictionaries/firefox/20-manual.yml rename to examples/033/structural_files/firefox/20-manual.yml index bf3fd99..42f47c9 100644 --- a/examples/033/dictionaries/firefox/20-manual.yml +++ b/examples/033/structural_files/firefox/20-manual.yml @@ -1,10 +1,10 @@ %YAML 1.2 --- +version: 1.1 + manual: - use_for_https: - description: Also use this proxy for HTTPS - default: true + use_for_https: true # Also use this proxy for HTTPS https_proxy: description: HTTPS Proxy diff --git a/examples/032/dictionaries/firefox/20-manual.yml b/examples/034/structural_files/firefox/20-manual.yml similarity index 69% rename from examples/032/dictionaries/firefox/20-manual.yml rename to examples/034/structural_files/firefox/20-manual.yml index c90f85b..f7295f0 100644 --- a/examples/032/dictionaries/firefox/20-manual.yml +++ b/examples/034/structural_files/firefox/20-manual.yml @@ -1,13 +1,15 @@ %YAML 1.2 --- +version: 1.1 + manual: - use_for_https: - description: Also use this proxy for HTTPS - default: true + use_for_https: true # Also use this proxy for HTTPS https_proxy: description: HTTPS Proxy + hidden: + variable: _.use_for_https address: description: HTTPS address diff --git a/examples/035/dictionaries/firefox/20-manual.yml b/examples/035/structural_files/firefox/20-manual.yml similarity index 57% rename from examples/035/dictionaries/firefox/20-manual.yml rename to examples/035/structural_files/firefox/20-manual.yml index c88075d..3e15a0b 100644 --- a/examples/035/dictionaries/firefox/20-manual.yml +++ b/examples/035/structural_files/firefox/20-manual.yml @@ -1,15 +1,15 @@ %YAML 1.2 --- +version: 1.1 + manual: - use_for_https: - description: Also use this proxy for HTTPS - default: true + use_for_https: true # Also use this proxy for HTTPS https_proxy: description: HTTPS Proxy hidden: - variable: manual.use_for_https + variable: _.use_for_https address: description: HTTPS address @@ -17,11 +17,11 @@ manual: params: allow_ip: true default: - variable: manual.http_proxy.address + variable: __.http_proxy.address port: description: HTTPS Port type: port default: - variable: manual.http_proxy.port + variable: __.http_proxy.port ... diff --git a/examples/036/dictionaries/firefox/20-manual.yml b/examples/036/dictionaries/firefox/20-manual.yml deleted file mode 100644 index 8030167..0000000 --- a/examples/036/dictionaries/firefox/20-manual.yml +++ /dev/null @@ -1,23 +0,0 @@ -%YAML 1.2 ---- -manual: - - use_for_https: - description: Also use this proxy for HTTPS - default: true - - https_proxy: - description: HTTPS Proxy - hidden: - variable: manual.use_for_https - - address: - description: HTTPS address - default: - variable: manual.http_proxy.address - - port: - description: HTTPS Port - default: - variable: manual.http_proxy.port -... diff --git a/examples/036/structural_files/firefox/20-manual.yml b/examples/036/structural_files/firefox/20-manual.yml new file mode 100644 index 0000000..f25bcd9 --- /dev/null +++ b/examples/036/structural_files/firefox/20-manual.yml @@ -0,0 +1,23 @@ +%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/040/dictionaries/firefox/20-manual.yml b/examples/040/dictionaries/firefox/20-manual.yml deleted file mode 100644 index ccb40ef..0000000 --- a/examples/040/dictionaries/firefox/20-manual.yml +++ /dev/null @@ -1,26 +0,0 @@ -%YAML 1.2 ---- -manual: - - use_for_https: - description: Also use this proxy for HTTPS - default: true - - "{{ identifier }}_proxy": - description: "{{ identifier }} Proxy" - dynamic: - - HTTPS - - SOCKS - hidden: - variable: manual.use_for_https - - address: - description: "{{ identifier }} address" - default: - variable: manual.http_proxy.address - - port: - description: "{{ identifier }} port" - default: - variable: manual.http_proxy.port -... diff --git a/examples/040/structural_files/firefox/20-manual.yml b/examples/040/structural_files/firefox/20-manual.yml new file mode 100644 index 0000000..fc35af3 --- /dev/null +++ b/examples/040/structural_files/firefox/20-manual.yml @@ -0,0 +1,26 @@ +%YAML 1.2 +--- +version: 1.1 + +manual: + + use_for_https: true # Also use this proxy for HTTPS + + '{{ identifier }}_proxy': + description: '{{ identifier }} Proxy' + hidden: + variable: _.use_for_https + dynamic: + - HTTPS + - SOCKS + + address: + description: '{{ identifier }} address' + default: + variable: __.http_proxy.address + + port: + description: '{{ identifier }} port' + default: + variable: __.http_proxy.port +... diff --git a/examples/041/dictionaries/firefox/20-manual.yml b/examples/041/dictionaries/firefox/20-manual.yml deleted file mode 100644 index b504531..0000000 --- a/examples/041/dictionaries/firefox/20-manual.yml +++ /dev/null @@ -1,29 +0,0 @@ -%YAML 1.2 ---- -manual: - - use_for_https: - description: Also use this proxy for HTTPS - default: true - - "{{ identifier }}_proxy": - description: "{{ identifier }} Proxy" - dynamic: - - HTTPS - - SOCKS - hidden: - jinja: | - {% if manual.use_for_https %} - HTTPS is same has HTTP - {% endif %} - - address: - description: "{{ identifier }} address" - default: - variable: manual.http_proxy.address - - port: - description: "{{ identifier }} port" - default: - variable: manual.http_proxy.port -... diff --git a/examples/041/structural_files/firefox/20-manual.yml b/examples/041/structural_files/firefox/20-manual.yml new file mode 100644 index 0000000..4ecd6ab --- /dev/null +++ b/examples/041/structural_files/firefox/20-manual.yml @@ -0,0 +1,29 @@ +%YAML 1.2 +--- +version: 1.1 + +manual: + + use_for_https: true # Also use this proxy for HTTPS + + '{{ identifier }}_proxy': + description: '{{ identifier }} Proxy' + hidden: + jinja: |- + {% if manual.use_for_https %} + HTTPS is same has HTTP + {% endif %} + dynamic: + - HTTPS + - SOCKS + + address: + description: '{{ identifier }} address' + default: + variable: __.http_proxy.address + + port: + description: '{{ identifier }} port' + default: + variable: __.http_proxy.port +... diff --git a/examples/042/dictionaries/firefox/20-manual.yml b/examples/042/dictionaries/firefox/20-manual.yml deleted file mode 100644 index 6975aa9..0000000 --- a/examples/042/dictionaries/firefox/20-manual.yml +++ /dev/null @@ -1,32 +0,0 @@ -%YAML 1.2 ---- -manual: - - use_for_https: - description: Also use this proxy for HTTPS - default: true - - "{{ identifier }}_proxy": - description: "{{ identifier }} Proxy" - dynamic: - - HTTPS - - SOCKS - hidden: - jinja: | - {% if my_identifier == 'HTTPS' and manual.use_for_https %} - HTTPS is same has HTTP - {% endif %} - params: - my_identifier: - type: identifier - - address: - description: "{{ identifier }} address" - default: - variable: manual.http_proxy.address - - port: - description: "{{ identifier }} port" - default: - variable: manual.http_proxy.port -... diff --git a/examples/042/structural_files/firefox/20-manual.yml b/examples/042/structural_files/firefox/20-manual.yml new file mode 100644 index 0000000..9598f96 --- /dev/null +++ b/examples/042/structural_files/firefox/20-manual.yml @@ -0,0 +1,32 @@ +%YAML 1.2 +--- +version: 1.1 + +manual: + + use_for_https: true # Also use this proxy for HTTPS + + '{{ identifier }}_proxy': + description: '{{ identifier }} Proxy' + hidden: + jinja: |- + {% if my_identifier == 'HTTPS' and manual.use_for_https %} + HTTPS is same has HTTP + {% endif %} + params: + my_identifier: + type: identifier + dynamic: + - HTTPS + - SOCKS + + address: + description: '{{ identifier }} address' + default: + variable: __.http_proxy.address + + port: + description: '{{ identifier }} port' + default: + variable: __.http_proxy.port +... diff --git a/examples/043/dictionaries/firefox/20-manual.yml b/examples/043/dictionaries/firefox/20-manual.yml deleted file mode 100644 index fc9bd60..0000000 --- a/examples/043/dictionaries/firefox/20-manual.yml +++ /dev/null @@ -1,34 +0,0 @@ -%YAML 1.2 ---- -manual: - - use_for_https: - description: Also use this proxy for HTTPS - default: true - - "{{ identifier }}_proxy": - description: "{{ identifier }} Proxy" - dynamic: - - HTTPS - - SOCKS - hidden: - jinja: | - {% if my_identifier == 'HTTPS' and manual.use_for_https %} - HTTPS is same has HTTP - {% endif %} - params: - my_identifier: - type: identifier - description: | - in HTTPS case if "manual.use_for_https" is set to True - - address: - description: "{{ identifier }} address" - default: - variable: manual.http_proxy.address - - port: - description: "{{ identifier }} port" - default: - variable: manual.http_proxy.port -... diff --git a/examples/043/structural_files/firefox/20-manual.yml b/examples/043/structural_files/firefox/20-manual.yml new file mode 100644 index 0000000..db07b74 --- /dev/null +++ b/examples/043/structural_files/firefox/20-manual.yml @@ -0,0 +1,33 @@ +%YAML 1.2 +--- +version: 1.1 + +manual: + + use_for_https: true # Also use this proxy for HTTPS + + '{{ identifier }}_proxy': + description: '{{ identifier }} Proxy' + hidden: + jinja: |- + {% if my_identifier == 'HTTPS' and manual.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 + + address: + description: '{{ identifier }} address' + default: + variable: __.http_proxy.address + + port: + description: '{{ identifier }} port' + default: + variable: __.http_proxy.port +... diff --git a/examples/044/dictionaries/firefox/20-manual.yml b/examples/044/dictionaries/firefox/20-manual.yml deleted file mode 100644 index 082cfff..0000000 --- a/examples/044/dictionaries/firefox/20-manual.yml +++ /dev/null @@ -1,44 +0,0 @@ -%YAML 1.2 ---- -manual: - - use_for_https: - description: Also use this proxy for HTTPS - default: true - - "{{ identifier }}_proxy": - description: "{{ identifier }} Proxy" - dynamic: - - HTTPS - - SOCKS - hidden: - jinja: | - {% if my_identifier == 'HTTPS' and manual.use_for_https %} - HTTPS is same has HTTP - {% endif %} - params: - my_identifier: - type: identifier - description: | - in HTTPS case if "manual.use_for_https" is set to True - - address: - description: "{{ identifier }} address" - default: - variable: manual.http_proxy.address - - port: - description: "{{ identifier }} port" - default: - variable: manual.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/051/dictionaries/firefox/20-manual.yml b/examples/044/structural_files/firefox/20-manual.yml similarity index 81% rename from examples/051/dictionaries/firefox/20-manual.yml rename to examples/044/structural_files/firefox/20-manual.yml index e3b9faa..66119e8 100644 --- a/examples/051/dictionaries/firefox/20-manual.yml +++ b/examples/044/structural_files/firefox/20-manual.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + manual: use_for_https: true # Also use this proxy for HTTPS @@ -11,8 +13,7 @@ manual: {% if my_identifier == 'HTTPS' and manual.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 "manual.use_for_https" is set to True params: my_identifier: type: identifier @@ -23,12 +24,12 @@ manual: address: description: '{{ identifier }} address' default: - variable: manual.http_proxy.address + variable: __.http_proxy.address port: description: '{{ identifier }} port' default: - variable: manual.http_proxy.port + variable: __.http_proxy.port version: description: SOCKS host version used by proxy diff --git a/examples/029/dictionaries/firefox/10-manual.yml b/examples/050/structural_files/firefox/10-manual.yml similarity index 70% rename from examples/029/dictionaries/firefox/10-manual.yml rename to examples/050/structural_files/firefox/10-manual.yml index 98f1381..047ff8a 100644 --- a/examples/029/dictionaries/firefox/10-manual.yml +++ b/examples/050/structural_files/firefox/10-manual.yml @@ -1,13 +1,14 @@ %YAML 1.2 --- +version: 1.1 + manual: description: Manual proxy configuration disabled: - variable: proxy_mode - when_not: 'Manual proxy configuration' + variable: _.proxy_mode + when_not: Manual proxy configuration - http_proxy: - description: HTTP Proxy + http_proxy: # HTTP Proxy address: description: HTTP address diff --git a/examples/051/structural_files/firefox/20-manual.yml b/examples/051/structural_files/firefox/20-manual.yml new file mode 100644 index 0000000..66119e8 --- /dev/null +++ b/examples/051/structural_files/firefox/20-manual.yml @@ -0,0 +1,43 @@ +%YAML 1.2 +--- +version: 1.1 + +manual: + + use_for_https: true # Also use this proxy for HTTPS + + '{{ identifier }}_proxy': + description: '{{ identifier }} Proxy' + hidden: + jinja: |- + {% if my_identifier == 'HTTPS' and manual.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 + + address: + description: '{{ identifier }} address' + default: + variable: __.http_proxy.address + + port: + 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/dictionaries/firefox/30-auto.yml b/examples/060/structural_files/firefox/30-auto.yml similarity index 86% rename from examples/060/dictionaries/firefox/30-auto.yml rename to examples/060/structural_files/firefox/30-auto.yml index dd9c24d..77e252b 100644 --- a/examples/060/dictionaries/firefox/30-auto.yml +++ b/examples/060/structural_files/firefox/30-auto.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + auto: description: Automatic proxy configuration URL type: web_address diff --git a/examples/090/dictionaries/firefox/30-auto.yml b/examples/061/structural_files/firefox/30-auto.yml similarity index 92% rename from examples/090/dictionaries/firefox/30-auto.yml rename to examples/061/structural_files/firefox/30-auto.yml index 448fe52..5096139 100644 --- a/examples/090/dictionaries/firefox/30-auto.yml +++ b/examples/061/structural_files/firefox/30-auto.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + auto: description: Automatic proxy configuration URL type: web_address diff --git a/examples/070/dictionaries/firefox/40-no_proxy.yml b/examples/070/structural_files/firefox/40-no_proxy.yml similarity index 86% rename from examples/070/dictionaries/firefox/40-no_proxy.yml rename to examples/070/structural_files/firefox/40-no_proxy.yml index 971366a..85b7aab 100644 --- a/examples/070/dictionaries/firefox/40-no_proxy.yml +++ b/examples/070/structural_files/firefox/40-no_proxy.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + no_proxy: description: Address for which proxy will be desactivated type: domainname @@ -9,6 +11,6 @@ no_proxy: allow_without_dot: true allow_startswith_dot: true disabled: - variable: proxy_mode + variable: _.proxy_mode when: No proxy ... diff --git a/examples/071/dictionaries/firefox/40-no_proxy.yml b/examples/071/structural_files/firefox/40-no_proxy.yml similarity index 86% rename from examples/071/dictionaries/firefox/40-no_proxy.yml rename to examples/071/structural_files/firefox/40-no_proxy.yml index 0a7a052..b5f4c74 100644 --- a/examples/071/dictionaries/firefox/40-no_proxy.yml +++ b/examples/071/structural_files/firefox/40-no_proxy.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + no_proxy: description: Address for which proxy will be desactivated type: domainname @@ -10,6 +12,6 @@ no_proxy: allow_startswith_dot: true multi: true disabled: - variable: proxy_mode + variable: _.proxy_mode when: No proxy ... diff --git a/examples/072/dictionaries/firefox/40-no_proxy.yml b/examples/072/structural_files/firefox/40-no_proxy.yml similarity index 87% rename from examples/072/dictionaries/firefox/40-no_proxy.yml rename to examples/072/structural_files/firefox/40-no_proxy.yml index 6116c48..62cd442 100644 --- a/examples/072/dictionaries/firefox/40-no_proxy.yml +++ b/examples/072/structural_files/firefox/40-no_proxy.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + no_proxy: description: Address for which proxy will be desactivated type: domainname @@ -11,6 +13,6 @@ no_proxy: multi: true mandatory: false disabled: - variable: proxy_mode + variable: _.proxy_mode when: No proxy ... diff --git a/examples/073/dictionaries/firefox/40-no_proxy.yml b/examples/073/structural_files/firefox/40-no_proxy.yml similarity index 89% rename from examples/073/dictionaries/firefox/40-no_proxy.yml rename to examples/073/structural_files/firefox/40-no_proxy.yml index 1839cb4..0937690 100644 --- a/examples/073/dictionaries/firefox/40-no_proxy.yml +++ b/examples/073/structural_files/firefox/40-no_proxy.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + no_proxy: description: Address for which proxy will be desactivated examples: @@ -15,6 +17,6 @@ no_proxy: multi: true mandatory: false disabled: - variable: proxy_mode + variable: _.proxy_mode when: No proxy ... diff --git a/examples/090/dictionaries/firefox/40-no_proxy.yml b/examples/074/structural_files/firefox/40-no_proxy.yml similarity index 97% rename from examples/090/dictionaries/firefox/40-no_proxy.yml rename to examples/074/structural_files/firefox/40-no_proxy.yml index 27583c4..55a5724 100644 --- a/examples/090/dictionaries/firefox/40-no_proxy.yml +++ b/examples/074/structural_files/firefox/40-no_proxy.yml @@ -1,5 +1,7 @@ %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 diff --git a/examples/090/dictionaries/firefox/50-prompt_authentication.yml b/examples/075/structural_files/firefox/50-prompt_authentication.yml similarity index 92% rename from examples/090/dictionaries/firefox/50-prompt_authentication.yml rename to examples/075/structural_files/firefox/50-prompt_authentication.yml index 26a3d4c..57a548e 100644 --- a/examples/090/dictionaries/firefox/50-prompt_authentication.yml +++ b/examples/075/structural_files/firefox/50-prompt_authentication.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + prompt_authentication: description: Prompt for authentication if password is saved default: true diff --git a/examples/076/dictionaries/firefox/55-proxy_dns_socks5.yml b/examples/076/dictionaries/firefox/55-proxy_dns_socks5.yml deleted file mode 100644 index 5d575db..0000000 --- a/examples/076/dictionaries/firefox/55-proxy_dns_socks5.yml +++ /dev/null @@ -1,6 +0,0 @@ -%YAML 1.2 ---- -proxy_dns_socks5: - description: Use proxy DNS when using SOCKS v5 - default: false -... diff --git a/examples/076/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/076/structural_files/firefox/55-proxy_dns_socks5.yml new file mode 100644 index 0000000..a79c8ae --- /dev/null +++ b/examples/076/structural_files/firefox/55-proxy_dns_socks5.yml @@ -0,0 +1,6 @@ +%YAML 1.2 +--- +version: 1.1 + +proxy_dns_socks5: false # Use proxy DNS when using SOCKS v5 +... diff --git a/examples/077/dictionaries/firefox/55-proxy_dns_socks5.yml b/examples/077/structural_files/firefox/55-proxy_dns_socks5.yml similarity index 92% rename from examples/077/dictionaries/firefox/55-proxy_dns_socks5.yml rename to examples/077/structural_files/firefox/55-proxy_dns_socks5.yml index 527af5d..0b92e44 100644 --- a/examples/077/dictionaries/firefox/55-proxy_dns_socks5.yml +++ b/examples/077/structural_files/firefox/55-proxy_dns_socks5.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + proxy_dns_socks5: description: Use proxy DNS when using SOCKS v5 default: false @@ -10,7 +12,7 @@ proxy_dns_socks5: {% elif manual.socks_proxy.version == 'v4' %} socks version is v4 {% endif %} - description: | + description: |- if "firefox.proxy_mode" is not "Manual proxy configuration" or "firefox.manual.socks_proxy.version" is "v4" ... diff --git a/examples/078/dictionaries/firefox/55-proxy_dns_socks5.yml b/examples/078/structural_files/firefox/55-proxy_dns_socks5.yml similarity index 93% rename from examples/078/dictionaries/firefox/55-proxy_dns_socks5.yml rename to examples/078/structural_files/firefox/55-proxy_dns_socks5.yml index 1a6f6e1..e67b694 100644 --- a/examples/078/dictionaries/firefox/55-proxy_dns_socks5.yml +++ b/examples/078/structural_files/firefox/55-proxy_dns_socks5.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + proxy_dns_socks5: description: Use proxy DNS when using SOCKS v5 mode: advanced @@ -11,7 +13,7 @@ proxy_dns_socks5: {% elif manual.socks_proxy.version == 'v4' %} socks version is v4 {% endif %} - description: | + description: |- if "firefox.proxy_mode" is not "Manual proxy configuration" or "firefox.manual.socks_proxy.version" is "v4" ... diff --git a/examples/080/dictionaries/firefox/60-dns_over_https.yml b/examples/080/structural_files/firefox/60-dns_over_https.yml similarity index 88% rename from examples/080/dictionaries/firefox/60-dns_over_https.yml rename to examples/080/structural_files/firefox/60-dns_over_https.yml index abaf5ac..754f2a8 100644 --- a/examples/080/dictionaries/firefox/60-dns_over_https.yml +++ b/examples/080/structural_files/firefox/60-dns_over_https.yml @@ -1,5 +1,7 @@ %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/081/dictionaries/firefox/60-dns_over_https.yml b/examples/081/structural_files/firefox/60-dns_over_https.yml similarity index 83% rename from examples/081/dictionaries/firefox/60-dns_over_https.yml rename to examples/081/structural_files/firefox/60-dns_over_https.yml index 08d089a..b5a71cd 100644 --- a/examples/081/dictionaries/firefox/60-dns_over_https.yml +++ b/examples/081/structural_files/firefox/60-dns_over_https.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + dns_over_https: # DNS over HTTPS enable_dns_over_https: false # Enable DNS over HTTPS @@ -12,6 +14,6 @@ dns_over_https: # DNS over HTTPS - Custom default: Cloudflare disabled: - variable: dns_over_https.enable_dns_over_https + variable: _.enable_dns_over_https when: false ... diff --git a/examples/082/dictionaries/firefox/60-dns_over_https.yml b/examples/082/structural_files/firefox/60-dns_over_https.yml similarity index 91% rename from examples/082/dictionaries/firefox/60-dns_over_https.yml rename to examples/082/structural_files/firefox/60-dns_over_https.yml index dfaadd8..c6292d5 100644 --- a/examples/082/dictionaries/firefox/60-dns_over_https.yml +++ b/examples/082/structural_files/firefox/60-dns_over_https.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + dns_over_https: # DNS over HTTPS enable_dns_over_https: false # Enable DNS over HTTPS @@ -12,7 +14,7 @@ dns_over_https: # DNS over HTTPS - Custom default: Cloudflare disabled: - variable: dns_over_https.enable_dns_over_https + variable: _.enable_dns_over_https when: false custom_dns_url: diff --git a/examples/083/dictionaries/firefox/60-dns_over_https.yml b/examples/083/structural_files/firefox/60-dns_over_https.yml similarity index 93% rename from examples/083/dictionaries/firefox/60-dns_over_https.yml rename to examples/083/structural_files/firefox/60-dns_over_https.yml index a26ed91..52bda37 100644 --- a/examples/083/dictionaries/firefox/60-dns_over_https.yml +++ b/examples/083/structural_files/firefox/60-dns_over_https.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + dns_over_https: # DNS over HTTPS enable_dns_over_https: false # Enable DNS over HTTPS @@ -12,7 +14,7 @@ dns_over_https: # DNS over HTTPS - Custom default: Cloudflare disabled: - variable: dns_over_https.enable_dns_over_https + variable: _.enable_dns_over_https when: false custom_dns_url: diff --git a/examples/090/dictionaries/firefox/00-proxy.yml b/examples/090/structural_files/firefox/00-proxy.yml similarity index 95% rename from examples/090/dictionaries/firefox/00-proxy.yml rename to examples/090/structural_files/firefox/00-proxy.yml index b7a8bcb..92b75f5 100644 --- a/examples/090/dictionaries/firefox/00-proxy.yml +++ b/examples/090/structural_files/firefox/00-proxy.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + proxy_mode: description: Configure Proxy Access to the Internet choices: diff --git a/examples/090/structural_files/firefox/10-manual.yml b/examples/090/structural_files/firefox/10-manual.yml new file mode 100644 index 0000000..047ff8a --- /dev/null +++ b/examples/090/structural_files/firefox/10-manual.yml @@ -0,0 +1,23 @@ +%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/091/dictionaries/firefox/20-manual.yml b/examples/090/structural_files/firefox/20-manual.yml similarity index 90% rename from examples/091/dictionaries/firefox/20-manual.yml rename to examples/090/structural_files/firefox/20-manual.yml index 8adb88b..2bd707b 100644 --- a/examples/091/dictionaries/firefox/20-manual.yml +++ b/examples/090/structural_files/firefox/20-manual.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + manual: use_for_https: true # Also use this proxy for HTTPS @@ -11,8 +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 "manual.use_for_https" is set to True params: my_identifier: type: identifier diff --git a/examples/061/dictionaries/firefox/30-auto.yml b/examples/090/structural_files/firefox/30-auto.yml similarity index 78% rename from examples/061/dictionaries/firefox/30-auto.yml rename to examples/090/structural_files/firefox/30-auto.yml index e002985..5096139 100644 --- a/examples/061/dictionaries/firefox/30-auto.yml +++ b/examples/090/structural_files/firefox/30-auto.yml @@ -1,9 +1,11 @@ %YAML 1.2 --- +version: 1.1 + auto: description: Automatic proxy configuration URL type: web_address disabled: - variable: proxy_mode + variable: _.proxy_mode when_not: Automatic proxy configuration URL ... diff --git a/examples/074/dictionaries/firefox/40-no_proxy.yml b/examples/090/structural_files/firefox/40-no_proxy.yml similarity index 91% rename from examples/074/dictionaries/firefox/40-no_proxy.yml rename to examples/090/structural_files/firefox/40-no_proxy.yml index ff702a9..55a5724 100644 --- a/examples/074/dictionaries/firefox/40-no_proxy.yml +++ b/examples/090/structural_files/firefox/40-no_proxy.yml @@ -1,5 +1,7 @@ %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 @@ -16,6 +18,6 @@ no_proxy: multi: true mandatory: false disabled: - variable: proxy_mode + variable: _.proxy_mode when: No proxy ... diff --git a/examples/075/dictionaries/firefox/50-prompt_authentication.yml b/examples/090/structural_files/firefox/50-prompt_authentication.yml similarity index 78% rename from examples/075/dictionaries/firefox/50-prompt_authentication.yml rename to examples/090/structural_files/firefox/50-prompt_authentication.yml index 5e9ff46..57a548e 100644 --- a/examples/075/dictionaries/firefox/50-prompt_authentication.yml +++ b/examples/090/structural_files/firefox/50-prompt_authentication.yml @@ -1,9 +1,11 @@ %YAML 1.2 --- +version: 1.1 + prompt_authentication: description: Prompt for authentication if password is saved default: true disabled: - variable: proxy_mode + variable: _.proxy_mode when: No proxy ... diff --git a/examples/090/dictionaries/firefox/55-proxy_dns_socks5.yml b/examples/090/structural_files/firefox/55-proxy_dns_socks5.yml similarity index 93% rename from examples/090/dictionaries/firefox/55-proxy_dns_socks5.yml rename to examples/090/structural_files/firefox/55-proxy_dns_socks5.yml index 112bd48..0f1a65f 100644 --- a/examples/090/dictionaries/firefox/55-proxy_dns_socks5.yml +++ b/examples/090/structural_files/firefox/55-proxy_dns_socks5.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + proxy_dns_socks5: description: Use proxy DNS when using SOCKS v5 mode: advanced @@ -11,7 +13,7 @@ proxy_dns_socks5: {% elif _.manual.socks_proxy.version == 'v4' %} socks version is v4 {% endif %} - description: | + description: |- if "firefox.proxy_mode" is not "Manual proxy configuration" or "firefox.manual.socks_proxy.version" is "v4" ... diff --git a/examples/090/dictionaries/firefox/60-dns_over_https.yml b/examples/090/structural_files/firefox/60-dns_over_https.yml similarity index 98% rename from examples/090/dictionaries/firefox/60-dns_over_https.yml rename to examples/090/structural_files/firefox/60-dns_over_https.yml index 7c9e12d..ccc4a5a 100644 --- a/examples/090/dictionaries/firefox/60-dns_over_https.yml +++ b/examples/090/structural_files/firefox/60-dns_over_https.yml @@ -1,5 +1,7 @@ %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/090/dictionaries/firefox/20-manual.yml b/examples/091/structural_files/firefox/20-manual.yml similarity index 55% rename from examples/090/dictionaries/firefox/20-manual.yml rename to examples/091/structural_files/firefox/20-manual.yml index e40d5bd..2bd707b 100644 --- a/examples/090/dictionaries/firefox/20-manual.yml +++ b/examples/091/structural_files/firefox/20-manual.yml @@ -1,34 +1,35 @@ %YAML 1.2 --- +version: 1.1 + manual: use_for_https: true # Also use this proxy for HTTPS - "{{ identifier }}_proxy": - description: "{{ identifier }} Proxy" - dynamic: - - HTTPS - - SOCKS + '{{ identifier }}_proxy': + description: '{{ identifier }} Proxy' hidden: - jinja: | + jinja: |- {% if my_identifier == 'HTTPS' and _.use_for_https %} - HTTPS is same has HTTP + HTTPS is same has HTTP {% endif %} + description: in HTTPS case if "manual.use_for_https" is set to True params: my_identifier: type: identifier - description: | - in HTTPS case if "manual.use_for_https" is set to True + dynamic: + - HTTPS + - SOCKS address: - description: "{{ identifier }} address" + description: '{{ identifier }} address' default: - variable: manual.http_proxy.address + variable: __.http_proxy.address port: - description: "{{ identifier }} port" + description: '{{ identifier }} port' default: - variable: manual.http_proxy.port + variable: __.http_proxy.port version: description: SOCKS host version used by proxy @@ -38,5 +39,5 @@ manual: default: v5 disabled: type: identifier - when: 'HTTPS' + when: HTTPS ... diff --git a/examples/092/dictionaries/firefox/empty.yml b/examples/092/dictionaries/firefox/empty.yml deleted file mode 100644 index e69de29..0000000 diff --git a/examples/092/dictionaries/firefox/empty b/examples/092/structural_files/firefox/empty similarity index 100% rename from examples/092/dictionaries/firefox/empty rename to examples/092/structural_files/firefox/empty diff --git a/examples/092/structural_files/firefox/empty.yml b/examples/092/structural_files/firefox/empty.yml new file mode 100644 index 0000000..94a82bd --- /dev/null +++ b/examples/092/structural_files/firefox/empty.yml @@ -0,0 +1,4 @@ +%YAML 1.2 +--- +version: 1.1 +... diff --git a/examples/100/dictionaries/foxyproxy/00-foxyproxy.yml b/examples/100/dictionaries/foxyproxy/00-foxyproxy.yml deleted file mode 100644 index ed97d53..0000000 --- a/examples/100/dictionaries/foxyproxy/00-foxyproxy.yml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/examples/100/structural_files/foxyproxy/00-foxyproxy.yml b/examples/100/structural_files/foxyproxy/00-foxyproxy.yml new file mode 100644 index 0000000..94a82bd --- /dev/null +++ b/examples/100/structural_files/foxyproxy/00-foxyproxy.yml @@ -0,0 +1,4 @@ +%YAML 1.2 +--- +version: 1.1 +... diff --git a/examples/101/dictionaries/foxyproxy/00-foxyproxy.yml b/examples/101/structural_files/foxyproxy/00-foxyproxy.yml similarity index 92% rename from examples/101/dictionaries/foxyproxy/00-foxyproxy.yml rename to examples/101/structural_files/foxyproxy/00-foxyproxy.yml index 3940006..c4586ff 100644 --- a/examples/101/dictionaries/foxyproxy/00-foxyproxy.yml +++ b/examples/101/structural_files/foxyproxy/00-foxyproxy.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + proxies: description: Proxy configuration type: leadership diff --git a/examples/102/dictionaries/foxyproxy/00-foxyproxy.yml b/examples/102/structural_files/foxyproxy/00-foxyproxy.yml similarity index 96% rename from examples/102/dictionaries/foxyproxy/00-foxyproxy.yml rename to examples/102/structural_files/foxyproxy/00-foxyproxy.yml index c2aa8cd..9a292c7 100644 --- a/examples/102/dictionaries/foxyproxy/00-foxyproxy.yml +++ b/examples/102/structural_files/foxyproxy/00-foxyproxy.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + proxies: description: Proxy configuration type: leadership diff --git a/examples/103/dictionaries/foxyproxy/00-foxyproxy.yml b/examples/103/structural_files/foxyproxy/00-foxyproxy.yml similarity index 97% rename from examples/103/dictionaries/foxyproxy/00-foxyproxy.yml rename to examples/103/structural_files/foxyproxy/00-foxyproxy.yml index bb809ee..97123de 100644 --- a/examples/103/dictionaries/foxyproxy/00-foxyproxy.yml +++ b/examples/103/structural_files/foxyproxy/00-foxyproxy.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + proxies: description: Proxy configuration _type: leadership diff --git a/examples/104/dictionaries/foxyproxy/00-foxyproxy.yml b/examples/104/structural_files/foxyproxy/00-foxyproxy.yml similarity index 96% rename from examples/104/dictionaries/foxyproxy/00-foxyproxy.yml rename to examples/104/structural_files/foxyproxy/00-foxyproxy.yml index 183c0c2..d8cfaaa 100644 --- a/examples/104/dictionaries/foxyproxy/00-foxyproxy.yml +++ b/examples/104/structural_files/foxyproxy/00-foxyproxy.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + proxies: description: Proxy configuration _type: leadership @@ -51,14 +53,13 @@ proxies: {% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %} disabled {% endif %} - description: | + description: |- if type not in: - HTTP - HTTPS/SSL - SOCKS4 - SOCKS5 - port: description: Port type: port @@ -73,14 +74,13 @@ proxies: {% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %} disabled {% endif %} - description: | + description: |- if type not in: - HTTP - HTTPS/SSL - SOCKS4 - SOCKS5 - username: description: Username type: unix_user @@ -95,14 +95,13 @@ proxies: {% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %} disabled {% endif %} - description: | + description: |- if type not in: - HTTP - HTTPS/SSL - SOCKS4 - SOCKS5 - password: description: Password type: secret @@ -112,14 +111,13 @@ proxies: {% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %} disabled {% endif %} - description: | + description: |- if type not in: - HTTP - HTTPS/SSL - SOCKS4 - SOCKS5 - url: description: URL type: web_address @@ -134,7 +132,7 @@ proxies: {% if _.type not in ['PAC URL', 'WPAD'] %} proxy does not need url {% endif %} - description: | + description: |- if type is not in: - PAC URL - WPAD diff --git a/examples/110/dictionaries/foxyproxy/10-redefine.yml b/examples/110/structural_files/foxyproxy/10-redefine.yml similarity index 95% rename from examples/110/dictionaries/foxyproxy/10-redefine.yml rename to examples/110/structural_files/foxyproxy/10-redefine.yml index aa942b3..aef4325 100644 --- a/examples/110/dictionaries/foxyproxy/10-redefine.yml +++ b/examples/110/structural_files/foxyproxy/10-redefine.yml @@ -1,5 +1,7 @@ %YAML 1.2 --- +version: 1.1 + proxies: username: