Compare commits
No commits in common. "d437131de9c04e5fbe8fd6c5a3ecd12f1bfd0f0e" and "abf29b2a3cf2583c5274c84768eff4f59d3142c3" have entirely different histories.
d437131de9
...
abf29b2a3c
287 changed files with 346 additions and 710 deletions
154
build.py
154
build.py
|
|
@ -8,9 +8,8 @@ from ansi2html import Ansi2HTMLConverter
|
|||
from bs4 import BeautifulSoup
|
||||
|
||||
from rougail import Rougail
|
||||
from rougail.user_data import mandatories
|
||||
from rougail.config import get_rougail_config
|
||||
from rougail.output_display import RougailOutputDisplay
|
||||
from rougail.output_console import RougailOutputConsole
|
||||
from rougail.user_data_yaml import RougailUserDataYaml
|
||||
from rougail.output_doc import RougailOutputDoc
|
||||
|
||||
|
|
@ -36,11 +35,6 @@ if __name__ == "__main__":
|
|||
has_foxyproxy = False
|
||||
has_namespace = False
|
||||
rougailconfig['main_namespace'] = None
|
||||
if Path('types').is_dir():
|
||||
has_types = True
|
||||
rougailconfig['types'] = [str(d) for d in Path('types').iterdir()]
|
||||
else:
|
||||
has_types = False
|
||||
# rougailconfig['tiramisu_cache'] = "cache.py"
|
||||
if Path('mode').is_file():
|
||||
rougailconfig['modes_level'] = ['basic', 'standard', 'advanced']
|
||||
|
|
@ -54,11 +48,9 @@ if __name__ == "__main__":
|
|||
rougailconfig['doc.output_format'] = 'github'
|
||||
rougailconfig['doc.title_level'] = 3
|
||||
inventory = RougailOutputDoc(config, rougailconfig=rougailconfig)
|
||||
inventory.load()
|
||||
inventory.load_formatter()
|
||||
inv_formatter = inventory.formatter
|
||||
rougailconfig['step.output'] = 'display'
|
||||
rougailconfig['display.console.max_width'] = 80
|
||||
rougailconfig['step.output'] = 'console'
|
||||
summary = Path('summary_before.md')
|
||||
if summary.is_file():
|
||||
with summary.open('r') as sfh:
|
||||
|
|
@ -86,10 +78,7 @@ if __name__ == "__main__":
|
|||
doc += '\n' + inv_formatter.title('Structure', 2) + '\n\n'
|
||||
with tree.open() as fh:
|
||||
soup = BeautifulSoup(fh.read(), features="lxml")
|
||||
tree_content = str(soup.find('p'))
|
||||
doc += tree_content + "\n\n"
|
||||
with tree.open("w") as fh:
|
||||
fh.write(tree_content)
|
||||
doc += str(soup.find('p')) + "\n\n"
|
||||
for f in Path(".").iterdir():
|
||||
if f.name.startswith('DISPLAY_'):
|
||||
filename = f.name[8:]
|
||||
|
|
@ -109,7 +98,6 @@ if __name__ == "__main__":
|
|||
with display_yml.open(encoding="utf8") as file_fh:
|
||||
doc += file_fh.read()
|
||||
doc += '\n```\n'
|
||||
doc += "\n***\n"
|
||||
rougailconfig['step.output'] = 'doc'
|
||||
rougailconfig["doc.title_level"] = 4
|
||||
inv_doc = inventory.run()[1]
|
||||
|
|
@ -118,8 +106,6 @@ if __name__ == "__main__":
|
|||
CMD += "-s Firefox "
|
||||
if has_foxyproxy:
|
||||
CMD += "-xn FoxyProxy -xd 0 foxyproxy/ "
|
||||
if has_types:
|
||||
CMD += "--types " + " ".join(rougailconfig["types"]) + " "
|
||||
if has_mode:
|
||||
CMD += "--modes_level basic standard advanced "
|
||||
if inv_doc:
|
||||
|
|
@ -127,17 +113,15 @@ if __name__ == "__main__":
|
|||
cmd = CMD + "-o doc"
|
||||
doc += f'```shell\n{cmd}\n```\n'
|
||||
doc += inv_doc
|
||||
doc += "\n***\n"
|
||||
if previous.is_file():
|
||||
rougailconfig["doc.contents"] = ["changelog"]
|
||||
rougailconfig["doc.changelog.previous_json_file"] = str(previous)
|
||||
rougailconfig["doc.previous_json_file"] = str(previous)
|
||||
inv_doc = inventory.run()[1]
|
||||
if inv_doc:
|
||||
doc += inv_formatter.title("Let's generate the changelog", 3)
|
||||
cmd = CMD + "-o doc --doc.contents changelog --doc.changelog.previous_json_file previous.yml"
|
||||
cmd = CMD + "-o doc --doc.contents changelog"
|
||||
doc += f'```shell\n{cmd}\n```\n'
|
||||
doc += inv_doc + "\n"
|
||||
doc += "***\n"
|
||||
# save PREVIOUS
|
||||
rougailconfig["doc.contents"] = ["variables"]
|
||||
rougailconfig['doc.output_format'] = 'json'
|
||||
|
|
@ -146,11 +130,11 @@ if __name__ == "__main__":
|
|||
with previous.open('w') as fh:
|
||||
dump(loads(data), fh)
|
||||
#
|
||||
rougailconfig['step.output'] = 'display'
|
||||
config_dir = Path('config')
|
||||
if config_dir.is_dir():
|
||||
rougailconfig['step.output'] = 'console'
|
||||
config = Path('config')
|
||||
if config.is_dir():
|
||||
doc += inv_formatter.title('User datas', 2)
|
||||
configs = list(config_dir.iterdir())
|
||||
configs = list(config.iterdir())
|
||||
configs.sort()
|
||||
for idx, dirname in enumerate(configs):
|
||||
if dirname.is_file():
|
||||
|
|
@ -163,18 +147,14 @@ if __name__ == "__main__":
|
|||
with filename.open(encoding="utf8") as file_fh:
|
||||
doc += file_fh.read()
|
||||
doc += '```\n'
|
||||
doc += "\n***\n"
|
||||
rougail = Rougail(rougailconfig)
|
||||
tiramisu_config = rougail.run()
|
||||
rougailconfig['step.user_data'] = ['yaml']
|
||||
rougailconfig['yaml.filename'] = [str(filename)]
|
||||
data = RougailUserDataYaml(tiramisu_config, rougailconfig=rougailconfig)
|
||||
ret = data.run()
|
||||
errors = rougail.user_data(ret)
|
||||
tiramisu_config.property.read_only()
|
||||
mandatories(tiramisu_config, errors["errors"])
|
||||
rougailconfig['display.output_format'] = "console"
|
||||
export = RougailOutputDisplay(tiramisu_config,
|
||||
errors = rougail.user_datas(ret)
|
||||
export = RougailOutputConsole(tiramisu_config,
|
||||
rougailconfig=rougailconfig,
|
||||
user_data_errors=errors['errors'],
|
||||
user_data_warnings=errors['warnings'],
|
||||
|
|
@ -187,118 +167,33 @@ if __name__ == "__main__":
|
|||
fh.write(cmd)
|
||||
doc += f"```shell\n{cmd}\n```\n"
|
||||
conv_data = '<pre>' + conv.convert(console, full=False) + "</pre>\n"
|
||||
doc += conv_data
|
||||
with open(dirname / 'output_ro.html', 'w') as fh_output:
|
||||
fh_output.write(conv_data)
|
||||
rougailconfig['display.output_format'] = "github"
|
||||
export = RougailOutputDisplay(tiramisu_config,
|
||||
rougailconfig=rougailconfig,
|
||||
user_data_errors=errors['errors'],
|
||||
user_data_warnings=errors['warnings'],
|
||||
)
|
||||
doc += export.run()[1]
|
||||
doc += "\n***\n"
|
||||
if (dirname / 'invalid').is_file():
|
||||
tiramisu_config.property.read_write()
|
||||
errors2 = rougail.user_data(ret, invalid_user_data_error=True)
|
||||
tiramisu_config.property.read_only()
|
||||
mandatories(tiramisu_config, errors2["errors"])
|
||||
rougailconfig['display.output_format'] = "console"
|
||||
export = RougailOutputDisplay(tiramisu_config,
|
||||
errors2 = rougail.user_datas(ret, invalid_user_datas_error=True)
|
||||
export = RougailOutputConsole(tiramisu_config,
|
||||
rougailconfig=rougailconfig,
|
||||
user_data_errors=errors2['errors'],
|
||||
user_data_warnings=errors2['warnings'],
|
||||
)
|
||||
console = export.run()[1]
|
||||
conv = Ansi2HTMLConverter(inline=True)
|
||||
doc += inv_formatter.title('Output when invalid user data is an error', 4)
|
||||
cmd2 = cmd + " --cli.invalid_user_data_error"
|
||||
doc += inv_formatter.title('Output when invalid user datas is an error', 4)
|
||||
cmd2 = cmd + " --cli.invalid_user_datas_error"
|
||||
with (dirname / "cmd_invalid.txt").open("w") as fh:
|
||||
fh.write(cmd2)
|
||||
doc += f"```shell\n{cmd2}\n```\n"
|
||||
conv_data = '<pre>' + conv.convert(console, full=False) + "</pre>\n"
|
||||
doc += conv_data
|
||||
with open(dirname / 'output_invalid.html', 'w') as fh_output:
|
||||
fh_output.write(conv_data)
|
||||
rougailconfig['display.output_format'] = "github"
|
||||
export = RougailOutputDisplay(tiramisu_config,
|
||||
rougailconfig=rougailconfig,
|
||||
user_data_errors=errors2['errors'],
|
||||
user_data_warnings=errors2['warnings'],
|
||||
)
|
||||
doc += export.run()[1]
|
||||
doc += "\n***\n"
|
||||
if (dirname / 'unknown').is_file():
|
||||
tiramisu_config.property.read_write()
|
||||
trougailconfig = rougailconfig.copy()
|
||||
errors2 = rougail.user_data(ret, unknown_user_data_error=True)
|
||||
tiramisu_config.property.read_only()
|
||||
mandatories(tiramisu_config, errors2["errors"])
|
||||
trougailconfig['display.output_format'] = "console"
|
||||
export = RougailOutputDisplay(tiramisu_config,
|
||||
rougailconfig=trougailconfig,
|
||||
user_data_errors=errors2['errors'],
|
||||
user_data_warnings=errors2['warnings'],
|
||||
)
|
||||
console = export.run()[1]
|
||||
conv = Ansi2HTMLConverter(inline=True)
|
||||
doc += inv_formatter.title('Output when unknown user data is an error', 4)
|
||||
cmd2 = cmd + " --cli.unknown_user_data_error"
|
||||
with (dirname / "cmd_unknown.txt").open("w") as fh:
|
||||
fh.write(cmd2)
|
||||
doc += f"```shell\n{cmd2}\n```\n"
|
||||
conv_data = '<pre>' + conv.convert(console, full=False) + "</pre>\n"
|
||||
with open(dirname / 'output_unknown.html', 'w') as fh_output:
|
||||
fh_output.write(conv_data)
|
||||
trougailconfig['display.output_format'] = "github"
|
||||
export = RougailOutputDisplay(tiramisu_config,
|
||||
rougailconfig=trougailconfig,
|
||||
user_data_errors=errors2['errors'],
|
||||
user_data_warnings=errors2['warnings'],
|
||||
)
|
||||
doc += export.run()[1]
|
||||
doc += "\n***\n"
|
||||
if (dirname / 'root').is_file():
|
||||
tiramisu_config.property.read_write()
|
||||
trougailconfig = rougailconfig.copy()
|
||||
errors2 = rougail.user_data(ret, unknown_user_data_error=True)
|
||||
tiramisu_config.property.read_only()
|
||||
with (dirname / 'root').open() as root_fh:
|
||||
root_path = root_fh.read().strip()
|
||||
root_tiramisu_config = tiramisu_config
|
||||
for r in root_path.split('.'):
|
||||
root_tiramisu_config = root_tiramisu_config.option(r)
|
||||
mandatories(tiramisu_config, errors2["errors"])
|
||||
trougailconfig['display.output_format'] = "console"
|
||||
export = RougailOutputDisplay(root_tiramisu_config,
|
||||
root_config=tiramisu_config,
|
||||
rougailconfig=trougailconfig,
|
||||
user_data_errors=errors2['errors'],
|
||||
user_data_warnings=errors2['warnings'],
|
||||
)
|
||||
console = export.run()[1]
|
||||
conv = Ansi2HTMLConverter(inline=True)
|
||||
doc += inv_formatter.title(f'Output for "{root_path}"', 4)
|
||||
cmd2 = cmd + f" --cli.root {root_path}"
|
||||
with (dirname / "cmd_root.txt").open("w") as fh:
|
||||
fh.write(cmd2)
|
||||
doc += f"```shell\n{cmd2}\n```\n"
|
||||
conv_data = '<pre>' + conv.convert(console, full=False) + "</pre>\n"
|
||||
with open(dirname / 'output_root.html', 'w') as fh_output:
|
||||
fh_output.write(conv_data)
|
||||
trougailconfig['display.output_format'] = "github"
|
||||
export = RougailOutputDisplay(root_tiramisu_config,
|
||||
root_config = tiramisu_config,
|
||||
rougailconfig=trougailconfig,
|
||||
user_data_errors=errors2['errors'],
|
||||
user_data_warnings=errors2['warnings'],
|
||||
)
|
||||
doc += export.run()[1]
|
||||
doc += "\n***\n"
|
||||
if (dirname / 'read_write').is_file():
|
||||
trougailconfig = rougailconfig.copy()
|
||||
trougailconfig["console.mandatory"] = False
|
||||
tiramisu_config.property.read_write()
|
||||
errors2 = rougail.user_data(ret, invalid_user_data_error=True)
|
||||
trougailconfig['display.output_format'] = "console"
|
||||
export = RougailOutputDisplay(tiramisu_config,
|
||||
errors2 = rougail.user_datas(ret, invalid_user_datas_error=True)
|
||||
export = RougailOutputConsole(tiramisu_config,
|
||||
rougailconfig=trougailconfig,
|
||||
user_data_errors=errors2['errors'],
|
||||
user_data_warnings=errors2['warnings'],
|
||||
|
|
@ -311,16 +206,9 @@ if __name__ == "__main__":
|
|||
fh.write(cmd2)
|
||||
doc += f"```shell\n{cmd2}\n```\n"
|
||||
conv_data = '<pre>' + conv.convert(console, full=False) + "</pre>\n"
|
||||
doc += conv_data
|
||||
with open(dirname / 'output_rw.html', 'w') as fh_output:
|
||||
fh_output.write(conv_data)
|
||||
trougailconfig['display.output_format'] = "github"
|
||||
export = RougailOutputDisplay(tiramisu_config,
|
||||
rougailconfig=trougailconfig,
|
||||
user_data_errors=errors2['errors'],
|
||||
user_data_warnings=errors2['warnings'],
|
||||
)
|
||||
doc += export.run()[1]
|
||||
doc += "\n***\n"
|
||||
tiramisu_config.property.read_only()
|
||||
#
|
||||
summary = Path('summary_after.md')
|
||||
|
|
|
|||
21
build.sh
21
build.sh
|
|
@ -50,11 +50,8 @@ for i in $(ls -d "examples"/* | sort); do
|
|||
done
|
||||
|
||||
for i in $(ls -d "examples"/* | sort); do
|
||||
if [ -f $i/URL ]; then
|
||||
base_url_doc=$(cat $i/URL)
|
||||
fi
|
||||
if [ -f "$i/TITLE.md" ]; then
|
||||
echo "- $(head -n 1 $i/TITLE.md) ([doc]($base_url_doc))" >> summary.md
|
||||
echo "- $(head -n 1 $i/TITLE.md)" >> summary.md
|
||||
fi
|
||||
if [ -f "$i/SUBTITLE.md" ]; then
|
||||
echo " - $(head -n 1 $i/SUBTITLE.md)" >> summary.md
|
||||
|
|
@ -65,8 +62,11 @@ for i in $(ls -d "examples"/* | sort); do
|
|||
echo "$num"
|
||||
commit_id="v${VERSION}_$num"
|
||||
title=$(head -n 1 $i/README.md)
|
||||
summary="[tutorial $commit_id] $title"
|
||||
url_doc="$base_url_doc#$(echo $title | tr A-Z a-z | sed 's/ /-/g' | sed 's/’/-/g' | sed 's/\"//g')"
|
||||
summary="[tutorial $commit_id)] $title"
|
||||
if [ -f $i/URL ]; then
|
||||
base_url_doc=$(cat $i/URL)
|
||||
fi
|
||||
url_doc="$base_url_doc#$(echo $title | tr A-Z a-z | sed 's/ /-/g' | sed 's/’/-/g')"
|
||||
diff_url="https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/${commit_id}~1..$commit_id"
|
||||
echo " - [$summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/$commit_id/README.md) ([doc]($url_doc) - [diff]($diff_url))" >> summary.md
|
||||
cp "summary_total.md" "$DEST"
|
||||
|
|
@ -83,12 +83,6 @@ for i in $(ls -d "examples"/* | sort); do
|
|||
cp -v "$j" "$DEST/$j"
|
||||
done
|
||||
fi
|
||||
if [ -d ../types ]; then
|
||||
mkdir -p $DEST/types
|
||||
for j in $(ls -d ../types/* 2>/dev/null); do
|
||||
cp -va "$j" "$DEST/types/"
|
||||
done
|
||||
fi
|
||||
cd $DEST
|
||||
tree -H $TUTO_ROOT/$commit_id/ -P "*.yml" > tree.html
|
||||
cd - > /dev/null
|
||||
|
|
@ -146,9 +140,6 @@ for i in $(ls -d "examples"/* | sort); do
|
|||
fi
|
||||
cd - > /dev/null
|
||||
# old_commit_id="$commit_id"
|
||||
# echo "pouet $i"
|
||||
# [ "$i" = "examples/120" ] && exit 1
|
||||
if [ -f previous.yml ]; then cp -a previous.yml previous_old.yml; fi
|
||||
fi
|
||||
done
|
||||
cd "$DEST"
|
||||
|
|
|
|||
1
examples/000/SUBTITLE.md
Normal file
1
examples/000/SUBTITLE.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Making a structure file
|
||||
1
examples/001/SUBTITLE.md
Normal file
1
examples/001/SUBTITLE.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Let's create our first "variable"
|
||||
|
|
@ -1 +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)).
|
||||
|
|
|
|||
|
|
@ -1 +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").
|
||||
|
|
|
|||
7
examples/004/README.md
Normal file
7
examples/004/README.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Limits the possible values for the variable
|
||||
|
||||
"Foo" should not be an option to the "proxy_mode" variable.
|
||||
|
||||
Now the "proxy_mode" type is "choice", that means that there is a list of available values that can be selected.
|
||||
|
||||
We say that the "proxy_mode" variable is constrained (by choices): this variable accept, in fact, only a list of choices.
|
||||
|
|
@ -1 +1 @@
|
|||
A variable with a list of possible values
|
||||
Creating a new family
|
||||
|
|
|
|||
1
examples/010/SUBTITLE.md
Normal file
1
examples/010/SUBTITLE.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Group variables inside "families"
|
||||
|
|
@ -1 +0,0 @@
|
|||
A variable with possible values
|
||||
|
|
@ -1 +1 @@
|
|||
https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/choice.html
|
||||
https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/proxymode.html
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
8
examples/010/structural_files/firefox/10-manual.yml
Normal file
8
examples/010/structural_files/firefox/10-manual.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
version: 1.1
|
||||
|
||||
manual:
|
||||
description: Manual proxy configuration
|
||||
type: family
|
||||
...
|
||||
8
examples/011/README.md
Normal file
8
examples/011/README.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
Or 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).
|
||||
10
examples/011/structural_files/firefox/10-manual.yml
Normal file
10
examples/011/structural_files/firefox/10-manual.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
version: 1.1
|
||||
|
||||
manual: # Manual proxy configuration
|
||||
|
||||
http_proxy:
|
||||
description: HTTP Proxy
|
||||
type: family
|
||||
...
|
||||
1
examples/012/README.md
Normal file
1
examples/012/README.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Putting a variable inside of a family or a sub family
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
proxy_mode: Manual proxy configuration
|
||||
manual:
|
||||
http_proxy:
|
||||
address: example.net
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
proxy_mode: Manual proxy configuration
|
||||
manual:
|
||||
http_proxy:
|
||||
address: example.net
|
||||
10
examples/012/structural_files/firefox/10-manual.yml
Normal file
10
examples/012/structural_files/firefox/10-manual.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
version: 1.1
|
||||
|
||||
manual: # Manual proxy configuration
|
||||
|
||||
http_proxy: # HTTP Proxy
|
||||
|
||||
address: # HTTP address
|
||||
...
|
||||
|
|
@ -1 +1 @@
|
|||
Creating a new family
|
||||
A variable with type "domainname"
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Group variables inside families
|
||||
Constrainte the value of a variable with it's type
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/family.html
|
||||
https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/disabled.html
|
||||
|
|
|
|||
4
examples/020/config/01/config.yml
Normal file
4
examples/020/config/01/config.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
manual:
|
||||
http_proxy:
|
||||
address: example.net
|
||||
4
examples/020/config/02/config.yml
Normal file
4
examples/020/config/02/config.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
manual:
|
||||
http_proxy:
|
||||
address: 192.168.0.1
|
||||
4
examples/020/config/03/config.yml
Normal file
4
examples/020/config/03/config.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
manual:
|
||||
http_proxy:
|
||||
address: not a valid domain name
|
||||
|
|
@ -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
|
||||
...
|
||||
|
|
|
|||
|
|
@ -1,8 +1 @@
|
|||
Or 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
|
||||
|
|
|
|||
1
examples/021/config
Symbolic link
1
examples/021/config
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../020/config
|
||||
|
|
@ -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
|
||||
...
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Putting a variable inside of a family or a sub family
|
||||
A variable with type "port"
|
||||
|
|
|
|||
|
|
@ -1 +1,5 @@
|
|||
---
|
||||
proxy_mode: Manual proxy configuration
|
||||
manual:
|
||||
http_proxy:
|
||||
address: example.net
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
---
|
||||
proxy_mode: Manual proxy configuration
|
||||
manual:
|
||||
http_proxy:
|
||||
address: example.net
|
||||
port: 3128
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
proxy_mode: Manual proxy configuration
|
||||
manual:
|
||||
http_proxy:
|
||||
address: example.net
|
||||
port: 3128
|
||||
port: 100000
|
||||
|
|
|
|||
|
|
@ -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
|
||||
...
|
||||
|
|
|
|||
1
examples/023/README.md
Normal file
1
examples/023/README.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
A variable with type "boolean"
|
||||
4
examples/023/config/01/config.yml
Normal file
4
examples/023/config/01/config.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
manual:
|
||||
http_proxy:
|
||||
address: example.net
|
||||
5
examples/023/config/02/config.yml
Normal file
5
examples/023/config/02/config.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
manual:
|
||||
http_proxy:
|
||||
address: example.net
|
||||
use_for_https: false
|
||||
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
8
examples/023/structural_files/firefox/20-manual.yml
Normal file
8
examples/023/structural_files/firefox/20-manual.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
version: 1.1
|
||||
|
||||
manual:
|
||||
|
||||
use_for_https: true # Also use this proxy for HTTPS
|
||||
...
|
||||
|
|
@ -1 +1 @@
|
|||
A variable with type "domainname"
|
||||
A disabled family
|
||||
|
|
|
|||
1
examples/030/SUBTITLE.md
Normal file
1
examples/030/SUBTITLE.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Property disabled
|
||||
|
|
@ -1 +1 @@
|
|||
Some suitable types
|
||||
Define access to variable or family
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/types.html
|
||||
|
|
@ -1,4 +1 @@
|
|||
---
|
||||
manual:
|
||||
http_proxy:
|
||||
address: example.net
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
---
|
||||
proxy_mode: Manual proxy configuration
|
||||
manual:
|
||||
http_proxy:
|
||||
address: 192.168.0.1
|
||||
address: http.proxy.net
|
||||
port: 3128
|
||||
use_for_https: false
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
manual:
|
||||
http_proxy:
|
||||
address: not a valid domain name.com
|
||||
|
|
@ -2,11 +2,20 @@
|
|||
---
|
||||
version: 1.1
|
||||
|
||||
manual: # Manual proxy configuration
|
||||
manual:
|
||||
description: Manual proxy configuration
|
||||
disabled: true
|
||||
|
||||
http_proxy: # HTTP Proxy
|
||||
|
||||
address:
|
||||
description: HTTP address
|
||||
type: domainname
|
||||
params:
|
||||
allow_ip: true
|
||||
|
||||
port:
|
||||
description: HTTP Port
|
||||
type: port
|
||||
default: 8080
|
||||
...
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
A variable with type’s parameters
|
||||
A conditional disabled family
|
||||
|
|
|
|||
|
|
@ -1,4 +1 @@
|
|||
---
|
||||
manual:
|
||||
http_proxy:
|
||||
address: example.net
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
---
|
||||
proxy_mode: Manual proxy configuration
|
||||
manual:
|
||||
http_proxy:
|
||||
address: 192.168.0.1
|
||||
address: http.proxy.net
|
||||
port: 3128
|
||||
use_for_https: false
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
manual:
|
||||
http_proxy:
|
||||
address: not a valid domain name.com
|
||||
|
|
@ -2,7 +2,11 @@
|
|||
---
|
||||
version: 1.1
|
||||
|
||||
manual: # Manual proxy configuration
|
||||
manual:
|
||||
description: Manual proxy configuration
|
||||
disabled:
|
||||
variable: _.proxy_mode
|
||||
when_not: Manual proxy configuration
|
||||
|
||||
http_proxy: # HTTP Proxy
|
||||
|
||||
|
|
@ -11,4 +15,9 @@ manual: # Manual proxy configuration
|
|||
type: domainname
|
||||
params:
|
||||
allow_ip: true
|
||||
|
||||
port:
|
||||
description: HTTP Port
|
||||
type: port
|
||||
default: 8080
|
||||
...
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
A variable with type "port"
|
||||
Copy HTTP manual proxy to HTTPS manual proxy
|
||||
|
|
|
|||
1
examples/032/SUBTITLE.md
Normal file
1
examples/032/SUBTITLE.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Property hidden
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
proxy_mode: Manual proxy configuration
|
||||
manual:
|
||||
http_proxy:
|
||||
address: example.net
|
||||
port: 100000
|
||||
|
|
@ -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
|
||||
...
|
||||
|
|
@ -10,11 +10,12 @@ manual:
|
|||
|
||||
address:
|
||||
description: HTTPS address
|
||||
default:
|
||||
variable: __.http_proxy.address
|
||||
type: domainname
|
||||
params:
|
||||
allow_ip: true
|
||||
|
||||
port:
|
||||
description: HTTPS Port
|
||||
default:
|
||||
variable: __.http_proxy.port
|
||||
type: port
|
||||
default: 8080
|
||||
...
|
||||
|
|
@ -1 +1 @@
|
|||
A variable with type "boolean"
|
||||
A conditional hidden family
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
---
|
||||
proxy_mode: Manual proxy configuration
|
||||
manual:
|
||||
http_proxy:
|
||||
address: example.net
|
||||
address: http.proxy.net
|
||||
port: 3128
|
||||
use_for_https: false
|
||||
https_proxy:
|
||||
address: https.proxy.net
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
proxy_mode: Manual proxy configuration
|
||||
manual:
|
||||
http_proxy:
|
||||
address: example.net
|
||||
use_for_https: false
|
||||
address: http.proxy.net
|
||||
port: 3128
|
||||
use_for_https: true
|
||||
|
|
|
|||
|
|
@ -5,4 +5,20 @@ 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
|
||||
|
||||
port:
|
||||
description: HTTPS Port
|
||||
type: port
|
||||
default: 8080
|
||||
...
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
HTTPS family
|
||||
A calculated default value
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/properties.html
|
||||
|
|
@ -6,16 +6,18 @@ manual:
|
|||
|
||||
use_for_https: true # Also use this proxy for HTTPS
|
||||
|
||||
https_proxy: # HTTPS Proxy
|
||||
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: 8080
|
||||
default:
|
||||
variable: __.http_proxy.port
|
||||
...
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
A default value calculated from another variable
|
||||
|
|
@ -1 +1 @@
|
|||
A disabled family
|
||||
Family: a dynamic family
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Define access to variable or family
|
||||
Dynamic family
|
||||
|
|
|
|||
1
examples/050/URL
Normal file
1
examples/050/URL
Normal file
|
|
@ -0,0 +1 @@
|
|||
https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/dynfam.html
|
||||
1
examples/050/config
Symbolic link
1
examples/050/config
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../018/config
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
---
|
||||
proxy_mode: Manual proxy configuration
|
||||
manual:
|
||||
http_proxy:
|
||||
address: http.proxy.net
|
||||
port: 3128
|
||||
use_for_https: false
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 117 KiB |
|
|
@ -1,21 +0,0 @@
|
|||
%YAML 1.2
|
||||
---
|
||||
version: 1.1
|
||||
|
||||
manual:
|
||||
description: Manual proxy configuration
|
||||
disabled: true
|
||||
|
||||
http_proxy: # HTTP Proxy
|
||||
|
||||
address:
|
||||
description: HTTP address
|
||||
type: domainname
|
||||
params:
|
||||
allow_ip: true
|
||||
|
||||
port:
|
||||
description: HTTP Port
|
||||
type: port
|
||||
default: 8080
|
||||
...
|
||||
|
|
@ -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
|
||||
...
|
||||
|
|
@ -1 +1 @@
|
|||
A conditional disabled family
|
||||
A conditional disabled variable with dynamic identifier
|
||||
|
|
|
|||
1
examples/051/config
Symbolic link
1
examples/051/config
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../018/config
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue