diff --git a/build.py b/build.py
index 818c4c1..acef8b8 100755
--- a/build.py
+++ b/build.py
@@ -24,9 +24,10 @@ if __name__ == "__main__":
# rougailconfig = RougailConfig.copy()
rougailconfig = get_rougail_config(backward_compatibility=False, add_extra_options=False)
rougailconfig['main_structural_directories'] = ['firefox']
- if Path('config/namespace').is_file():
+ if Path('namespace').is_file():
has_namespace = True
has_foxyproxy = False
+ rougailconfig['main_namespace'] = 'Firefox'
elif Path('foxyproxy').is_dir():
has_foxyproxy = True
has_namespace = True
@@ -36,6 +37,11 @@ if __name__ == "__main__":
has_foxyproxy = False
has_namespace = False
rougailconfig['main_namespace'] = None
+ if Path('types').is_dir():
+ has_types = True
+ rougailconfig['types'] = [str(d) for d in Path('types').iterdir()]
+ else:
+ has_types = False
# rougailconfig['tiramisu_cache'] = "cache.py"
if Path('mode').is_file():
rougailconfig['modes_level'] = ['basic', 'standard', 'advanced']
@@ -62,12 +68,12 @@ if __name__ == "__main__":
doc = ''
yaml = YAML()
namespace = 'firefox'
- if rougailconfig['main_namespace']:
+ if has_foxyproxy:
dirname = "foxyproxy"
else:
dirname = "firefox"
doc += inv_formatter.title('Screenshot', 2) + '\n'
- doc += f'
\n\n'
+ doc += f'
\n\n'
# with doc_file.open('r') as docfh:
# doc += docfh.read()
doc += '\n' + inv_formatter.title('Clone and install', 2) + '\n\n'
@@ -76,7 +82,6 @@ if __name__ == "__main__":
doc += "Then switch to the tutorial page:\n\n"
doc += f"```shell\ngit switch --detach {commit_id}\n```\n"
tree = Path('tree.html')
- display_yml = None
if tree.is_file():
doc += '\n' + inv_formatter.title('Structure', 2) + '\n\n'
with tree.open() as fh:
@@ -85,19 +90,21 @@ if __name__ == "__main__":
doc += tree_content + "\n\n"
with tree.open("w") as fh:
fh.write(tree_content)
- for f in Path(".").iterdir():
- if f.name.startswith('DISPLAY_'):
- filename = f.name[8:]
- display_yml = Path(dirname) / filename
- break
- else:
- files = list(Path(dirname).iterdir())
- files.sort()
- for f in reversed(files):
- if not f.name.endswith('.yml'):
- continue
- display_yml = f
- break
+ display_yml = None
+ if not (Path(".") / 'NODISPLAY').is_file():
+ for f in Path(".").iterdir():
+ if f.name.startswith('DISPLAY_'):
+ filename = f.name[8:]
+ display_yml = Path(dirname) / filename
+ break
+ else:
+ files = list(Path(dirname).iterdir())
+ files.sort()
+ for f in reversed(files):
+ if not f.name.endswith('.yml'):
+ continue
+ display_yml = f
+ break
if display_yml:
doc += f"Contents of the {str(display_yml)} file"
doc += '\n\n```yml\n'
@@ -113,6 +120,8 @@ if __name__ == "__main__":
CMD += "-s Firefox "
if has_foxyproxy:
CMD += "-xn FoxyProxy -xd 0 foxyproxy/ "
+ if has_types:
+ CMD += "--types " + " ".join(rougailconfig["types"]) + " "
if has_mode:
CMD += "--modes_level basic standard advanced "
if inv_doc:
@@ -127,7 +136,7 @@ if __name__ == "__main__":
inv_doc = inventory.run()[1]
if inv_doc:
doc += inv_formatter.title("Let's generate the changelog", 3)
- cmd = CMD + "-o doc --doc.contents changelog"
+ cmd = CMD + "-o doc --doc.contents changelog --doc.changelog.previous_json_file previous.yml"
doc += f'```shell\n{cmd}\n```\n'
doc += inv_doc + "\n"
doc += "***\n"
diff --git a/build.sh b/build.sh
index 74c7ad5..d4513c4 100755
--- a/build.sh
+++ b/build.sh
@@ -54,7 +54,7 @@ for i in $(ls -d "examples"/* | sort); do
base_url_doc=$(cat $i/URL)
fi
if [ -f "$i/TITLE.md" ]; then
- echo "- [$(head -n 1 $i/TITLE.md)]($base_url_doc)" >> summary.md
+ echo "- $(head -n 1 $i/TITLE.md) ([doc]($base_url_doc))" >> summary.md
fi
if [ -f "$i/SUBTITLE.md" ]; then
echo " - $(head -n 1 $i/SUBTITLE.md)" >> summary.md
@@ -66,7 +66,7 @@ for i in $(ls -d "examples"/* | sort); do
commit_id="v${VERSION}_$num"
title=$(head -n 1 $i/README.md)
summary="[tutorial $commit_id] $title"
- url_doc="$base_url_doc#$(echo $title | tr A-Z a-z | sed 's/ /-/g' | sed 's/’/-/g')"
+ url_doc="$base_url_doc#$(echo $title | tr A-Z a-z | sed 's/ /-/g' | sed 's/’/-/g' | sed 's/\"//g')"
diff_url="https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/${commit_id}~1..$commit_id"
echo " - [$summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/$commit_id/README.md) ([doc]($url_doc) - [diff]($diff_url))" >> summary.md
cp "summary_total.md" "$DEST"
@@ -83,10 +83,16 @@ 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
- cp -v DISPLAY_* "$DEST/" 2> /dev/null || true
+ cp -v NODISPLAY DISPLAY_* "$DEST/" 2> /dev/null || true
cp -f ../README.md "$DEST"
if [ -d ../config ]; then
cp -aL ../config "$DEST"
@@ -94,20 +100,18 @@ for i in $(ls -d "examples"/* | sort); do
msg="[tutorial $commit_id] $(cat ../README.md)"
[ -e ../firefox.png ] && cp ../firefox.png "$DEST"
[ -e ../foxyproxy.png ] && cp ../foxyproxy.png "$DEST"
+ [ -e ../namespace ] && cp ../namespace "$DEST"
cd $BEFORE
cd "$DEST"
#
- before=$(grep "commit/$commit_id/README.md" summary_total.md -B1 | wc -l)
echo "- [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/$VERSION/README.md)" > summary_before.md
- if [ "$before" = "2" ]; then
- echo $(grep "commit/$commit_id/README.md" summary_total.md -B1 | head -n 1) >> summary_before.md
+ if [ -n "$old_commit_id" ]; then
+ echo "- [$old_summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/$old_commit_id/README.md) ([diff]($diff_url))" >> summary_before.md
fi
echo "" >> summary_before.md
echo "# $summary" >> summary_before.md
echo "" >> summary_before.md
- echo "[View the diff]($diff_url)" >> summary_before.md
- echo "" >> summary_before.md
- echo "[Read the documentation]($url_doc)" >> summary_before.md
+ echo "[Read the tutorial \"$title\" in the documentation]($url_doc)" >> summary_before.md
after=$(grep "commit/$commit_id/README.md" summary_total.md -A1 | wc -l)
if [ "$after" = "2" ]; then
echo $(grep "commit/$commit_id/README.md" summary_total.md -A1 | tail -n 1) > summary_after.md
@@ -117,7 +121,7 @@ for i in $(ls -d "examples"/* | sort); do
mv config/mode mode
fi
"$BUILDER"/build.py "$BUILDER" "$commit_id"
- rm -rf config/*/README.md config/*/read_write config/namespace config/*/invalid DISPLAY_*
+ rm -rf config/*/README.md config/*/read_write namespace config/*/invalid DISPLAY_* NODISPLAY
rm -rf jinja_caches summary.md summary_before.md summary_after.md summary_total.md
if [ -f mode ]; then
MODE=1
@@ -133,13 +137,17 @@ for i in $(ls -d "examples"/* | sort); do
fi
git commit -m"$summary (config and doc)"
git add .
- git commit -am"$msg"
+ git commit -am"$msg" --allow-empty
git tag -a "$commit_id" -m"format version $VERSION: $num"
if [ "$MODE" = 1 ]; then
touch mode
fi
cd - > /dev/null
-# old_commit_id="$commit_id"
+ old_commit_id="$commit_id"
+ old_summary="$summary"
+# echo "pouet $i"
+# [ "$i" = "examples/120" ] && exit 1
+ if [ -f previous.yml ]; then cp -a previous.yml previous_old.yml; fi
fi
done
cd "$DEST"
diff --git a/examples/021/README.md b/examples/021/README.md
index 5ae0405..606c770 100644
--- a/examples/021/README.md
+++ b/examples/021/README.md
@@ -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).
diff --git a/examples/031/README.md b/examples/031/README.md
index 57a7fb3..bbd0017 100644
--- a/examples/031/README.md
+++ b/examples/031/README.md
@@ -1 +1 @@
-A variable with type's parameters
+A variable with type’s parameters
diff --git a/examples/040/URL b/examples/040/URL
index 28fae4f..3af48c3 100644
--- a/examples/040/URL
+++ b/examples/040/URL
@@ -1 +1 @@
-https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/calculated.html
+https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/properties.html
diff --git a/examples/080/README.md b/examples/080/README.md
index c17fb19..4ab3a2e 100644
--- a/examples/080/README.md
+++ b/examples/080/README.md
@@ -1 +1 @@
-A conditional disabled variable with type web_address
+HTTP Proxy with "proxy" type
diff --git a/examples/080/TITLE.md b/examples/080/TITLE.md
index 6d2ea5c..3ea715f 100644
--- a/examples/080/TITLE.md
+++ b/examples/080/TITLE.md
@@ -1 +1 @@
-A web_address variable
+Custom type
diff --git a/examples/080/config/01/README.md b/examples/080/config/01/README.md
index 2e2d78a..765a56e 100644
--- a/examples/080/config/01/README.md
+++ b/examples/080/config/01/README.md
@@ -1 +1,2 @@
-We cannot configure "auto" if "proxy_mode" is not "Automatic proxy configuration URL".
+If "use_for_https" is false, HTTPS variables are visible in read only mode and in read write mode.
+
diff --git a/examples/080/config/01/config.yml b/examples/080/config/01/config.yml
index 1edbe91..84547fa 100644
--- a/examples/080/config/01/config.yml
+++ b/examples/080/config/01/config.yml
@@ -1,2 +1,9 @@
---
-auto: https://auto.proxy.net/wpad.dat
+proxy_mode: Manual proxy configuration
+manual:
+ http_proxy:
+ address: http.proxy.net
+ port: 3128
+ use_for_https: false
+ https_proxy:
+ address: https.proxy.net
diff --git a/examples/080/config/02/config.yml b/examples/080/config/02/config.yml
deleted file mode 100644
index 26df130..0000000
--- a/examples/080/config/02/config.yml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-proxy_mode: Automatic proxy configuration URL
diff --git a/examples/080/structural_files/firefox/10-manual.yml b/examples/080/structural_files/firefox/10-manual.yml
new file mode 100644
index 0000000..1b3761b
--- /dev/null
+++ b/examples/080/structural_files/firefox/10-manual.yml
@@ -0,0 +1,14 @@
+%YAML 1.2
+---
+version: 1.1
+
+manual:
+ description: Manual proxy configuration
+ disabled:
+ variable: _.proxy_mode
+ when_not: Manual proxy configuration
+
+ http_proxy:
+ description: HTTP Proxy
+ type: proxy
+...
diff --git a/examples/080/types/proxy/00_type.yml b/examples/080/types/proxy/00_type.yml
new file mode 100644
index 0000000..e786ef1
--- /dev/null
+++ b/examples/080/types/proxy/00_type.yml
@@ -0,0 +1,19 @@
+%YAML 1.2
+---
+version: 1.1
+
+proxy:
+
+ address:
+ description: Proxy address
+ type: domainname
+ params:
+ allow_ip: true
+ mandatory: false
+
+ port:
+ description: Proxy port
+ type: port
+ default: 8080
+ mandatory: false
+...
diff --git a/examples/081/README.md b/examples/081/README.md
new file mode 100644
index 0000000..4587e6e
--- /dev/null
+++ b/examples/081/README.md
@@ -0,0 +1 @@
+HTTPS and SOCKS Proxy
diff --git a/examples/081/config/01/README.md b/examples/081/config/01/README.md
new file mode 100644
index 0000000..765a56e
--- /dev/null
+++ b/examples/081/config/01/README.md
@@ -0,0 +1,2 @@
+If "use_for_https" is false, HTTPS variables are visible in read only mode and in read write mode.
+
diff --git a/examples/081/config/01/config.yml b/examples/081/config/01/config.yml
new file mode 100644
index 0000000..84547fa
--- /dev/null
+++ b/examples/081/config/01/config.yml
@@ -0,0 +1,9 @@
+---
+proxy_mode: Manual proxy configuration
+manual:
+ http_proxy:
+ address: http.proxy.net
+ port: 3128
+ use_for_https: false
+ https_proxy:
+ address: https.proxy.net
diff --git a/examples/081/structural_files/firefox/20-manual.yml b/examples/081/structural_files/firefox/20-manual.yml
new file mode 100644
index 0000000..d4ef43b
--- /dev/null
+++ b/examples/081/structural_files/firefox/20-manual.yml
@@ -0,0 +1,35 @@
+%YAML 1.2
+---
+version: 1.1
+
+manual:
+
+ use_for_https: true # Also use this proxy for HTTPS
+
+ https_proxy:
+ description: HTTPS Proxy
+ type: proxy
+ hidden:
+ variable: _.use_for_https
+
+ address:
+ default:
+ variable: __.http_proxy.address
+ mandatory: true
+
+ port:
+ default:
+ variable: __.http_proxy.port
+ mandatory: true
+
+ socks_proxy:
+ description: SOCKS Proxy
+ type: proxy
+
+ version:
+ description: SOCKS host version used by proxy
+ choices:
+ - v4
+ - v5
+ default: v5
+...
diff --git a/examples/090/README.md b/examples/090/README.md
index 1266a43..c17fb19 100644
--- a/examples/090/README.md
+++ b/examples/090/README.md
@@ -1 +1 @@
-A conditional disabled variable with type domainname and parameters
+A conditional disabled variable with type web_address
diff --git a/examples/090/TITLE.md b/examples/090/TITLE.md
index a6d8a05..6d2ea5c 100644
--- a/examples/090/TITLE.md
+++ b/examples/090/TITLE.md
@@ -1 +1 @@
-A full documented variable with multiple values and not mandatory
+A web_address variable
diff --git a/examples/090/config/01/README.md b/examples/090/config/01/README.md
new file mode 100644
index 0000000..2e2d78a
--- /dev/null
+++ b/examples/090/config/01/README.md
@@ -0,0 +1 @@
+We cannot configure "auto" if "proxy_mode" is not "Automatic proxy configuration URL".
diff --git a/examples/090/config/01/config.yml b/examples/090/config/01/config.yml
index ed97d53..1edbe91 100644
--- a/examples/090/config/01/config.yml
+++ b/examples/090/config/01/config.yml
@@ -1 +1,2 @@
---
+auto: https://auto.proxy.net/wpad.dat
diff --git a/examples/090/config/02/config.yml b/examples/090/config/02/config.yml
index 54956ea..26df130 100644
--- a/examples/090/config/02/config.yml
+++ b/examples/090/config/02/config.yml
@@ -1,4 +1,2 @@
---
proxy_mode: Automatic proxy configuration URL
-auto: https://auto.proxy.net/wpad.dat
-no_proxy: 192.168.1.0/24
diff --git a/examples/080/config/03/config.yml b/examples/090/config/03/config.yml
similarity index 100%
rename from examples/080/config/03/config.yml
rename to examples/090/config/03/config.yml
diff --git a/examples/090/firefox.png b/examples/090/firefox.png
index 16f5931..d53e513 100644
Binary files a/examples/090/firefox.png and b/examples/090/firefox.png differ
diff --git a/examples/090/firefox.xcf b/examples/090/firefox.xcf
index 5cc54d7..ca1cf9b 100644
Binary files a/examples/090/firefox.xcf and b/examples/090/firefox.xcf differ
diff --git a/examples/080/structural_files/firefox/30-auto.yml b/examples/090/structural_files/firefox/30-auto.yml
similarity index 100%
rename from examples/080/structural_files/firefox/30-auto.yml
rename to examples/090/structural_files/firefox/30-auto.yml
diff --git a/examples/091/README.md b/examples/091/README.md
deleted file mode 100644
index 130d225..0000000
--- a/examples/091/README.md
+++ /dev/null
@@ -1 +0,0 @@
-A variable with multiple value
diff --git a/examples/091/config/02/config.yml b/examples/091/config/02/config.yml
deleted file mode 100644
index ccba4c0..0000000
--- a/examples/091/config/02/config.yml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-proxy_mode: Automatic proxy configuration URL
-auto: https://auto.proxy.net/wpad.dat
-no_proxy:
- - example.net
- - 192.168.1.0/24
diff --git a/examples/092/README.md b/examples/092/README.md
deleted file mode 100644
index d83ef1b..0000000
--- a/examples/092/README.md
+++ /dev/null
@@ -1 +0,0 @@
-A non mandatory variable
diff --git a/examples/092/config/02/config.yml b/examples/092/config/02/config.yml
deleted file mode 100644
index ccba4c0..0000000
--- a/examples/092/config/02/config.yml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-proxy_mode: Automatic proxy configuration URL
-auto: https://auto.proxy.net/wpad.dat
-no_proxy:
- - example.net
- - 192.168.1.0/24
diff --git a/examples/093/README.md b/examples/093/README.md
deleted file mode 100644
index ad6b7fb..0000000
--- a/examples/093/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Examples
diff --git a/examples/093/config/02/config.yml b/examples/093/config/02/config.yml
deleted file mode 100644
index ccba4c0..0000000
--- a/examples/093/config/02/config.yml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-proxy_mode: Automatic proxy configuration URL
-auto: https://auto.proxy.net/wpad.dat
-no_proxy:
- - example.net
- - 192.168.1.0/24
diff --git a/examples/094/config/02/config.yml b/examples/094/config/02/config.yml
deleted file mode 100644
index 307e175..0000000
--- a/examples/094/config/02/config.yml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-proxy_mode: Automatic proxy configuration URL
-auto: https://auto.proxy.net/wpad.dat
diff --git a/examples/095/README.md b/examples/095/README.md
deleted file mode 100644
index 553d9c0..0000000
--- a/examples/095/README.md
+++ /dev/null
@@ -1 +0,0 @@
-A conditional disabled boolean variable
diff --git a/examples/095/TITLE.md b/examples/095/TITLE.md
deleted file mode 100644
index f8bc264..0000000
--- a/examples/095/TITLE.md
+++ /dev/null
@@ -1 +0,0 @@
-Various variables
diff --git a/examples/097/README.md b/examples/097/README.md
deleted file mode 100644
index 4d33c92..0000000
--- a/examples/097/README.md
+++ /dev/null
@@ -1 +0,0 @@
-A Jinja conditional disabled boolean variable
diff --git a/examples/097/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/097/structural_files/firefox/55-proxy_dns_socks5.yml
deleted file mode 100644
index 052f0d1..0000000
--- a/examples/097/structural_files/firefox/55-proxy_dns_socks5.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-%YAML 1.2
----
-version: 1.1
-
-proxy_dns_socks5:
- description: Use proxy DNS when using SOCKS v5
- default: false
- disabled:
- jinja: |-
- {% if _.manual.socks_proxy.version is propertyerror %}
- the proxy mode is not manual
- {% elif _.manual.socks_proxy.version == 'v4' %}
- socks version is v4
- {% endif %}
- description: |-
- if "firefox.proxy_mode" is not "Manual proxy configuration"
- or "firefox.manual.socks_proxy.version" is "v4"
-...
diff --git a/examples/098/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/098/structural_files/firefox/55-proxy_dns_socks5.yml
deleted file mode 100644
index 0f1a65f..0000000
--- a/examples/098/structural_files/firefox/55-proxy_dns_socks5.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-%YAML 1.2
----
-version: 1.1
-
-proxy_dns_socks5:
- description: Use proxy DNS when using SOCKS v5
- mode: advanced
- default: false
- disabled:
- jinja: |-
- {% if _.manual.socks_proxy.version is propertyerror %}
- the proxy mode is not manual
- {% elif _.manual.socks_proxy.version == 'v4' %}
- socks version is v4
- {% endif %}
- description: |-
- if "firefox.proxy_mode" is not "Manual proxy configuration"
- or "firefox.manual.socks_proxy.version" is "v4"
-...
diff --git a/examples/100/README.md b/examples/100/README.md
index 4207bc8..1266a43 100644
--- a/examples/100/README.md
+++ b/examples/100/README.md
@@ -1 +1 @@
-A boolean variable
+A conditional disabled variable with type domainname and parameters
diff --git a/examples/100/TITLE.md b/examples/100/TITLE.md
index f8bc264..a6d8a05 100644
--- a/examples/100/TITLE.md
+++ b/examples/100/TITLE.md
@@ -1 +1 @@
-Various variables
+A full documented variable with multiple values and not mandatory
diff --git a/examples/093/config/03/config.yml b/examples/100/config/02/config.yml
similarity index 77%
rename from examples/093/config/03/config.yml
rename to examples/100/config/02/config.yml
index 307e175..54956ea 100644
--- a/examples/093/config/03/config.yml
+++ b/examples/100/config/02/config.yml
@@ -1,3 +1,4 @@
---
proxy_mode: Automatic proxy configuration URL
auto: https://auto.proxy.net/wpad.dat
+no_proxy: 192.168.1.0/24
diff --git a/examples/100/firefox.png b/examples/100/firefox.png
index d368003..16f5931 100644
Binary files a/examples/100/firefox.png and b/examples/100/firefox.png differ
diff --git a/examples/100/firefox.xcf b/examples/100/firefox.xcf
index c362607..5cc54d7 100644
Binary files a/examples/100/firefox.xcf and b/examples/100/firefox.xcf differ
diff --git a/examples/090/structural_files/firefox/40-no_proxy.yml b/examples/100/structural_files/firefox/40-no_proxy.yml
similarity index 100%
rename from examples/090/structural_files/firefox/40-no_proxy.yml
rename to examples/100/structural_files/firefox/40-no_proxy.yml
diff --git a/examples/101/README.md b/examples/101/README.md
index 9215d09..130d225 100644
--- a/examples/101/README.md
+++ b/examples/101/README.md
@@ -1 +1 @@
-A choice variable
+A variable with multiple value
diff --git a/examples/101/config/02/config.yml b/examples/101/config/02/config.yml
index aee4796..ccba4c0 100644
--- a/examples/101/config/02/config.yml
+++ b/examples/101/config/02/config.yml
@@ -1,3 +1,6 @@
---
-dns_over_https:
- enable_dns_over_https: true
+proxy_mode: Automatic proxy configuration URL
+auto: https://auto.proxy.net/wpad.dat
+no_proxy:
+ - example.net
+ - 192.168.1.0/24
diff --git a/examples/091/config/03/config.yml b/examples/101/config/03/config.yml
similarity index 100%
rename from examples/091/config/03/config.yml
rename to examples/101/config/03/config.yml
diff --git a/examples/091/structural_files/firefox/40-no_proxy.yml b/examples/101/structural_files/firefox/40-no_proxy.yml
similarity index 100%
rename from examples/091/structural_files/firefox/40-no_proxy.yml
rename to examples/101/structural_files/firefox/40-no_proxy.yml
diff --git a/examples/102/README.md b/examples/102/README.md
index 972da98..d83ef1b 100644
--- a/examples/102/README.md
+++ b/examples/102/README.md
@@ -1 +1 @@
-A web_address variable
+A non mandatory variable
diff --git a/examples/102/config/02/config.yml b/examples/102/config/02/config.yml
index aee4796..ccba4c0 100644
--- a/examples/102/config/02/config.yml
+++ b/examples/102/config/02/config.yml
@@ -1,3 +1,6 @@
---
-dns_over_https:
- enable_dns_over_https: true
+proxy_mode: Automatic proxy configuration URL
+auto: https://auto.proxy.net/wpad.dat
+no_proxy:
+ - example.net
+ - 192.168.1.0/24
diff --git a/examples/102/config/03/config.yml b/examples/102/config/03/config.yml
index 2497fc1..307e175 100644
--- a/examples/102/config/03/config.yml
+++ b/examples/102/config/03/config.yml
@@ -1,5 +1,3 @@
---
-dns_over_https:
- enable_dns_over_https: true
- provider: Custom
- custom_dns_url: http://dns.net
+proxy_mode: Automatic proxy configuration URL
+auto: https://auto.proxy.net/wpad.dat
diff --git a/examples/092/structural_files/firefox/40-no_proxy.yml b/examples/102/structural_files/firefox/40-no_proxy.yml
similarity index 100%
rename from examples/092/structural_files/firefox/40-no_proxy.yml
rename to examples/102/structural_files/firefox/40-no_proxy.yml
diff --git a/examples/103/README.md b/examples/103/README.md
index c11c818..ad6b7fb 100644
--- a/examples/103/README.md
+++ b/examples/103/README.md
@@ -1 +1 @@
-A variable with custom validation
+Examples
diff --git a/examples/103/config/02/config.yml b/examples/103/config/02/config.yml
index aee4796..ccba4c0 100644
--- a/examples/103/config/02/config.yml
+++ b/examples/103/config/02/config.yml
@@ -1,3 +1,6 @@
---
-dns_over_https:
- enable_dns_over_https: true
+proxy_mode: Automatic proxy configuration URL
+auto: https://auto.proxy.net/wpad.dat
+no_proxy:
+ - example.net
+ - 192.168.1.0/24
diff --git a/examples/103/config/03/config.yml b/examples/103/config/03/config.yml
index 2497fc1..307e175 100644
--- a/examples/103/config/03/config.yml
+++ b/examples/103/config/03/config.yml
@@ -1,5 +1,3 @@
---
-dns_over_https:
- enable_dns_over_https: true
- provider: Custom
- custom_dns_url: http://dns.net
+proxy_mode: Automatic proxy configuration URL
+auto: https://auto.proxy.net/wpad.dat
diff --git a/examples/093/structural_files/firefox/40-no_proxy.yml b/examples/103/structural_files/firefox/40-no_proxy.yml
similarity index 100%
rename from examples/093/structural_files/firefox/40-no_proxy.yml
rename to examples/103/structural_files/firefox/40-no_proxy.yml
diff --git a/examples/094/README.md b/examples/104/README.md
similarity index 100%
rename from examples/094/README.md
rename to examples/104/README.md
diff --git a/examples/091/config/01/config.yml b/examples/104/config/01/config.yml
similarity index 100%
rename from examples/091/config/01/config.yml
rename to examples/104/config/01/config.yml
diff --git a/examples/092/config/03/config.yml b/examples/104/config/02/config.yml
similarity index 100%
rename from examples/092/config/03/config.yml
rename to examples/104/config/02/config.yml
diff --git a/examples/094/config/03/config.yml b/examples/104/config/03/config.yml
similarity index 100%
rename from examples/094/config/03/config.yml
rename to examples/104/config/03/config.yml
diff --git a/examples/094/structural_files/firefox/40-no_proxy.yml b/examples/104/structural_files/firefox/40-no_proxy.yml
similarity index 100%
rename from examples/094/structural_files/firefox/40-no_proxy.yml
rename to examples/104/structural_files/firefox/40-no_proxy.yml
diff --git a/examples/110/README.md b/examples/110/README.md
index 86ff802..553d9c0 100644
--- a/examples/110/README.md
+++ b/examples/110/README.md
@@ -1 +1 @@
-Namespace
+A conditional disabled boolean variable
diff --git a/examples/110/TITLE.md b/examples/110/TITLE.md
index 86ff802..247c9bc 100644
--- a/examples/110/TITLE.md
+++ b/examples/110/TITLE.md
@@ -1 +1 @@
-Namespace
+Practice
diff --git a/examples/092/config/01/config.yml b/examples/110/config/01/config.yml
similarity index 100%
rename from examples/092/config/01/config.yml
rename to examples/110/config/01/config.yml
diff --git a/examples/095/config/02/config.yml b/examples/110/config/02/config.yml
similarity index 100%
rename from examples/095/config/02/config.yml
rename to examples/110/config/02/config.yml
diff --git a/examples/095/config/03/config.yml b/examples/110/config/03/config.yml
similarity index 100%
rename from examples/095/config/03/config.yml
rename to examples/110/config/03/config.yml
diff --git a/examples/095/config/04/config.yml b/examples/110/config/04/config.yml
similarity index 100%
rename from examples/095/config/04/config.yml
rename to examples/110/config/04/config.yml
diff --git a/examples/095/firefox.png b/examples/110/firefox.png
similarity index 100%
rename from examples/095/firefox.png
rename to examples/110/firefox.png
diff --git a/examples/095/firefox.xcf b/examples/110/firefox.xcf
similarity index 100%
rename from examples/095/firefox.xcf
rename to examples/110/firefox.xcf
diff --git a/examples/095/structural_files/firefox/50-prompt_authentication.yml b/examples/110/structural_files/firefox/50-prompt_authentication.yml
similarity index 100%
rename from examples/095/structural_files/firefox/50-prompt_authentication.yml
rename to examples/110/structural_files/firefox/50-prompt_authentication.yml
diff --git a/examples/110/structural_files/firefox/empty.yml b/examples/110/structural_files/firefox/empty.yml
deleted file mode 100644
index 94a82bd..0000000
--- a/examples/110/structural_files/firefox/empty.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-%YAML 1.2
----
-version: 1.1
-...
diff --git a/examples/111/100/README.md b/examples/111/100/README.md
deleted file mode 100644
index d6459e0..0000000
--- a/examples/111/100/README.md
+++ /dev/null
@@ -1 +0,0 @@
-xxx
diff --git a/examples/111/README.md b/examples/111/README.md
index d6459e0..4207bc8 100644
--- a/examples/111/README.md
+++ b/examples/111/README.md
@@ -1 +1 @@
-xxx
+A boolean variable
diff --git a/examples/096/config/02/config.yml b/examples/111/config/02/config.yml
similarity index 100%
rename from examples/096/config/02/config.yml
rename to examples/111/config/02/config.yml
diff --git a/examples/096/config/03/config.yml b/examples/111/config/03/config.yml
similarity index 100%
rename from examples/096/config/03/config.yml
rename to examples/111/config/03/config.yml
diff --git a/examples/096/config/04/config.yml b/examples/111/config/04/config.yml
similarity index 100%
rename from examples/096/config/04/config.yml
rename to examples/111/config/04/config.yml
diff --git a/examples/096/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/111/structural_files/firefox/55-proxy_dns_socks5.yml
similarity index 100%
rename from examples/096/structural_files/firefox/55-proxy_dns_socks5.yml
rename to examples/111/structural_files/firefox/55-proxy_dns_socks5.yml
diff --git a/examples/112/README.md b/examples/112/README.md
index d6459e0..4d33c92 100644
--- a/examples/112/README.md
+++ b/examples/112/README.md
@@ -1 +1 @@
-xxx
+A Jinja conditional disabled boolean variable
diff --git a/examples/097/config/02/config.yml b/examples/112/config/02/config.yml
similarity index 100%
rename from examples/097/config/02/config.yml
rename to examples/112/config/02/config.yml
diff --git a/examples/097/config/03/config.yml b/examples/112/config/03/config.yml
similarity index 100%
rename from examples/097/config/03/config.yml
rename to examples/112/config/03/config.yml
diff --git a/examples/097/config/04/config.yml b/examples/112/config/04/config.yml
similarity index 100%
rename from examples/097/config/04/config.yml
rename to examples/112/config/04/config.yml
diff --git a/examples/112/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/112/structural_files/firefox/55-proxy_dns_socks5.yml
new file mode 100644
index 0000000..55bddd3
--- /dev/null
+++ b/examples/112/structural_files/firefox/55-proxy_dns_socks5.yml
@@ -0,0 +1,15 @@
+%YAML 1.2
+---
+version: 1.1
+
+proxy_dns_socks5:
+ description: Use proxy DNS when using SOCKS v5
+ default: false
+ disabled:
+ jinja: |-
+ {{ _.proxy_mode != "Manual proxy configuration" or _.manual.socks_proxy.version == 'v4' }}
+ return_type: boolean
+ description: |-
+ if "_.proxy_mode" is not "Manual proxy configuration"
+ or "_.manual.socks_proxy.version" is "v4"
+...
diff --git a/examples/113/README.md b/examples/113/README.md
deleted file mode 100644
index d6459e0..0000000
--- a/examples/113/README.md
+++ /dev/null
@@ -1 +0,0 @@
-xxx
diff --git a/examples/114/README.md b/examples/114/README.md
deleted file mode 100644
index d6459e0..0000000
--- a/examples/114/README.md
+++ /dev/null
@@ -1 +0,0 @@
-xxx
diff --git a/examples/120/README.md b/examples/120/README.md
index d6459e0..57c52de 100644
--- a/examples/120/README.md
+++ b/examples/120/README.md
@@ -1 +1 @@
-xxx
+Disabled a variable when an other variable are disabled
diff --git a/examples/120/TITLE.md b/examples/120/TITLE.md
new file mode 100644
index 0000000..f7c81d7
--- /dev/null
+++ b/examples/120/TITLE.md
@@ -0,0 +1 @@
+The Jinja propertyerror filter
diff --git a/examples/093/config/01/config.yml b/examples/120/config/01/config.yml
similarity index 100%
rename from examples/093/config/01/config.yml
rename to examples/120/config/01/config.yml
diff --git a/examples/098/config/02/config.yml b/examples/120/config/02/config.yml
similarity index 100%
rename from examples/098/config/02/config.yml
rename to examples/120/config/02/config.yml
diff --git a/examples/098/config/03/config.yml b/examples/120/config/03/config.yml
similarity index 100%
rename from examples/098/config/03/config.yml
rename to examples/120/config/03/config.yml
diff --git a/examples/098/config/04/config.yml b/examples/120/config/04/config.yml
similarity index 100%
rename from examples/098/config/04/config.yml
rename to examples/120/config/04/config.yml
diff --git a/examples/120/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/120/structural_files/firefox/55-proxy_dns_socks5.yml
new file mode 100644
index 0000000..2dbe9d1
--- /dev/null
+++ b/examples/120/structural_files/firefox/55-proxy_dns_socks5.yml
@@ -0,0 +1,15 @@
+%YAML 1.2
+---
+version: 1.1
+
+proxy_dns_socks5:
+ description: Use proxy DNS when using SOCKS v5
+ default: false
+ disabled:
+ jinja: |-
+ {{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}
+ return_type: boolean
+ description: |-
+ if "_.proxy_mode" is not "Manual proxy configuration"
+ or "_.manual.socks_proxy.version" is "v4"
+...
diff --git a/examples/098/README.md b/examples/130/README.md
similarity index 100%
rename from examples/098/README.md
rename to examples/130/README.md
diff --git a/examples/098/TITLE.md b/examples/130/TITLE.md
similarity index 100%
rename from examples/098/TITLE.md
rename to examples/130/TITLE.md
diff --git a/examples/094/config/01/config.yml b/examples/130/config/01/config.yml
similarity index 100%
rename from examples/094/config/01/config.yml
rename to examples/130/config/01/config.yml
diff --git a/examples/130/config/02/config.yml b/examples/130/config/02/config.yml
new file mode 100644
index 0000000..135d8b3
--- /dev/null
+++ b/examples/130/config/02/config.yml
@@ -0,0 +1,5 @@
+---
+proxy_mode: Manual proxy configuration
+manual:
+ http_proxy:
+ address: http.proxy.net
diff --git a/examples/130/config/03/config.yml b/examples/130/config/03/config.yml
new file mode 100644
index 0000000..d04e72c
--- /dev/null
+++ b/examples/130/config/03/config.yml
@@ -0,0 +1,6 @@
+---
+proxy_mode: Manual proxy configuration
+manual:
+ http_proxy:
+ address: http.proxy.net
+proxy_dns_socks5: true
diff --git a/examples/130/config/04/config.yml b/examples/130/config/04/config.yml
new file mode 100644
index 0000000..8ceca7b
--- /dev/null
+++ b/examples/130/config/04/config.yml
@@ -0,0 +1,7 @@
+---
+proxy_mode: Manual proxy configuration
+manual:
+ http_proxy:
+ address: http.proxy.net
+ socks_proxy:
+ version: v4
diff --git a/examples/098/config/mode b/examples/130/config/mode
similarity index 100%
rename from examples/098/config/mode
rename to examples/130/config/mode
diff --git a/examples/130/structural_files/firefox/55-proxy_dns_socks5.yml b/examples/130/structural_files/firefox/55-proxy_dns_socks5.yml
new file mode 100644
index 0000000..02d2823
--- /dev/null
+++ b/examples/130/structural_files/firefox/55-proxy_dns_socks5.yml
@@ -0,0 +1,16 @@
+%YAML 1.2
+---
+version: 1.1
+
+proxy_dns_socks5:
+ description: Use proxy DNS when using SOCKS v5
+ mode: advanced
+ default: false
+ disabled:
+ jinja: |-
+ {{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}
+ return_type: boolean
+ description: |-
+ if "_.proxy_mode" is not "Manual proxy configuration"
+ or "_.manual.socks_proxy.version" is "v4"
+...
diff --git a/examples/096/README.md b/examples/140/README.md
similarity index 100%
rename from examples/096/README.md
rename to examples/140/README.md
diff --git a/examples/140/TITLE.md b/examples/140/TITLE.md
new file mode 100644
index 0000000..247c9bc
--- /dev/null
+++ b/examples/140/TITLE.md
@@ -0,0 +1 @@
+Practice
diff --git a/examples/095/config/01/config.yml b/examples/140/config/01/config.yml
similarity index 100%
rename from examples/095/config/01/config.yml
rename to examples/140/config/01/config.yml
diff --git a/examples/140/firefox.png b/examples/140/firefox.png
new file mode 100644
index 0000000..d368003
Binary files /dev/null and b/examples/140/firefox.png differ
diff --git a/examples/140/firefox.xcf b/examples/140/firefox.xcf
new file mode 100644
index 0000000..c362607
Binary files /dev/null and b/examples/140/firefox.xcf differ
diff --git a/examples/100/structural_files/firefox/60-dns_over_https.yml b/examples/140/structural_files/firefox/60-dns_over_https.yml
similarity index 100%
rename from examples/100/structural_files/firefox/60-dns_over_https.yml
rename to examples/140/structural_files/firefox/60-dns_over_https.yml
diff --git a/examples/141/README.md b/examples/141/README.md
new file mode 100644
index 0000000..9215d09
--- /dev/null
+++ b/examples/141/README.md
@@ -0,0 +1 @@
+A choice variable
diff --git a/examples/096/config/01/config.yml b/examples/141/config/01/config.yml
similarity index 100%
rename from examples/096/config/01/config.yml
rename to examples/141/config/01/config.yml
diff --git a/examples/141/config/02/config.yml b/examples/141/config/02/config.yml
new file mode 100644
index 0000000..aee4796
--- /dev/null
+++ b/examples/141/config/02/config.yml
@@ -0,0 +1,3 @@
+---
+dns_over_https:
+ enable_dns_over_https: true
diff --git a/examples/101/structural_files/firefox/60-dns_over_https.yml b/examples/141/structural_files/firefox/60-dns_over_https.yml
similarity index 100%
rename from examples/101/structural_files/firefox/60-dns_over_https.yml
rename to examples/141/structural_files/firefox/60-dns_over_https.yml
diff --git a/examples/142/README.md b/examples/142/README.md
new file mode 100644
index 0000000..972da98
--- /dev/null
+++ b/examples/142/README.md
@@ -0,0 +1 @@
+A web_address variable
diff --git a/examples/097/config/01/config.yml b/examples/142/config/01/config.yml
similarity index 100%
rename from examples/097/config/01/config.yml
rename to examples/142/config/01/config.yml
diff --git a/examples/142/config/02/config.yml b/examples/142/config/02/config.yml
new file mode 100644
index 0000000..aee4796
--- /dev/null
+++ b/examples/142/config/02/config.yml
@@ -0,0 +1,3 @@
+---
+dns_over_https:
+ enable_dns_over_https: true
diff --git a/examples/142/config/03/config.yml b/examples/142/config/03/config.yml
new file mode 100644
index 0000000..2497fc1
--- /dev/null
+++ b/examples/142/config/03/config.yml
@@ -0,0 +1,5 @@
+---
+dns_over_https:
+ enable_dns_over_https: true
+ provider: Custom
+ custom_dns_url: http://dns.net
diff --git a/examples/102/config/04/config.yml b/examples/142/config/04/config.yml
similarity index 100%
rename from examples/102/config/04/config.yml
rename to examples/142/config/04/config.yml
diff --git a/examples/102/structural_files/firefox/60-dns_over_https.yml b/examples/142/structural_files/firefox/60-dns_over_https.yml
similarity index 79%
rename from examples/102/structural_files/firefox/60-dns_over_https.yml
rename to examples/142/structural_files/firefox/60-dns_over_https.yml
index 6ce2c7e..309c653 100644
--- a/examples/102/structural_files/firefox/60-dns_over_https.yml
+++ b/examples/142/structural_files/firefox/60-dns_over_https.yml
@@ -22,8 +22,7 @@ dns_over_https: # DNS over HTTPS
type: web_address
disabled:
jinja: |-
- {% if _.provider is propertyerror or _.provider != 'Custom' %}
- provider is not custom
- {% endif %}
+ {{ _.provider is propertyerror or _.provider != 'Custom' }}
+ return_type: boolean
description: if "_.provider" is not "Custom"
...
diff --git a/examples/150/README.md b/examples/150/README.md
new file mode 100644
index 0000000..c11c818
--- /dev/null
+++ b/examples/150/README.md
@@ -0,0 +1 @@
+A variable with custom validation
diff --git a/examples/103/TITLE.md b/examples/150/TITLE.md
similarity index 100%
rename from examples/103/TITLE.md
rename to examples/150/TITLE.md
diff --git a/examples/098/config/01/config.yml b/examples/150/config/01/config.yml
similarity index 100%
rename from examples/098/config/01/config.yml
rename to examples/150/config/01/config.yml
diff --git a/examples/150/config/02/config.yml b/examples/150/config/02/config.yml
new file mode 100644
index 0000000..aee4796
--- /dev/null
+++ b/examples/150/config/02/config.yml
@@ -0,0 +1,3 @@
+---
+dns_over_https:
+ enable_dns_over_https: true
diff --git a/examples/150/config/03/config.yml b/examples/150/config/03/config.yml
new file mode 100644
index 0000000..2497fc1
--- /dev/null
+++ b/examples/150/config/03/config.yml
@@ -0,0 +1,5 @@
+---
+dns_over_https:
+ enable_dns_over_https: true
+ provider: Custom
+ custom_dns_url: http://dns.net
diff --git a/examples/103/config/04/config.yml b/examples/150/config/04/config.yml
similarity index 100%
rename from examples/103/config/04/config.yml
rename to examples/150/config/04/config.yml
diff --git a/examples/103/structural_files/firefox/60-dns_over_https.yml b/examples/150/structural_files/firefox/60-dns_over_https.yml
similarity index 70%
rename from examples/103/structural_files/firefox/60-dns_over_https.yml
rename to examples/150/structural_files/firefox/60-dns_over_https.yml
index 55b37cc..bc03324 100644
--- a/examples/103/structural_files/firefox/60-dns_over_https.yml
+++ b/examples/150/structural_files/firefox/60-dns_over_https.yml
@@ -22,14 +22,12 @@ dns_over_https: # DNS over HTTPS
type: web_address
validators:
- jinja: |-
- {% if _.custom_dns_url.startswith('http://') %}
- only https is allowed
- {% endif %}
+ {{ _.custom_dns_url.startswith("http://") }}
+ return_type: boolean
description: must starts with 'https://' only
disabled:
jinja: |-
- {% if _.provider is propertyerror or _.provider != 'Custom' %}
- provider is not custom
- {% endif %}
+ {{ _.provider is propertyerror or _.provider != 'Custom' }}
+ return_type: boolean
description: if "_.provider" is not "Custom"
...
diff --git a/examples/160/README.md b/examples/160/README.md
new file mode 100644
index 0000000..86ff802
--- /dev/null
+++ b/examples/160/README.md
@@ -0,0 +1 @@
+Namespace
diff --git a/examples/160/TITLE.md b/examples/160/TITLE.md
new file mode 100644
index 0000000..86ff802
--- /dev/null
+++ b/examples/160/TITLE.md
@@ -0,0 +1 @@
+Namespace
diff --git a/examples/160/config/01/config.yml b/examples/160/config/01/config.yml
new file mode 100644
index 0000000..ef6a0af
--- /dev/null
+++ b/examples/160/config/01/config.yml
@@ -0,0 +1,4 @@
+---
+firefox:
+ dns_over_https:
+ enable_dns_over_https: true
diff --git a/examples/110/namespace b/examples/160/namespace
similarity index 100%
rename from examples/110/namespace
rename to examples/160/namespace
diff --git a/examples/110/structural_files/firefox/empty b/examples/160/structural_files/NODISPLAY
similarity index 100%
rename from examples/110/structural_files/firefox/empty
rename to examples/160/structural_files/NODISPLAY
diff --git a/examples/160/structural_files/firefox/empty b/examples/160/structural_files/firefox/empty
new file mode 100644
index 0000000..e69de29
diff --git a/examples/161/README.md b/examples/161/README.md
new file mode 100644
index 0000000..7322403
--- /dev/null
+++ b/examples/161/README.md
@@ -0,0 +1 @@
+New "FoxyProxy" namespace
diff --git a/examples/111/100/config/01/config.yml b/examples/161/config/01/config.yml
similarity index 100%
rename from examples/111/100/config/01/config.yml
rename to examples/161/config/01/config.yml
diff --git a/examples/111/100/structural_files/foxyproxy/00-foxyproxy.yml b/examples/161/structural_files/foxyproxy/00-foxyproxy.yml
similarity index 100%
rename from examples/111/100/structural_files/foxyproxy/00-foxyproxy.yml
rename to examples/161/structural_files/foxyproxy/00-foxyproxy.yml
diff --git a/examples/170/README.md b/examples/170/README.md
new file mode 100644
index 0000000..d7f3a5f
--- /dev/null
+++ b/examples/170/README.md
@@ -0,0 +1 @@
+A leadership family
diff --git a/examples/170/TITLE.md b/examples/170/TITLE.md
new file mode 100644
index 0000000..d7f3a5f
--- /dev/null
+++ b/examples/170/TITLE.md
@@ -0,0 +1 @@
+A leadership family
diff --git a/examples/113/config/01/config.yml b/examples/170/config/01/config.yml
similarity index 100%
rename from examples/113/config/01/config.yml
rename to examples/170/config/01/config.yml
diff --git a/examples/170/config/02/config.yml b/examples/170/config/02/config.yml
new file mode 100644
index 0000000..22d9b3b
--- /dev/null
+++ b/examples/170/config/02/config.yml
@@ -0,0 +1,5 @@
+---
+foxyproxy:
+ proxies:
+ - title: My company
+ color: '#66cc66'
diff --git a/examples/170/foxyproxy.png b/examples/170/foxyproxy.png
new file mode 100644
index 0000000..418dad0
Binary files /dev/null and b/examples/170/foxyproxy.png differ
diff --git a/examples/111/structural_files/foxyproxy/00-foxyproxy.yml b/examples/170/structural_files/foxyproxy/00-foxyproxy.yml
similarity index 100%
rename from examples/111/structural_files/foxyproxy/00-foxyproxy.yml
rename to examples/170/structural_files/foxyproxy/00-foxyproxy.yml
diff --git a/examples/180/README.md b/examples/180/README.md
new file mode 100644
index 0000000..45af1a8
--- /dev/null
+++ b/examples/180/README.md
@@ -0,0 +1 @@
+Regexp type
diff --git a/examples/180/TITLE.md b/examples/180/TITLE.md
new file mode 100644
index 0000000..a066682
--- /dev/null
+++ b/examples/180/TITLE.md
@@ -0,0 +1 @@
+Regexp type with calculation
diff --git a/examples/114/config/01/config.yml b/examples/180/config/01/config.yml
similarity index 100%
rename from examples/114/config/01/config.yml
rename to examples/180/config/01/config.yml
diff --git a/examples/180/config/02/config.yml b/examples/180/config/02/config.yml
new file mode 100644
index 0000000..22d9b3b
--- /dev/null
+++ b/examples/180/config/02/config.yml
@@ -0,0 +1,5 @@
+---
+foxyproxy:
+ proxies:
+ - title: My company
+ color: '#66cc66'
diff --git a/examples/180/structural_files/foxyproxy/00-foxyproxy.yml b/examples/180/structural_files/foxyproxy/00-foxyproxy.yml
new file mode 100644
index 0000000..524ba23
--- /dev/null
+++ b/examples/180/structural_files/foxyproxy/00-foxyproxy.yml
@@ -0,0 +1,16 @@
+%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}$
+...
diff --git a/examples/181/README.md b/examples/181/README.md
new file mode 100644
index 0000000..269bc71
--- /dev/null
+++ b/examples/181/README.md
@@ -0,0 +1 @@
+Calculate a random color
diff --git a/examples/181/config/01/config.yml b/examples/181/config/01/config.yml
new file mode 100644
index 0000000..ed97d53
--- /dev/null
+++ b/examples/181/config/01/config.yml
@@ -0,0 +1 @@
+---
diff --git a/examples/181/config/02/config.yml b/examples/181/config/02/config.yml
new file mode 100644
index 0000000..4014664
--- /dev/null
+++ b/examples/181/config/02/config.yml
@@ -0,0 +1,4 @@
+---
+foxyproxy:
+ proxies:
+ - title: My company
diff --git a/examples/181/config/03/config.yml b/examples/181/config/03/config.yml
new file mode 100644
index 0000000..4014664
--- /dev/null
+++ b/examples/181/config/03/config.yml
@@ -0,0 +1,4 @@
+---
+foxyproxy:
+ proxies:
+ - title: My company
diff --git a/examples/181/structural_files/foxyproxy/00-foxyproxy.yml b/examples/181/structural_files/foxyproxy/00-foxyproxy.yml
new file mode 100644
index 0000000..90b269d
--- /dev/null
+++ b/examples/181/structural_files/foxyproxy/00-foxyproxy.yml
@@ -0,0 +1,20 @@
+%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
+...
diff --git a/examples/182/README.md b/examples/182/README.md
new file mode 100644
index 0000000..62f215e
--- /dev/null
+++ b/examples/182/README.md
@@ -0,0 +1 @@
+Auto save value
diff --git a/examples/182/config/01/config.yml b/examples/182/config/01/config.yml
new file mode 100644
index 0000000..ed97d53
--- /dev/null
+++ b/examples/182/config/01/config.yml
@@ -0,0 +1 @@
+---
diff --git a/examples/182/config/02/config.yml b/examples/182/config/02/config.yml
new file mode 100644
index 0000000..4014664
--- /dev/null
+++ b/examples/182/config/02/config.yml
@@ -0,0 +1,4 @@
+---
+foxyproxy:
+ proxies:
+ - title: My company
diff --git a/examples/112/structural_files/foxyproxy/00-foxyproxy.yml b/examples/182/structural_files/foxyproxy/00-foxyproxy.yml
similarity index 73%
rename from examples/112/structural_files/foxyproxy/00-foxyproxy.yml
rename to examples/182/structural_files/foxyproxy/00-foxyproxy.yml
index 9a292c7..0e795a0 100644
--- a/examples/112/structural_files/foxyproxy/00-foxyproxy.yml
+++ b/examples/182/structural_files/foxyproxy/00-foxyproxy.yml
@@ -15,11 +15,7 @@ proxies:
regexp: ^#(?:[0-9a-f]{3}){1,2}$
default:
jinja: >-
- #
-
- {%- for i in range(6) -%}
- {{- '0123456789abcdef' | random -}}
- {%- endfor -%}
+ #{%- for i in range(6) -%}{{- '0123456789abcdef' | random -}}{%- endfor -%}
description: random color value
auto_save: true
...
diff --git a/examples/190/README.md b/examples/190/README.md
new file mode 100644
index 0000000..06207a2
--- /dev/null
+++ b/examples/190/README.md
@@ -0,0 +1 @@
+A variable name that conflict with a known the variable's attribute "type"
diff --git a/examples/190/TITLE.md b/examples/190/TITLE.md
new file mode 100644
index 0000000..66acfab
--- /dev/null
+++ b/examples/190/TITLE.md
@@ -0,0 +1 @@
+A variable name with a known variable's attribute
diff --git a/examples/190/config/01/config.yml b/examples/190/config/01/config.yml
new file mode 100644
index 0000000..ed97d53
--- /dev/null
+++ b/examples/190/config/01/config.yml
@@ -0,0 +1 @@
+---
diff --git a/examples/190/config/02/config.yml b/examples/190/config/02/config.yml
new file mode 100644
index 0000000..0780700
--- /dev/null
+++ b/examples/190/config/02/config.yml
@@ -0,0 +1,6 @@
+---
+foxyproxy:
+ proxies:
+ - title: My company
+ type: HTTP
+ color: '#66cc66'
diff --git a/examples/111/100/config/03/config.yml b/examples/190/config/03/config.yml
similarity index 77%
rename from examples/111/100/config/03/config.yml
rename to examples/190/config/03/config.yml
index bf2cc98..68cc867 100644
--- a/examples/111/100/config/03/config.yml
+++ b/examples/190/config/03/config.yml
@@ -12,9 +12,6 @@ foxyproxy:
- title: An other company
color: '#cc66cc'
type: SOCKS5
- username: my_user
- password: my_password
- title: WPAD
color: '#1166cc'
type: WPAD
- url: http://wpad.proxy.net/wpad.dat
diff --git a/examples/113/structural_files/foxyproxy/00-foxyproxy.yml b/examples/190/structural_files/foxyproxy/00-foxyproxy.yml
similarity index 82%
rename from examples/113/structural_files/foxyproxy/00-foxyproxy.yml
rename to examples/190/structural_files/foxyproxy/00-foxyproxy.yml
index 97123de..64e11cf 100644
--- a/examples/113/structural_files/foxyproxy/00-foxyproxy.yml
+++ b/examples/190/structural_files/foxyproxy/00-foxyproxy.yml
@@ -28,11 +28,7 @@ proxies:
regexp: ^#(?:[0-9a-f]{3}){1,2}$
default:
jinja: >-
- #
-
- {%- for i in range(6) -%}
- {{- '0123456789abcdef' | random -}}
- {%- endfor -%}
+ #{%- for i in range(6) -%}{{- '0123456789abcdef' | random -}}{%- endfor -%}
description: random color value
auto_save: true
...
diff --git a/examples/200/README.md b/examples/200/README.md
new file mode 100644
index 0000000..029f71d
--- /dev/null
+++ b/examples/200/README.md
@@ -0,0 +1 @@
+Variable calculation with propertyerror
diff --git a/examples/200/TITLE.md b/examples/200/TITLE.md
new file mode 100644
index 0000000..029f71d
--- /dev/null
+++ b/examples/200/TITLE.md
@@ -0,0 +1 @@
+Variable calculation with propertyerror
diff --git a/examples/200/config/01/config.yml b/examples/200/config/01/config.yml
new file mode 100644
index 0000000..ed97d53
--- /dev/null
+++ b/examples/200/config/01/config.yml
@@ -0,0 +1 @@
+---
diff --git a/examples/111/100/config/02/config.yml b/examples/200/config/02/config.yml
similarity index 87%
rename from examples/111/100/config/02/config.yml
rename to examples/200/config/02/config.yml
index ffa7a24..9466792 100644
--- a/examples/111/100/config/02/config.yml
+++ b/examples/200/config/02/config.yml
@@ -2,6 +2,7 @@
foxyproxy:
proxies:
- title: My company
- color: '#66cc66'
type: HTTP
+ color: '#66cc66'
address: proxy.company.net
+ port: 8080
diff --git a/examples/200/config/03/config.yml b/examples/200/config/03/config.yml
new file mode 100644
index 0000000..c2a8f35
--- /dev/null
+++ b/examples/200/config/03/config.yml
@@ -0,0 +1,15 @@
+---
+firefox:
+ proxy_mode: Manual proxy configuration
+ manual:
+ http_proxy:
+ address: http.proxy.net
+ port: 3128
+ use_for_https: false
+ https_proxy:
+ address: https.proxy.net
+foxyproxy:
+ proxies:
+ - title: My company
+ type: HTTP
+ color: '#66cc66'
diff --git a/examples/200/structural_files/foxyproxy/00-foxyproxy.yml b/examples/200/structural_files/foxyproxy/00-foxyproxy.yml
new file mode 100644
index 0000000..30b3c1e
--- /dev/null
+++ b/examples/200/structural_files/foxyproxy/00-foxyproxy.yml
@@ -0,0 +1,89 @@
+%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:
+ description: copy HTTP address if proxy is not "Manual"
+ variable: firefox.manual.http_proxy.address
+ propertyerror: false
+ disabled:
+ jinja: |-
+ {{ _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] }}
+ return_type: boolean
+ description: |-
+ if type not in:
+ - HTTP
+ - HTTPS/SSL
+ - SOCKS4
+ - SOCKS5
+
+ port:
+ description: Port
+ type: port
+ default:
+ description: copy HTTP port if proxy is not "Manual"
+ variable: firefox.manual.http_proxy.port
+ propertyerror: false
+ disabled:
+ jinja: |-
+ {{ _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] }}
+ return_type: boolean
+ description: |-
+ if type not in:
+ - HTTP
+ - HTTPS/SSL
+ - SOCKS4
+ - SOCKS5
+
+ url:
+ description: URL
+ type: web_address
+ default:
+ description: copy HTTP address if proxy is "Auto"
+ variable: firefox.auto
+ propertyerror: false
+ disabled:
+ jinja: |-
+ {{ _.type not in ['PAC URL', 'WPAD'] }}
+ return_type: boolean
+ description: |-
+ if type is not in:
+ - PAC URL
+ - WPAD
+...
diff --git a/examples/210/README.md b/examples/210/README.md
new file mode 100644
index 0000000..42210e6
--- /dev/null
+++ b/examples/210/README.md
@@ -0,0 +1 @@
+Username is mandatory if a password is set
diff --git a/examples/210/TITLE.md b/examples/210/TITLE.md
new file mode 100644
index 0000000..57e8348
--- /dev/null
+++ b/examples/210/TITLE.md
@@ -0,0 +1 @@
+Redefine variable
diff --git a/examples/210/config/01/config.yml b/examples/210/config/01/config.yml
new file mode 100644
index 0000000..ed97d53
--- /dev/null
+++ b/examples/210/config/01/config.yml
@@ -0,0 +1 @@
+---
diff --git a/examples/210/config/02/config.yml b/examples/210/config/02/config.yml
new file mode 100644
index 0000000..0e0d4b3
--- /dev/null
+++ b/examples/210/config/02/config.yml
@@ -0,0 +1,14 @@
+---
+foxyproxy:
+ proxies:
+ - title: My company
+ type: HTTP
+ color: '#66cc66'
+ address: proxy.company.net
+ port: 8080
+ username: one_user
+ password: P4ssW0rD
+ - title: An other company
+ type: HTTP
+ address: proxy.company.net
+ port: 8080
diff --git a/examples/210/config/03/config.yml b/examples/210/config/03/config.yml
new file mode 100644
index 0000000..48b8f49
--- /dev/null
+++ b/examples/210/config/03/config.yml
@@ -0,0 +1,13 @@
+---
+foxyproxy:
+ proxies:
+ - title: My company
+ type: HTTP
+ color: '#66cc66'
+ address: proxy.company.net
+ port: 8080
+ password: P4ssW0rD
+ - title: An other company
+ type: HTTP
+ address: proxy.company.net
+ port: 8080
diff --git a/examples/114/structural_files/foxyproxy/00-foxyproxy.yml b/examples/210/structural_files/foxyproxy/00-foxyproxy.yml
similarity index 63%
rename from examples/114/structural_files/foxyproxy/00-foxyproxy.yml
rename to examples/210/structural_files/foxyproxy/00-foxyproxy.yml
index d8cfaaa..14f63f3 100644
--- a/examples/114/structural_files/foxyproxy/00-foxyproxy.yml
+++ b/examples/210/structural_files/foxyproxy/00-foxyproxy.yml
@@ -28,11 +28,7 @@ proxies:
regexp: ^#(?:[0-9a-f]{3}){1,2}$
default:
jinja: >-
- #
-
- {%- for i in range(6) -%}
- {{- '0123456789abcdef' | random -}}
- {%- endfor -%}
+ #{%- for i in range(6) -%}{{- '0123456789abcdef' | random -}}{%- endfor -%}
description: random color value
auto_save: true
@@ -43,16 +39,13 @@ proxies:
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"
+ variable: firefox.manual.http_proxy.address
+ propertyerror: false
disabled:
jinja: |-
- {% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %}
- disabled
- {% endif %}
+ {{ _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] }}
+ return_type: boolean
description: |-
if type not in:
- HTTP
@@ -64,16 +57,13 @@ proxies:
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"
+ variable: firefox.manual.http_proxy.port
+ propertyerror: false
disabled:
jinja: |-
- {% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %}
- disabled
- {% endif %}
+ {{ _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] }}
+ return_type: boolean
description: |-
if type not in:
- HTTP
@@ -87,14 +77,16 @@ proxies:
mandatory:
jinja: |-
{% if _.password is not propertyerror and _.password %}
- username is mandatory
+ true
+ {% else %}
+ false
{% endif %}
+ return_type: boolean
description: if a password is set
disabled:
jinja: |-
- {% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %}
- disabled
- {% endif %}
+ {{ _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] }}
+ return_type: boolean
description: |-
if type not in:
- HTTP
@@ -108,9 +100,8 @@ proxies:
mandatory: false
disabled:
jinja: |-
- {% if _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] %}
- disabled
- {% endif %}
+ {{ _.type not in ['HTTP', 'HTTPS/SSL', 'SOCKS4', 'SOCKS5'] }}
+ return_type: boolean
description: |-
if type not in:
- HTTP
@@ -122,16 +113,13 @@ proxies:
description: URL
type: web_address
default:
- jinja: >-
- {% if firefox.auto is not propertyerror %}
- {{ firefox.auto }}
- {% endif %}
description: copy HTTP address if proxy is "Auto"
+ variable: firefox.auto
+ propertyerror: false
disabled:
jinja: |-
- {% if _.type not in ['PAC URL', 'WPAD'] %}
- proxy does not need url
- {% endif %}
+ {{ _.type not in ['PAC URL', 'WPAD'] }}
+ return_type: boolean
description: |-
if type is not in:
- PAC URL
diff --git a/examples/211/README.md b/examples/211/README.md
new file mode 100644
index 0000000..9037b97
--- /dev/null
+++ b/examples/211/README.md
@@ -0,0 +1 @@
+redefines the behavior to password mandatory if the user is defined
diff --git a/examples/211/config/01/config.yml b/examples/211/config/01/config.yml
new file mode 100644
index 0000000..ed97d53
--- /dev/null
+++ b/examples/211/config/01/config.yml
@@ -0,0 +1 @@
+---
diff --git a/examples/211/config/02/config.yml b/examples/211/config/02/config.yml
new file mode 100644
index 0000000..0e0d4b3
--- /dev/null
+++ b/examples/211/config/02/config.yml
@@ -0,0 +1,14 @@
+---
+foxyproxy:
+ proxies:
+ - title: My company
+ type: HTTP
+ color: '#66cc66'
+ address: proxy.company.net
+ port: 8080
+ username: one_user
+ password: P4ssW0rD
+ - title: An other company
+ type: HTTP
+ address: proxy.company.net
+ port: 8080
diff --git a/examples/211/config/03/config.yml b/examples/211/config/03/config.yml
new file mode 100644
index 0000000..48b8f49
--- /dev/null
+++ b/examples/211/config/03/config.yml
@@ -0,0 +1,13 @@
+---
+foxyproxy:
+ proxies:
+ - title: My company
+ type: HTTP
+ color: '#66cc66'
+ address: proxy.company.net
+ port: 8080
+ password: P4ssW0rD
+ - title: An other company
+ type: HTTP
+ address: proxy.company.net
+ port: 8080
diff --git a/examples/120/structural_files/foxyproxy/10-redefine.yml b/examples/211/structural_files/foxyproxy/10-redefine.yml
similarity index 54%
rename from examples/120/structural_files/foxyproxy/10-redefine.yml
rename to examples/211/structural_files/foxyproxy/10-redefine.yml
index aef4325..bc50e80 100644
--- a/examples/120/structural_files/foxyproxy/10-redefine.yml
+++ b/examples/211/structural_files/foxyproxy/10-redefine.yml
@@ -12,8 +12,7 @@ proxies:
redefine: true
hidden:
jinja: |-
- {% if not _.username %}
- no username defined
- {% endif %}
- description: if username is not defined
+ {{ not _.username }}
+ return_type: boolean
+ description: if username is empty
...